funny signal messages when tracing any app

Denys Vlasenko dvlasenk at redhat.com
Tue May 14 14:13:12 UTC 2013


On 05/13/2013 05:04 PM, Denys Vlasenko wrote:
> On 05/04/2013 11:21 PM, Dmitry V. Levin wrote:
>> On Wed, May 01, 2013 at 11:04:13PM -0400, Mike Frysinger wrote:
>>> i imagine this has to do with the probing of new ptrace features, but it still 
>>> seems wrong for the first two lines to be signal stuff when tracing any program:
>>> $ ./strace -eexecve /bin/true 
>>> --- stopped by SIGSTOP ---
>>> --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=10908, si_uid=8282} ---
>>
>> These two lines are annoying, aren't they?
>> It was discussed in February, with no visible result so far.
> 
> I will try to suppress them.

Ping me if this didn't (fully) fix it:


commit 2a3d27552f17a5b378344620bec7d255bac65a8d
Author: Denys Vlasenko <dvlasenk at redhat.com>
Date:   Tue May 14 16:07:46 2013 +0200

    Hide startup syscalls.

    Tested with "./strace [-D] [-q] [-bexecve] env true",
    all cases seem to work.

    * defs.h: Declare new variable: bool hide_log_until_execve.
    * strace.c: Define hide_log_until_execve.
    Rename skip_startup_execve to skip_one_b_execve.
    (startup_child): Do not set skip_one_b_execve = 1 here.
    (init): If "strace PROG" case (as opposed to "strace -pPID"),
    set skip_one_b_execve and hide_log_until_execve to 1.
    (trace): Don't print signal messages if hide_log_until_execve == 1.
    * syscall.c (trace_syscall_entering):
    Skip syscall printing if hide_log_until_execve == 1.
    Reset hide_log_until_execve if we enter execve syscall.
    (trace_syscall_exiting): Skip syscall printing if hide_log_until_execve == 1.





More information about the Strace-devel mailing list