diff --git a/CHANGELOG.md b/CHANGELOG.md index ea130b756..9f9562ffb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -307,6 +307,10 @@ public 50 the old detector named an example's `samples.csv` and the input ### Fixed +- **OpenScience installs and runs on Linux kernels from 3.10.** The installer and + the launcher refused any kernel below 5.1, a floor copied from an older Bun + release, so CentOS and RHEL 8 (kernel 4.18) could not install or start it. + Both checks now require 3.10, the minimum the bundled Bun runtime supports. - **Autoresearch launches its own runs on this computer.** A study keeps its code under Project files, but local compute only ran from Session scratch, so every `study start` failed with "exists only in Project files" and the agent diff --git a/backend/cli/README.md b/backend/cli/README.md index 9ea866380..866a445e7 100644 --- a/backend/cli/README.md +++ b/backend/cli/README.md @@ -12,7 +12,7 @@ npm install -g @synsci/openscience The command is `openscience`. -On Linux, the bundled runtime requires kernel 5.1 or newer. Glibc binaries require glibc 2.17 or newer; separate musl packages are selected automatically. CentOS 7's stock 3.10 kernel is unsupported. On Linux ARM64, Bun-compiled executables currently require a 4 KB kernel page size; 16 KB and 64 KB page kernels fail early with a clear diagnostic while [upstream support](https://github.com/oven-sh/bun/issues/17627) remains open. +On Linux, the bundled runtime requires kernel 3.10 or newer, and 5.6 or newer is recommended. Glibc binaries require glibc 2.17 or newer; separate musl packages are selected automatically. Kernels between 3.10 and 5.5 run it with reduced syscall support, which is runtime guidance rather than a completed CentOS 7 certification. On Linux ARM64, Bun-compiled executables currently require a 4 KB kernel page size; 16 KB and 64 KB page kernels fail early with a clear diagnostic while [upstream support](https://github.com/oven-sh/bun/issues/17627) remains open. ## Quick start diff --git a/backend/cli/bin/openscience b/backend/cli/bin/openscience index 7892666be..699369196 100755 --- a/backend/cli/bin/openscience +++ b/backend/cli/bin/openscience @@ -5,7 +5,7 @@ const fs = require("fs") const path = require("path") const os = require("os") -const MIN_LINUX_KERNEL = { major: 5, minor: 1 } +const MIN_LINUX_KERNEL = { major: 3, minor: 10 } function parseKernelVersion(release) { const match = /^(\d+)\.(\d+)/.exec(release) @@ -23,7 +23,7 @@ function linuxKernelProblem(platform = os.platform(), release = os.release()) { ) { return undefined } - return `Linux kernel ${release} is unsupported. OpenScience's bundled runtime requires kernel 5.1 or newer.` + return `Linux kernel ${release} is unsupported. OpenScience's bundled runtime requires kernel 3.10 or newer.` } function detectMusl(platform = os.platform()) { @@ -131,7 +131,8 @@ function run(target, fallback) { if (kernelProblem) { console.error(kernelProblem) console.error( - "Upgrade the host kernel or run OpenScience on a newer VM. CentOS 7's stock 3.10 kernel is not supported.", + "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.", ) process.exit(1) } diff --git a/backend/cli/script/postinstall.mjs b/backend/cli/script/postinstall.mjs index ac8a76f4c..1c73be37b 100644 --- a/backend/cli/script/postinstall.mjs +++ b/backend/cli/script/postinstall.mjs @@ -91,8 +91,8 @@ function linuxKernelProblem(platform, release = os.release()) { if (!match) return undefined const major = Number(match[1]) const minor = Number(match[2]) - if (major > 5 || (major === 5 && minor >= 1)) return undefined - return `Linux kernel ${release} is unsupported; OpenScience's bundled runtime requires kernel 5.1 or newer` + if (major > 3 || (major === 3 && minor >= 10)) return undefined + return `Linux kernel ${release} is unsupported; OpenScience's bundled runtime requires kernel 3.10 or newer` } function pageSize(platform) { @@ -203,7 +203,10 @@ function main() { const { platform, arch } = detectPlatformAndArch() const kernelProblem = linuxKernelProblem(platform) if (kernelProblem) { - throw new Error(`${kernelProblem}. CentOS 7's stock 3.10 kernel is not supported.`) + throw new Error( + `${kernelProblem}. 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.`, + ) } const pageSizeProblem = linuxArm64PageSizeProblem(platform, arch, pageSize(platform)) if (pageSizeProblem) { diff --git a/backend/cli/test/installation/bin-wrapper.test.ts b/backend/cli/test/installation/bin-wrapper.test.ts index 07358c671..ae365cc35 100644 --- a/backend/cli/test/installation/bin-wrapper.test.ts +++ b/backend/cli/test/installation/bin-wrapper.test.ts @@ -22,12 +22,28 @@ const wrapper = require("../../bin/openscience") as { } describe("npm bin wrapper", () => { - test("rejects Linux kernels older than the bundled runtime supports", () => { + test("accepts Linux kernels from the documented 3.10 floor and rejects older ones", () => { expect(wrapper.parseKernelVersion("3.10.0-1160.el7.x86_64")).toEqual({ major: 3, minor: 10 }) - expect(wrapper.linuxKernelProblem("linux", "3.10.0-1160.el7.x86_64")).toContain("requires kernel 5.1") - expect(wrapper.linuxKernelProblem("linux", "5.1.0")).toBeUndefined() + + // 3.10 is the runtime floor docs/notes/linux-compatibility.md records for + // the pinned Bun release. The gate used to demand 5.1, so it refused to + // start on CentOS 7, CentOS 8 and every host below them (#772). + const accepted = ["3.10.0-1160.el7.x86_64", "4.18.0-348.7.1.el8_5.x86_64", "5.1.0", "6.8.0-generic"] + for (const release of accepted) { + expect(wrapper.linuxKernelProblem("linux", release)).toBeUndefined() + expect(postinstallKernelProblem("linux", release)).toBeUndefined() + } + + const rejected = ["2.6.32-754.el6.x86_64", "3.9.0-40-generic"] + for (const release of rejected) { + expect(wrapper.linuxKernelProblem("linux", release)).toContain("requires kernel 3.10") + expect(postinstallKernelProblem("linux", release)).toContain("requires kernel 3.10") + } + expect(wrapper.linuxKernelProblem("darwin", "23.0.0")).toBeUndefined() - expect(postinstallKernelProblem("linux", "3.10.0-1160.el7.x86_64")).toContain("requires kernel 5.1") + expect(postinstallKernelProblem("darwin", "23.0.0")).toBeUndefined() + // An unparseable release is not a reason to refuse to start. + expect(wrapper.linuxKernelProblem("linux", "not-a-kernel")).toBeUndefined() }) test("reports signal exits using shell-compatible status codes", () => { diff --git a/frontend/landing/src/pages/Download.tsx b/frontend/landing/src/pages/Download.tsx index 087e8af11..d449490c2 100644 --- a/frontend/landing/src/pages/Download.tsx +++ b/frontend/landing/src/pages/Download.tsx @@ -119,8 +119,8 @@ const FAQ = [ q: "What are the system requirements?", a: (
- macOS 12 or newer, Windows 10 or 11 (x64), or Linux with kernel 5.1 or newer and glibc 2.17 or newer. Additional - command line builds are available on the{" "} + macOS 12 or newer, Windows 10 or 11 (x64), or Linux with kernel 3.10 or newer and glibc 2.17 or newer. + Additional command line builds are available on the{" "} releases page