|
From: John R. <joh...@cr...> - 2004-07-12 16:34:12
|
I don't know if this affects Valgrind, but I know
it does affect gdb.
In the newer Linux kernel, when gdb is notified
that a new thread has been created it calls the
ptrace() operating system call with PTRACE_CONT
which cancels pending POSIX semaphore operations.
So any pending sem_wait() calls are sent an EINTR
and return -1. I had to recode our multi-threaded
application to check the return value of sem_wait()
and restart if errno=EINTR.
I don't know if this is affecting ACE, but you can
test that hypothesis by doing:
setenv LD_ASSUME_KERNEL 2.4.18
prior to invoking Valgrind. That will induce the
older kernel behavior that won't interrupt
semaphores when threads are created.
Just an idea,
John Roberts
Software Engineer
Credence Systems Corporation
Hillsboro, Oregon, USA
joh...@cr...
|