[uClibc] linuxthreads debugging deadlock

Alexandre Oliva aoliva at redhat.com
Sat May 8 03:50:43 UTC 2004


On Apr  5, 2004, Alexandre Oliva <aoliva at redhat.com> wrote:

> A program that requests __pthread_sig_debug to be blocked will
> self-deadlock when it requests a thread to be created, because the
> debugger (rda or gdb) will never get the signal, so it won't wake up
> the pthread manager as expected.

> This patch fixes it.

Ping.  This patch has made it to glibc linuxthreads back when I first
posted it, but it's still not in uClibc.  Did it just fall through the
cracks, or is there a reason for it to not have made it?

> Index: libpthread/linuxthreads/ChangeLog
> from  Alexandre Oliva  <aoliva at redhat.com>

> 	* signals.c (pthread_sigmask): Don't ever block or mask
> 	__pthread_sig_debug.

> Index: libpthread/linuxthreads/signals.c
> ===================================================================
> RCS file: /var/cvs/uClibc/libpthread/linuxthreads/signals.c,v
> retrieving revision 1.4
> diff -u -p -r1.4 signals.c
> --- libpthread/linuxthreads/signals.c 3 Mar 2003 20:57:18 -0000 1.4
> +++ libpthread/linuxthreads/signals.c 5 Apr 2004 21:31:40 -0000
> @@ -38,9 +38,13 @@ int pthread_sigmask(int how, const sigse
>      case SIG_SETMASK:
>        sigaddset(&mask, __pthread_sig_restart);
>        sigdelset(&mask, __pthread_sig_cancel);
> +      if (__pthread_sig_debug > 0)
> +	sigdelset(&mask, __pthread_sig_debug);
>        break;
>      case SIG_BLOCK:
>        sigdelset(&mask, __pthread_sig_cancel);
> +      if (__pthread_sig_debug > 0)
> +	sigdelset(&mask, __pthread_sig_debug);
>        break;
>      case SIG_UNBLOCK:
>        sigdelset(&mask, __pthread_sig_restart);

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the uClibc mailing list