Skip to content

fix(install): require kernel 3.10, not 5.1, for the bundled runtime - #778

Merged
Ishaan Gangwani (ishaan1124) merged 3 commits into
synthetic-sciences:mainfrom
aniruddhaadak80:fix/linux-kernel-floor-3-10
Sep 29, 2026
Merged

Ishaan Gangwani (ishaan1124) merged 3 commits into
synthetic-sciences:mainfrom
aniruddhaadak80:fix/linux-kernel-floor-3-10

Conversation

@aniruddhaadak80

@aniruddhaadak80 ANIRUDDHA ADAK (aniruddhaadak80) commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #772.

Summary

Reported symptom openscience exits 1 on CentOS 8 (kernel 4.18)
Actually worse npm install -g @synsci/openscience fails first, inside postinstall
Root cause Linux kernel floor hardcoded to 5.1 in two independent copies
Introduced 74ddda7, first shipped in v1.3.5
This repo's own documented floor 3.10 (with 5.6 recommended)
Fix Both gates lowered to 3.10
Scope 5 files, +33 / -13

The bug

Any Linux kernel below 5.1 is refused by two gates that were never meant to agree with each other:

  1. backend/cli/script/postinstall.mjs:94, which throws during install, so the package fails to install at all.
  2. backend/cli/bin/openscience:8 holds the constant, and is enforced at lines 130-137 with process.exit(1).
const MIN_LINUX_KERNEL = { major: 5, minor: 1 }

It shipped silently. The v1.3.5 changelog entry only says "Hardened native packaging", and the verify-native-cli job added at the same time runs on ubuntu-24.04 only, so a modern-kernel matrix structurally cannot catch this. v1.3.4 had no gate at all.

Why 5.1 is simply wrong

5.1 matches neither number this project documents:

  • docs/notes/linux-compatibility.md:8-12 records kernel 3.10 as the runtime floor, 5.6 or newer recommended, for the pinned Bun release, and links to upstream's guide for that same tag.
  • That upstream guide states Bun "runs on kernels as old as 3.10 (RHEL 7) with graceful degradation of newer syscalls". Its recommended figure is 5.6, not 5.1.
  • The shell installer install has never gated on the kernel at all. It only checks uname -s / uname -m against an OS and arch whitelist, so the npm path and the shell path already disagreed about what the product supports.

In other words the code was stricter than the project's own documentation, and the documentation was right.

What changed

Both gates now use the documented 3.10 floor, so the two copies agree with each other and with docs/notes/linux-compatibility.md.

The follow-up line CentOS 7's stock 3.10 kernel is not supported. is removed, because it directly contradicted the floor it was printed under. Kernels from 3.10 through 5.5 now report reduced syscall support instead of refusing to start:

Upgrade the host kernel or run OpenScience on a newer VM. Kernels from 3.10 to 5.5
run the bundled runtime with graceful degradation of newer syscalls; 5.6 or newer is recommended.

backend/cli/README.md:15 and the landing page's system-requirements line (Download.tsx:122) were reconciled with the same numbers.

The test was pinning the bug

bin-wrapper.test.ts:27 and :30 asserted that 3.10 was rejected:

expect(wrapper.linuxKernelProblem("linux", "3.10.0-1160.el7.x86_64")).toContain("requires kernel 5.1")

So the regression could not be fixed without failing CI. That test is rewritten to assert that 3.10 is accepted, and it now covers:

  • the 3.10 floor, and the reported 4.18 host
  • the old 5.1 boundary, and a current 6.8
  • sub-floor 2.6 and 3.9
  • an unparseable release string
  • non-Linux platforms
  • both copies of the gate, so the duplicated constant cannot drift apart again

Verification

All 8 CI checks pass, and the rewritten test ran and passed:

(pass) npm bin wrapper > accepts Linux kernels from the documented 3.10 floor and rejects older ones

Beyond CI, I executed both gate functions taken from the committed files over HTTP and diffed old against new behaviour across a kernel matrix. 20 out of 20 assertions pass:

kernel before after
2.6.32 (CentOS 6) reject reject
3.9.0 reject reject
3.10.0 (CentOS 7) reject accept
4.18.0 (issue #772) reject accept
5.0.0 reject accept
5.1.0, 6.8.0 accept accept
unparseable release accept accept
darwin / win32 accept accept

linuxKernelProblem("linux", "4.18.0-348.7.1.el8_5.x86_64") now returns undefined, so the reporter's host starts normally instead of printing the error.

Non-goals

Deliberately not in this change:

  • No glibc check. The compat note already declines to certify below glibc 2.17, and inventing a check would silently widen support claims.
  • No OPENSCIENCE_SKIP_* escape hatch. The gate was made a hard block on purpose, so an env-var bypass would undercut that.
  • No new support claims. This lowers a wrong constant to match existing documented policy. It does not certify CentOS 7, which remains tracked in [FEATURE]:support for Centos7(glibc<=2.17) #188.

Follow-up worth its own PR

verify-native-cli runs only on ubuntu-24.04, which is precisely why this shipped unnoticed. An old-kernel leg in that matrix would catch this class of break at review time instead of after release.

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

ANIRUDDHA ADAK (@aniruddhaadak80) is attempting to deploy a commit to the InkVell Team on Vercel.

A member of the Team first needs to authorize it.

The native-platform diagnostic added in 74ddda7 hardcoded a 5.1 floor in
two places and shipped in v1.3.5. That blocks any host below 5.1, so
CentOS 8 (4.18) and CentOS 7 (3.10) cannot install the package at all:
postinstall.mjs throws before the CLI is ever reached, and the bin
wrapper exits 1 on launch.

5.1 matched neither number this project documents. docs/notes/
linux-compatibility.md records kernel 3.10 as the runtime floor for the
pinned Bun release with 5.6 recommended, and upstream's installation
guide for that same tag states Bun runs on kernels as old as 3.10 with
graceful degradation. The shell installer has never gated on the kernel
at all, so the npm path and the install script disagreed.

Lower both copies to the documented 3.10 floor and drop the follow-up
line telling users that CentOS 7's 3.10 kernel is unsupported, which
contradicts the floor it is printed under. 3.10 to 5.5 now reports
reduced syscall support rather than refusing to start.

bin-wrapper.test.ts asserted that 3.10 was rejected, so it locked the
regression in. It now covers the floor, the reported 4.18 host, the old
5.1 boundary, 6.8, sub-floor kernels, unparseable releases and
non-Linux platforms against both copies of the gate.

Refs synthetic-sciences#772
Co-authored-by: Cursor <cursoragent@cursor.com>
@ishaan1124
Ishaan Gangwani (ishaan1124) merged commit 0bdca31 into synthetic-sciences:main Sep 29, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] OpenScience latest version does not run on Linux kernel 4.18

2 participants