Repository navigation
Description
User Story
I run OpenShell sandboxes with the Podman and Kubernetes drivers, and I read through the isolation core (openshell-sandbox, openshell-binary-identity, openshell-isolation-interface) at 00528d24a. This item comes from reading the code. I have not hit it in production. It is one line of the umbrella issue #5179.
Problem Statement
Three compatibility gaps in the mediated signal and scheduling calls:
crates/openshell-sandbox/src/linux/process_signal.rs:60: thert_sigqueueinfoemulation passes the workload'ssiginfotopidfd_send_signalunchanged. The native syscall overwritessi_signowith the signal number;pidfd_send_signalinstead requiressi_signoto match and returnsEINVALotherwise. A program that leavessi_signounset fails only under OpenShell.process_signal.rs:73: a self-directedkill()/rt_sigqueueinfo()is emulated by sending through a pidfd while the caller is still blocked in its seccomp notification, so the signal interrupts the very syscall being emulated. WithoutSA_RESTARTthe call can returnEINTR/InterruptedError; withSA_RESTARTit can restart and be notified again.crates/openshell-sandbox/src/linux/child_seccomp.rs:232:sched_setaffinity,sched_setattr,sched_setscheduler,sched_setparamandprlimit64are denied for any nonzero PID argument. glibcpthread_setaffinity_npandpthread_setschedparampass the kernel TID, so thread pinning (OpenMPGOMP_CPU_AFFINITY,taskset -p $$, psutilcpu_affinity(pid)) andprlimit(getpid())fail withEPERM.setpriorityis denied outright, sonicefails even for the caller's own priority.
Impact / Why This Matters
Common ML, build and test tooling behaves differently inside OpenShell than outside: CPU pinning and priority changes fail, and signalling oneself can raise EINTR. The failures are surprising because the same code works in a plain container.
Acceptance Criteria
-
rt_sigqueueinfoemulation setssi_signoto the requested signal beforepidfd_send_signal. - Self-directed signals complete without interrupting the call being emulated (deliver after the response or use a path that does not wake the waiter).
- The nonzero-PID deny allows the caller's own TGID and its own threads (and
setpriorityon self) and still blocks other targets. - Tests cover
os.kill(os.getpid(), SIGUSR1),sched_setaffinity(0, ...)on a thread, andnice.
Reproduction Steps
Found by reading the code; not reproduced live. Inside a sandbox: python3 -c 'import os, signal; signal.signal(signal.SIGUSR1, lambda *a: None); os.kill(os.getpid(), signal.SIGUSR1)', taskset -p $$, and nice -n 1 true. Expect them to behave as on the host. Not run yet.
Environment
- OpenShell:
mainat00528d24a - OS: Fedora 44, Linux 7.2.14
- Deployment: Podman driver (local gateway); code read for the Kubernetes driver too
Activity
mrunalp commentedon Nov 3, 2026
Accepted for implementation in #5212.
Source inspection at
32dcc4a67: Signal mediation forwards the copied siginfo to pidfd_send_signal and responds after sending; the child filter rejects nonzero scheduling/resource-limit targets. The compatibility report merits the proposed fixes, with regression coverage for native self/thread behavior and continued denial of other targets.This assessment is based on the source and the linked report/PR; I have not independently run deployment reproductions or the PR test suite. CI and code review still need to validate the fix.