|
From: Jeremy F. <je...@go...> - 2003-10-22 16:12:39
|
On Wed, 2003-10-22 at 04:25, Tom Hughes wrote: > My money is on the culprit being de_thread() in fs/exec.c in the > kernel, which does all sorts of mucking about to kill the extra > threads and unshare the signal handling apparatus. Either the signal > is pending and is discarded when a new clean signal handling structure > is created for the thread doing the exec() or the signal is being > delivered but is only killing the other threads and not the one doing > the exec(). Yes, that code is all very tricky. Valgrind has triggered a number of bugs in the 2.6 implementation. > Either way, patching valgrind to explicitly kill the proxy thread in > the pre handler for execve seems to work around the problem... Whether > this is a safe thing to do isn't totally clear to me though. It is, and I've made that change to fix problems with SuSE's kernel - it doesn't kill the other threads on exec, so you end up with proxy LWPs hanging around marooned in old address spaces. The patch is to replace the "tid" with "VG_INVALID_THREADID" in the VG_(nuke_all_threads_except)() line. J |