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

When using PERF_RECORD_SWITCH, allow ContextSwitchEvent initialization to fail #3840

Merged

Conversation

sidkshatriya
Copy link
Contributor

The tracee may have died unexpectedly or been killed.

This commit allows the cont_race test to consistently pass when the test is run under all the following conditions:
(a) kernel.perf_event_paranoid = 2
(b) kernel supports PERF_RECORD_SWITCH (Linux kernel >= 6.10)
(c) syscallbuf is enabled (so here we're talking only about cont_race
and NOT cont_race-no-syscallbuf which doesn't need switch events anyways)

Without this commit, I noticed the occasional failure in (syscallbuf enabled) cont_race:

[FATAL src/PerfCounterBuffers.cc:32:allocate() errno: EBADF] Can't allocate memory for PT DATA area

…ion to fail

The tracee may have died unexpectedly or been killed.

This commit allows the `cont_race` test to consistently pass when the test is run
under all the following conditions:
(a) kernel.perf_event_paranoid = 2
(b) kernel supports PERF_RECORD_SWITCH (Linux kernel >= 6.10)
(c) syscallbuf is enabled (so here we're talking only about `cont_race`
    and NOT `cont_race-no-syscallbuf` which doesn't need switch events anyways)

Without this commit, I noticed the occasional failure in (syscallbuf enabled) `cont_race`:

[FATAL src/PerfCounterBuffers.cc:32:allocate() errno: EBADF] Can't allocate memory for PT DATA area
@sidkshatriya
Copy link
Contributor Author

sidkshatriya commented Sep 28, 2024

(If you look at the code in cont_race.c all the children are being killed by do_killer() which is running separately from rr record. Also see cont_race.run )

@sidkshatriya sidkshatriya changed the title When using PERF_RECORD_SWITCH, allow ContextSwitchEvent initializatation to fail When using PERF_RECORD_SWITCH, allow ContextSwitchEvent initialization to fail Sep 28, 2024
@rocallahan rocallahan merged commit cd6d95e into rr-debugger:master Sep 28, 2024
5 checks passed
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.

2 participants