Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion backend/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions backend/cli/bin/openscience
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()) {
Expand Down Expand Up @@ -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)
}
Expand Down
9 changes: 6 additions & 3 deletions backend/cli/script/postinstall.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
24 changes: 20 additions & 4 deletions backend/cli/test/installation/bin-wrapper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/landing/src/pages/Download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ const FAQ = [
q: "What are the system requirements?",
a: (
<p>
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{" "}
<a href={RELEASES} target="_blank" rel="noreferrer">
releases page
</a>
Expand Down
Loading