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

Give a good error message when waitpid raises #211

Merged
merged 1 commit into from
May 27, 2022

Conversation

cgaebel
Copy link
Contributor

@cgaebel cgaebel commented May 24, 2022

This behavior is best demonstrated by the report in #210, where perf
crashed and that made magic-trace crash. Let's nudge people that perf
may have crashed, instead.

Fixes #210

@cgaebel cgaebel requested a review from Xyene May 24, 2022 14:27
src/trace.ml Outdated
in
if Result.is_error waitpid_result
then
Core.eprintf "Warning: [perf] exited suspiciously quickly; it may have crashed.\n%!";
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to provide the waitpid_result in the message, for debugging purposes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok.

This behavior is best demonstrated by the report in janestreet#210, where perf
crashed and that made magic-trace crash. Let's nudge people that perf
may have crashed, instead.
Copy link
Member

@Xyene Xyene left a comment

Choose a reason for hiding this comment

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

LGTM!

@cgaebel cgaebel merged commit 5e8fdd3 into janestreet:master May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal "Unix.Unix_error "No child process" waitpid" on Recording.finish_recording
2 participants