Fix Chromium supervisor stop signaling#259
Merged
Merged
Conversation
Give supervisord a short SIGCHLD window and signal the Chromium process group so stop does not tight-loop SIGKILL or leave descendants behind. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: This PR modifies Chromium supervisor configuration in Docker images, not the kernel API endpoints or Temporal workflows specified in the filter. To monitor this PR anyway, reply with |
hiroTamada
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
stopwaitsecsfrom0to1so supervisord has a short window to observe SIGCHLD after the initialSIGKILLinstead of immediately entering its final-kill loop.Why
We observed
supervisorctl stop chromiumproducing thousands of repeatedkilling 'chromium' (...) with SIGKILLlog lines before reporting stopped.Supervisor's STOPPING transition loop explains this behavior: when the process is STOPPING and
delay - now <= 0, it logs the final SIGKILL warning and callskill(SIGKILL)again. Withstopwaitsecs=0, that deadline is expired immediately, so supervisord can repeat this until SIGCHLD processing catches up:stopwaitsecs,stopasgroup, andkillasgroupconfig parsing: https://github.com/Supervisor/supervisor/blob/abc60468ea4b78c446cf3a194f6fccb83d90f670/supervisor/options.py#L911-L914-pidwhen group signaling is enabled: https://github.com/Supervisor/supervisor/blob/abc60468ea4b78c446cf3a194f6fccb83d90f670/supervisor/process.py#L432-L467stopasgroup=true/killasgroup=truealso ensures Chromium renderer, utility, zygote, and browser descendants in the supervised process group receive the stop signal, rather than only signaling the direct supervisedrunuserprocess.Test plan
DOCKER_BUILDKIT=1 docker build -f images/chromium-headful/Dockerfile -t kernel-headful-test ./process/execstop/start iterations against the rebuilt headful container: max stop latency was 181ms and no repeatedkilling 'chromium' ... SIGKILLlines appeared./process/exec: stop completed in 229ms and live Chromium descendants were gone afterward.Made with Cursor
Note
Low Risk
Container runtime/supervisor tuning only; no app auth, data, or API surface changes, with minimal behavioral impact beyond cleaner Chromium shutdown.
Overview
Updates supervisord’s Chromium program config in headful and headless images so stops target the whole process group and don’t spin on repeated SIGKILLs.
Both
chromium.conffiles now setstopasgroup=trueandkillasgroup=true, so stop/kill signals reach Chromium’s child processes (not only the launcher).stopwaitsecschanges from0to1, giving supervisord a brief window after the initial KILL before its STOPPING loop re-issues SIGKILL—addressing noisysupervisorctl stop chromiumlogs and long stop times.Reviewed by Cursor Bugbot for commit 4cb2357. Bugbot is set up for automated code reviews on this repo. Configure here.