pingdotgg / pingdotgg/t3code

[Bug]: t3 CLI fails to exec on Oracle UEK8 kernels (ENOEXEC) — Node SEA PT_NOTE blob exceeds 4 MB kernel limit

Open
#12,628 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted bug upstream via-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Environment
  • Oracle Linux 9 (aarch64), kernel 6.12.0-204.92.4.4.3.el9uek.aarch64 (UEK8)
  • node v24.20.0, npm 12.0.2
  • npx t3@0.0.43-nightly.20260919.1978
Steps to reproduce
  1. On any Oracle Linux host running a UEK8 kernel (6.12.x el9uek/el10uek, any arch):
  2. npx t3@0.0.43-nightly.20260919.1978
  3. Install completes, then fails:
/home/agent/.npm/_npx/.../node_modules/@t3code/t3-linux-arm64/t3: cannot execute binary file: Exec format error

strace confirms the failure is at execve():

execve(".../@t3code/t3-linux-arm64/t3", ...) = -1 ENOEXEC (Exec format error)
Expected behavior

The CLI starts.

Actual behavior

Kernel refuses to exec the binary (ENOEXEC). This is not an arch mismatch — the binary is a valid aarch64 ELF for this aarch64 host and runs correctly once the triggering condition is neutralized.

Root cause (verified)

UEK8's load_elf_binary() parses every executable's PT_NOTE segment at exec time and returns -ENOEXEC if it exceeds 4 MB (MAX_FILE_NOTE_SIZE), as part of Oracle's preserved-memory/reserved-VA notes feature. Tracked upstream in https://github.com/oracle/linux-uek/issues/46 (closed by Oracle, not fixed as of 6.12.0-204.92.4.4.3).

The t3 CLI is a Node.js Single Executable Application: the JS bundle is embedded as a NODE_SEA_BLOB ELF note (via postject), so PT_NOTE p_filesz is large by design:

NOTE  off=0x08dde000 va=0x0010dde000 filesz=0xa9b0bc (~11.2 MB)  > 4 MB limit -> ENOEXEC
readelf -n: NODE_SEA_BLOB  0x00a9a986

Evidence from bisecting a copy of the ELF on the affected host:

  • e_phnum truncated to ≤ 8 (dropping the NOTE phdr): execve succeeds
  • NOTE phdr nulled, or its p_filesz capped at 4 MB: binary runs and prints t3 v0.0.43-nightly.20260919.1978
  • Everything else (launcher, platform detection, interpreter, page-size alignment) verified fine

Note this affects all t3 platform packages (linux-x64 included) on UEK8, and any Node SEA > 4 MB (e.g. LM Studio's llmster, see the UEK issue).

Workarounds
  1. Boot Oracle Linux's RHCK (or any mainline-based) kernel instead of UEK.
  2. Patch the installed binary's NOTE p_filesz down to 4 MB (must be reapplied after every update) — verified to work.
Suggestions for t3code
  • In bin/t3.js, detect spawnSync result.error.code === 'ENOEXEC' and print a targeted hint (UEK8 / large-PT_NOTE incompatibility + link to workarounds) instead of the bare "failed to start" message. This failure mode is otherwise very hard to diagnose.
  • Consider documenting the UEK8 incompatibility in the README, or offering a non-SEA distribution path (plain JS entry with system node), which has no note-size ceiling.
Side observation

The npm-published binaries ship unstripped (160 MB with debug_info, not stripped) — stripping would cut the download substantially, though the ~11 MB SEA note itself is inherent to the SEA format.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with bin/t3.js and reproduce the failure using the provided npx command on an affected UEK8 host. Trace how spawnSync errors are reported, then make the ENOEXEC path explain the UEK8 large-PT_NOTE incompatibility and available workarounds. Done means the CLI gives a targeted diagnostic instead of the bare startup failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.