Signal issue with strace

Dmitry V. Levin ldv at altlinux.org
Mon Jun 10 00:45:23 UTC 2013


On Mon, Jun 10, 2013 at 04:44:33AM +0530, Raghavendra D Prabhu wrote:
> Hi,
> 
> * On Mon, Jun 10, 2013 at 03:24:01AM +0530, Raghavendra D Prabhu <raghu.prabhu13 at gmail.com> wrote:
> >Hi,
> >
> >I am seeing the following with SIGCONT/STOP:
> >
> >1) sleep 1000
> >2) oid=$!
> >3) strace -p $oid
> >
> >Other shell:
> >
> >a) kill -STOP $oid
> >
> >
> >Now, strace prints "--- stopped by SIGSTOP ---" which is right but 
> >trying to Ctrl-C to break strace fails. I guess this may be expected.
> >
> >Now, after kill -CONT $oid, strace doesn't recover at all. (I had to 
> >SIGKILL it). Note, that this happens only when SIGINT was sent (to 
> >strace)
> >earlier with Ctrl-C, otherwise strace resumes with
> >
> >--- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=46443, si_uid=1000} ---
> >restart_syscall(<... resuming interrupted call ...>
> >
> >So, are either (or both) of these behaviors bugs?
> >
> 
> This is with strace 4.8

Actually, strace hangs in detach() waiting for the tracee to be stopped by
SIGSTOP, which is not going to happen when PTRACE_SEIZE is in use because
the tracee is already stopped.  So yes, this is a bug in strace 4.8,
thank you for reporting.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20130610/aa779738/attachment.bin>


More information about the Strace-devel mailing list