[uClibc 0001013]: pthread_cancel/pthread_join sequence hangs when using select in an other thread

bugs at busybox.net bugs at busybox.net
Mon Oct 23 18:43:25 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1013 
====================================================================== 
Reported By:                jalaber
Assigned To:                uClibc
====================================================================== 
Project:                    uClibc
Issue ID:                   1013
Category:                   Posix Threads
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             08-31-2006 09:04 PDT
Last Modified:              10-23-2006 11:43 PDT
====================================================================== 
Summary:                    pthread_cancel/pthread_join sequence hangs when
using select in an other thread
Description: 
Hello,

I have found a very strange bug in uClibc using
pthread_cancel/pthread_join. 

My test program launches 1 thread which basically makes a select call with
a struct timeval set to 600ms. Then the main thread calls pthread_cancel
and pthread_join, followed by a printf. The program hangs. 
However if you remove the printf call, then the program terminates
normally. I have tried to replace the select call with a sem_wait call,
and everything works fine with or without printf. So the problem seems to
happen only with select.

I use buildroot with kernel 2.4.28 and uclibc 0.9.28. I have attached the
program to reproduce. If you try to comment the printf("join OK\n"), it
works for me.

Thank you for your time and help,
Philippe.

====================================================================== 

---------------------------------------------------------------------- 
 dwagner - 10-23-06 11:43  
---------------------------------------------------------------------- 
I think this issue is responsible that the LIRC driver of directfb RC1 does
not terminate. The driver uses select() and
pthread_cancel()/pthread_join().

Please fix that. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-31-06 09:04  jalaber        New Issue                                    
08-31-06 09:04  jalaber        Status                   new => assigned     
08-31-06 09:04  jalaber        Assigned To               => uClibc          
08-31-06 09:04  jalaber        File Added: pthread_join_test.c                  
 
10-23-06 11:41  dwagner        Issue Monitored: dwagner                     
10-23-06 11:43  dwagner        Note Added: 0001715                          
======================================================================




More information about the uClibc-cvs mailing list