Skip to content

ompbox: chown omp natives to coder so omp 19.1.1 starts - #95

Merged
guimou merged 1 commit into
mainfrom
fix-omp-natives-utime
Nov 23, 2026
Merged

guimou merged 1 commit into
mainfrom
fix-omp-natives-utime

Conversation

@guimou

@guimou guimou commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Problem

With omp 19.1.1, ompbox fails at launch:

error: Failed to load pi_natives native addon for linux-x64 (modern).
- embedded addon dir: EPERM: operation not permitted, utime '/usr/local/lib/omp/natives/19.1.1'

omp now sets explicit timestamps on natives/<version> at every start (utimesSync), which only the owner may do. Our natives are extracted root-owned at build time, so the touch fails and the loader never probes the already-extracted addon (19.1.0 still fell through to it). Upstream: can1357/oh-my-pi#20266, fix in can1357/oh-my-pi#20267 (open).

Fix

chown -R coder:coder /usr/local/lib/omp after extraction. uid 1000 is the session user under podman --userns=keep-id and in the k8s pod. Marked with a ponytail: comment to remove once the upstream fix ships. docs/architecture.md updated accordingly.

Limitation

An OpenShell sandbox runs as a different uid and still hits the error until the upstream fix is released.

Verification

  • Real 19.1.1 binary, natives extracted into a read-only dir owned by the running user: the touch succeeds and omp config path loads the natives (exit 0).
  • tests/render-test.sh passes.
  • Image not built in the agent container (no podman): confirm with ./ompbox --build and a launch.

🤖 Generated with Claude Code

omp 19.1.1 sets explicit timestamps (utimes) on natives/<version> at
every start, which only the owner may do. With the natives extracted
root-owned into /usr/local/lib/omp/natives, startup aborted with
"embedded addon dir: EPERM ... utime" and never probed the addon that
was already there. Hand the dir to coder (uid 1000, the session user
under podman keep-id and in the k8s pod).

Upstream: can1357/oh-my-pi#20266, fix pending in #20267; drop the chown
once that ships (an OpenShell sandbox uid still hits it until then).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@guimou
guimou merged commit ca6c184 into main Nov 23, 2026
6 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.

1 participant