|
From: Alex I. <ale...@in...> - 2005-03-18 00:49:38
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Jeremy, I found it. Somewhere somehow VKI_SIGVGKILL is getting blocked (I
haven't found where yet). I added a line in do_setmask() line 690 - right
after removing SIGKILL and SIGSTOP from the mask we should also remove SIGVGKILL.
Everything fell into place, the app shuts down and cleans up its threads
perfectly. You might wanna patch it into the current CVS head.<br>
<br>
Thanks!<br>
Alex<br>
<br>
Jeremy Fitzhardinge wrote:<br>
<blockquote type="cite" cite="mid...@go...">
<pre wrap="">Alex Ivershen wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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".
</pre>
</blockquote>
<pre wrap=""><!---->
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.
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="$mailwrapcol">--
Alex G. Ivershen Tektronix, Inc.
Network Products Dept. 1500 N. Greenville Ave.
Tektronix, Inc. Richardson, TX 75081
Phone: +1-469-330-4295 USA
"I have noticed that the people who are late are often so much jollier than
the people who have to wait for them." E. V. Lucas
</pre>
<br>
------------------------------------------------------------------------
Confidentiality Notice: This e-mail transmission may contain
confidential and/or privileged information that is intended only for the
individual or entity named in the e-mail address. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution or reliance upon the contents of this e-mail
message is strictly prohibited. If you have received this e-mail
transmission in error, please reply to the sender, so that proper
delivery can be arranged, and please delete the message from your
computer. Thank you.
Tektronix Texas, LLC formerly Inet Technologies, Inc.
------------------------------------------------------------------------
</body>
</html>
|