fix: LD_ASSUME_KERNEL for Docker 18.09 compatibility (Issue #508)#517
fix: LD_ASSUME_KERNEL for Docker 18.09 compatibility (Issue #508)#517claw-mini-zz wants to merge 2 commits intoalibaba:mainfrom
Conversation
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2164dd99a6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export EXECD_ENVS | ||
|
|
||
| # Fix for Docker 18.09 / old glibc compatibility (Issue #508) | ||
| export LD_ASSUME_KERNEL=2.33.0 |
There was a problem hiding this comment.
Preserve caller-provided LD_ASSUME_KERNEL
This change unconditionally sets LD_ASSUME_KERNEL=2.33.0, which overwrites any value a caller passes in CreateSandboxRequest.env; sandbox containers always execute this script because Docker provisioning uses entrypoint=[BOOTSTRAP_PATH] in server/src/services/docker.py. In workloads that intentionally set a different LD_ASSUME_KERNEL (or need to disable it), the requested environment is ignored, which can cause runtime incompatibilities for those images. Treat this as a default-only value (set it only when unset) so explicit user configuration remains authoritative.
Useful? React with 👍 / 👎.
Summary
Fix for Issue #508: Docker 18.09 兼容性问题
Problem
Docker 18.09 runs on Linux kernel 4.x which doesn't support clone3(). glibc 2.34+ defaults to clone3, causing
RuntimeError: can't start new threadwhen creating threads in Python.Solution
Set
LD_ASSUME_KERNEL=2.33.0environment variable to force glibc to use the legacyclone()system call instead ofclone3().Changes
LD_ASSUME_KERNEL=2.33.0as default environment variable in_build_labels_and_envmethodexport LD_ASSUME_KERNEL=2.33.0for execd daemonTesting
This fix should allow OpenSandbox to work on:
Fixes #508