-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pidfd: block SIGCHLD during tmp process creation #2491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @rst0git!
I was about to raise one myself!
Hi Radostin! Thanks a lot for looking into it! We had a call with Bhavik today and he wants to see if we can use pstree helpers to solve this problem. So, let's wait a bit with merging this. |
No worries, I just wanted to confirm that the pidfd_dead test will pass with these changes in CI.
I'm not sure how easy it would be to do that but the messages in the following commits might help: c09ba04 5f72963 |
794f5e3
to
2f5e4f5
Compare
LGTM |
2f5e4f5
to
68c61f1
Compare
This patch blocks SIGCHLD during temporary process creation to prevent a race condition between kill() and waitpid() where sigchld_handler() causes `criu restore` to fail with an error. Fixes: checkpoint-restore#2490 Signed-off-by: Bhavik Sachdev <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
68c61f1
to
66f165e
Compare
This pull request updates pidfd to block
SIGCHLD
during temporary process creation to prevent a race condition betweenkill()
andwaitpid()
wheresigchld_handler()
causescriu restore
to fail with an error.Fixes: #2490