fix(docker): add tini init to reap zombie chromium processes#478
Draft
manoj1919 wants to merge 1 commit into
Draft
fix(docker): add tini init to reap zombie chromium processes#478manoj1919 wants to merge 1 commit into
manoj1919 wants to merge 1 commit into
Conversation
Python runs as PID 1 in the container, so Chromium helper processes reparented to it on exit are never waited on and accumulate as zombies. Add tini as the entrypoint init so PID 1 reaps orphaned subprocesses. Fixes stickerdaniel#477
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
The container runs
pythonas PID 1 (ENTRYPOINT ["python", "-m", "linkedin_mcp_server"]). When Patchright/Chromium helper processes exit, the kernel reparents them to PID 1, but Python neverwaitpid()s them, so they accumulate as zombie (<defunct>)chrome-headlessprocesses for the life of the container.This adds
tinias a minimal init so PID 1 reaps orphaned subprocesses.Fixing it in the image (rather than telling users to pass
--init/ composeinit: true) means plaindocker runconsumers are covered too.Verification
Built the image and confirmed PID 1 inside the container is now an init wrapping Python, with no zombies after exercising the Chromium-launching bridge flow:
Closes #477
Synthetic prompt
Generated with Claude Opus 4.8