fuzz: use process::exit panic hook in stdin_fuzz to avoid macOS hang#4449
Closed
joostjager wants to merge 1 commit intolightningdevkit:mainfrom
Closed
fuzz: use process::exit panic hook in stdin_fuzz to avoid macOS hang#4449joostjager wants to merge 1 commit intolightningdevkit:mainfrom
joostjager wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
On macOS, panic=abort causes the process to call abort() which sends SIGABRT. The ReportCrash daemon then tries to generate a crash report, leaving the process stuck in an uninterruptible wait state that cannot be killed even with SIGKILL. This makes stdin_fuzz unusable for crash reproduction on macOS. Install a custom panic hook that flushes stdout (preserving log output), prints the panic info with a full backtrace to stderr, then calls process::exit(1) to terminate cleanly before the abort machinery runs. The hook has zero overhead during normal execution since it is only invoked when a panic occurs. AI tools were used in preparing this commit.
|
👋 Hi! I see this is a draft PR. |
Contributor
Author
|
Hmm it doesn't reproduce anymore now. Probably coming back to this PR later. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4449 +/- ##
=======================================
Coverage 85.93% 85.94%
=======================================
Files 159 159
Lines 104693 104693
Branches 104693 104693
=======================================
+ Hits 89972 89980 +8
+ Misses 12213 12208 -5
+ Partials 2508 2505 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Unfortunately the final approach chosen in #4430 did not prevent the hang-on-panic. Must have made a mistake in the final validation of stdin_fuzz.