Repository navigation
Remove the flaky setproctitle crash canary on macOS - #658
Merged
Merged
Conversation
`test_setproctitle_crashes_after_fork_with_corefoundation_loaded` fails in about half of the runs on macOS, because the crash asserted by the test is not deterministic: a forked child calling `setproctitle` segfaults in about half of the runs and exits cleanly in the rest. A canary cannot be made reliable here. The CAVEATS of Apple's `fork(2)` say that every framework API must be assumed unsafe in a forked child until it calls `exec`, and the LaunchServices call made by `setproctitle` on macOS is one of them. The setproctitle maintainers treat the crash as a platform limitation (dvarrazzo/py-setproctitle#127), so a child that exits cleanly does NOT mean that the workaround can go. `test_safe_setproctitle_does_not_crash_after_fork` stays, as it tests the workaround in `safe_setproctitle`. Closes boxed#622.
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.
test_setproctitle_crashes_after_fork_with_corefoundation_loadedfails in about half of the runs on macOS, because the crash asserted by the test is not deterministic: a forked child callingsetproctitlesegfaults in about half of the runs and exits cleanly in the rest.A canary cannot be made reliable here: trial over several children only raises the chance of a crash. The CAVEATS of Apple's
fork(2)say that every framework API must be assumed unsafe in a forked child until it callsexec, and the LaunchServices call made bysetproctitleon macOS is one of them.The setproctitle maintainers treat the crash as a platform limitation (dvarrazzo/py-setproctitle#127), so a child that exits cleanly does NOT mean that the workaround can go;
test_safe_setproctitle_does_not_crash_after_forkstays, as it tests the workaround insafe_setproctitle.Closes #622.
Further reading:
setproctitle()is called afteros.fork()in worker processes #446