Subject: Re: -current and libpthread and signals
To: Bill Studenmund <wrstuden@netbsd.org>
From: Stephan Thesing <thesing@cs.uni-sb.de>
List: current-users
Date: 05/11/2004 15:33:05
Hi,
On Mon, 10 May 2004, Bill Studenmund wrote:
> Date: Mon, 10 May 2004 15:37:10 -0700
> From: Bill Studenmund <wrstuden@netbsd.org>
> To: Stephan Thesing <thesing@cs.uni-sb.de>
> Cc: current-users@netbsd.org
> Subject: Re: -current and libpthread and signals
>
[ signals getting lost in threaded applications ]
>
> This issue, if correct, seems like a library bug. If you are going to ask
> for SIGCHLD, you should have something to receive it.
>
yes, libpthread tries to (from what I have seen in the debug traces) deliver
the signal to exactly one thread (which is the TRT). So it blocks the signal in
all but one thread. Unfortunately, this one thread goes away before it can
receive the signal and, voila, nobody can receive it anymore:-(
> I'm not sure what the right behavior is if you get a signal (that you
> requested) and nothing can receive it.
>
> > I am just curious if this behavior is known and on somebodys TODO list....
> >
> > If more input is needed to fix this behavior I can try to construct a smaller
> > example program that triggers it (the original application is quite large and
> > propietary source code..)....
>
> Unfortunately I am not a person to work on this. However if you could make
> a simpler test, that would be great. It could even be added as a
> regression test.
I will try to prepare a simpler test case over the weekend.
Best regards....
Stephan
= Tel.: +49-681-302-5571 = Universitaet des Saarlandes =
= Fax.: +49-681-302-3065 = Postfach 15 11 50 =
= Compiler Research Group = 66041 Saarbruecken =
= FR 6.2 - Informatik = GERMANY =