83% Latency Reduction with Obscure Linux Process Flags
2025-03-06
An engineer optimizing Recall.ai's Output Media encountered a perplexing issue: random Chromium process termination within a sandboxed environment. Deep debugging revealed the root cause: Linux kernel's prctl(PR_SET_PDEATHSIG, SIGKILL), which tracks parent threads, not processes. Tokio's thread management interacted unexpectedly, causing parent thread reaping and triggering SIGKILL, terminating the child process. Removing Bubblewrap's --die-with-parent flag resolved the issue, resulting in an 83% latency reduction.