Skip to content
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

Fix signal handler initialization in forked child processes #3284

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

sporksmith
Copy link
Contributor

No description provided.

@sporksmith sporksmith self-assigned this Jan 16, 2024
@github-actions github-actions bot added Component: Libraries Support functions like LD_PRELOAD and logging Component: Testing Unit and integration tests and frameworks Component: Main Composing the core Shadow executable Component: Documentation In-repository documentation, under docs/ labels Jan 16, 2024
@sporksmith sporksmith changed the title Clone clear sighand Fix signal handler initialization in forked child processes Jan 16, 2024
This is currently enabled for linux-only, since it's not yet implemented
in shadow.
Previously fork-like invocations of clone incorrectly reset signal
handlers, as if `CLONE_CLEAR_SIGHAND` was used.

The default is now fixed to copy signal handlers from the parent
process, and we add support for the `CLONE_CLEAR_SIGHAND` flag to clear
them.
@sporksmith sporksmith marked this pull request as ready for review January 17, 2024 00:09
@sporksmith
Copy link
Contributor Author

Verified this fixes the fork-linux test on fedora:39 (though there are still other tests failing)

$ ci/run.sh -i -c fedora:39 -C gcc -b debug
...
The following tests FAILED:
	 61 - simple_http-shadow (Failed)
	 62 - gc-linux (Failed)
	 63 - gc-shadow (Failed)
	 65 - goroutines-linux (Failed)
	 66 - goroutines-shadow (Failed)

@sporksmith sporksmith linked an issue Jan 17, 2024 that may be closed by this pull request
@robgjansen
Copy link
Member

I believe those other failures are #3267

Copy link
Member

@robgjansen robgjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sporksmith sporksmith merged commit 73bdff2 into shadow:main Jan 17, 2024
25 checks passed
@sporksmith sporksmith deleted the clone-clear-sighand branch January 17, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation In-repository documentation, under docs/ Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

posix_spawn fails starting in glibc-2.38
2 participants