[Ltrace-devel] ltrace stucks with pthreads
georg at tropezien.de
Fri Apr 14 12:31:55 UTC 2006
Heiko Carstens schrieb:
>> What am I doing wrong? Is there a hidden secret to use ltrace with threads? Any
>> additional parameter to pass. Or any specific compilation switch to use?
> You're doing nothing wrong, but came across a limitation of ltrace.
ah, I was afraid about something like that.
> ltrace is not able to trace threaded processes: If a process generates a thread
> that shares the same address space (that is calling the "clone" system call with
> parameters CLONE_VM, CLONE_THREAD) the traced process will die with SIGILL
> (s390/s390x) or SIGTRAP (i386).
> The reason for this is that ltrace inserts breakpoints (illegal instructions)
> into the traced thread's address space. This address space is shared between all
> threads, but ltrace gets only notified for breakpoints of the first thread's
> breakpoints. If the second thread reaches such a breakpoint the kernel notices
> that this particular thread of the process is not traced and therefore sends it
> a SIGILL signal (if a signal handler is present) or terminates it because of the
> illegal instruction.
Okay, so there would be no as-soon-as-possible solution for this
missing, hm, feature (?). Is there any hope for multi-threaded tracing
or perhaps some time schedule?
GnuPGP-Key available on WebSite http://www.tropezien.de
More information about the Ltrace-devel