Package: strace
Version: 4.5.14-1
Severity: normal

If you attach to a running multithreaded program using -f -p <pid>,
everything seems to work fine (you get the trace of all running threads)
until the time comes to detach.  Pressing ^C leaves strace hanging; pressing
^Z followed by "kill %1" kills strace, but also kills the traced program. 
This makes strace useless for tracing running multithreaded programs.

To repeat:

$ pgrep firefox
3422
$ strace -fp 3422
... a bunch of output ...
[pid  3422] gettimeofday({1152268503, 354598}, NULL) = 0
[pid  3422] poll(^CProcess 3422 detached

At this point, strace is hanging.  When I press ^Z and kill strace, Firefox
dies as well.  The same happens with other multithreaded programs, not just
Firefox.  The problem does not occur without -f and therefore is not an
issue for single-threaded programs.

This is under Debian's 2.6.15-1-686 kernel, but the same seems to happen
under other kernels from the 2.6 series.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages strace depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries

strace recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to