Skip to content
Commit 86a19008 authored by Michael Petlan's avatar Michael Petlan Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarJiri Olsa <jolsa@redhat.com>
Signed-off-by: default avatarMichael Petlan <mpetlan@redhat.com>
Tested-by: default avatarMichael Petlan <mpetlan@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/lkml/YEJnaMzH2ctp3PPx@kernel.org/


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 77d02bd0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment