strace and pthreads

From: Josef Moellers (josef.moellers_at_fujitsu-siemens.com)
Date: 06/30/05


Date: Thu, 30 Jun 2005 14:11:56 +0200

Hi,

I use strace -p as a first means to find out why a process is mis-behaving.
When trying to strace a multi-threaded application, I get "out of
memory", athough the strace output of the strace -p doesn't show any
signs of an error:

open("/proc/4133/task", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents(3, /* 8 entries */, 1024) = 128
ptrace(PTRACE_ATTACH, 4133, 0x1, 0) = 0
ptrace(PTRACE_ATTACH, 4248, 0x1, 0) = 0
ptrace(PTRACE_ATTACH, 4249, 0x1, 0) = 0
ptrace(PTRACE_ATTACH, 4250, 0x1, 0) = 0
write(2, "strace: out of memory\n", 22) = 22

I tried to google for a hint or an update to strace which doesn't show
this behaviour, but no luck.

Is this a generic problem with strace and threads or might this be a
problem specific to our usage of threads (we have other problems with
the application which caused me to ty strace in the first place)?

Josef

-- 
Josef Möllers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize
						-- T.  Pratchett