mysterious hang in pthread_create

John Hein jhein at timing.com
Fri Aug 29 13:41:59 UTC 2008


Andriy Gapon wrote at 00:41 +0300 on Aug 29, 2008:
 > This seems to be it.
 > I can reproduce the issue with the following small C++ program:
 > 
 > /*********************************************/
 > #include <pthread.h>
 > 
 > 
 > static void * thrfunc(void * arg)
 > {
 >      return NULL;
 > }
 > 
 > int main(void)
 > {
 >      pthread_t thr;
 > 
 >      try {
 >          throw int(1);
 >      }
 >      catch (...) {}
 > 
 >      pthread_create(&thr, NULL, thrfunc, NULL);
 > 
 >      return 0;
 > }
 > /*********************************************/
 > 
 > 
 > $ uname -a
 > ... FreeBSD 7.0-STABLE #9: Sun Jul  6 17:13:22 EEST 2008 ... i386

FYI...
I reproduced it on an older 7-stable (May 07), too (stuck in uwait).
But it works fine on 6-stable with libthr or libpthread.


More information about the freebsd-threads mailing list