[uClibc] pthreads and SIGRT_0 problem

Syam Krishna Babbellapati syamkris at gmail.com
Wed Jun 15 16:20:27 UTC 2005


Hi All,

This is a continuation to my earlier post:
(http://www.uclibc.org/lists/uclibc/2005-June/011934.html).

Environment Details: uClibc-0.9.26, gcc-3.3.2, Linux Kernel 2.4.20,
MIPS 4Kc processor.

Scenario:
Process A (pid A) forks and creates Process B (pid B). Process B
invokes pthread_create( ) and creates a thread_manager (Pid C) and a
thread (Pid D).

Problem is that pid B and pid C block forever even though the pid D
and pid A finish their execution.

Going through the strace, we can see that Process C sends 

kill(pid=A, SIGRT_0)

whereas it should have actually sent it to pid B which is its parent
process. (Pid B didn't receive the signal it should and pid C is
always polling on the pipe between it and its parent to see if there
are any new tasks to be done). So, this looks like a deadlock.

Had Process C sent it to Process B, the whole operation would have
finished in a normal fashion with no deadlock situation. (Simulating a
SIGRT_0 signal from command line to the blocked pid B lets pid B and C
complete execution and come out of the infinine blocking mode).

1. This problem occurs only when we compile pthreads library
dynamically. Static compilation doesn't have any such issues. (SIGRT_0
is sent to pid B itself and hence all the processes execute normally).

2. Also, the problem doesn't occur when we use uClibc-0.9.27 also.

Please correct me if my understanding is wrong.

Are there any known problems regarding uClibc-0.9.26/pthreads?

I would be thankful if any one can provide some pointers or with some
information about this problem.

Thanking you in advance,

Regards,
Syam



More information about the uClibc mailing list