strace and threads
Josef Moellers
josef.moellers at fujitsu-siemens.com
Thu Jun 30 05:52:01 UTC 2005
I've found a problem when trying to strace pthreaded processes:
The global variable tcbtabsize is set from argc.
If a running threaded process is to be straced, (strace -p <pid>) it may
require more than 3 tcbs, especially if it has more than 3 threads.
Since argc is 3, strace will fail with "out of memory" when the 4th
thread is to be attached.
Wouldn't it be better to defer the decision on the number of tcbs until
this can be determined exactly or to realloc() tcbtab if necessary?
Josef
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
More information about the Strace-devel
mailing list