|
From: Jeremy F. <je...@go...> - 2005-03-17 22:56:32
|
Alex Ivershen wrote:
> I am using RedHat 8 (2.4.9-9 kernel, glibc 2.3.2, pthreads 0.10) amd
> MontaVista Linux (kernel 2.4.20, glibc 2.2.5, pthreads 0.9).
> Unfortunately, I can't get you a test case - the application is huge,
> dynamically loads about 20 shared libs and must be running in a
> sandbox with other apps.
>
> However, I did some debugging, and it seems that the problem is in
> cleaning up the threads in shutdown_actions() and reap_threads(). My
> threads have a common semaphore, so when we are "zapping" the threads,
> those ones that are not blocked are going out cleanly, but some
> threads are still in __pthread_sigsuspend() call, and it looks like
> it's not a cancellation point. Therefore, these suspended threads
> never exit and valgrind never returns from reap_threads(). Ath the
> same time the main thread already exited - thus I end up with a bunch
> of orphaned threads on "ps".
The zap should be pretty unconditional, and make any blocking syscall
unblock. It's possible the signal mask isn't getting set right and it's
blocking the VKI_SIGVGKILL signal rather than having it interrupt the
syscall. I'll take a closer look later.
J
|