diff options
author | Michael Petlan <[email protected]> | 2021-03-02 15:41:20 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-03-06 16:54:32 -0300 |
commit | 86a19008af5d88d5d523dbfe9b6ede11473e9a7f (patch) | |
tree | 66faab23b448d9a37bc4b90d433d8076c13b8cb1 /tools/perf/tests/task-exit.c | |
parent | 77d02bd00cea9f1a87afe58113fa75b983d6c23a (diff) |
perf trace: Fix race in signal handling
Since a lot of stuff happens before the SIGINT signal handler is registered
(scanning /proc/*, etc.), on bigger systems, such as Cavium Sabre CN99xx,
it may happen that first interrupt signal is lost and perf isn't correctly
terminated.
The reproduction code might look like the following:
perf trace -a &
PERF_PID=$!
sleep 4
kill -INT $PERF_PID
The issue has been found on a CN99xx machine with RHEL-8 and the patch fixes
it by registering the signal handlers earlier in the init stage.
Suggested-by: Jiri Olsa <[email protected]>
Signed-off-by: Michael Petlan <[email protected]>
Tested-by: Michael Petlan <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/tests/task-exit.c')
0 files changed, 0 insertions, 0 deletions