[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#205234: 2.3.2-7 + pthread + vsyslog()



On Thu, Sep 18, 2003 at 07:13:56AM +0200, Matyas Koszik wrote:
> 
> This hangs for me with glibc 2.3.2-7:
> 
> sl.c:
> #include <syslog.h>
> #include <dlfcn.h>
> 
> int
> main( void )
> {
>     dlopen("./sll.so", RTLD_LAZY);
>     openlog("asd2", 0, 0);
>     syslog(0, "sdfsdf");
>     return(0);
> }
> 
> sll.c:
> 
> (empty file)
> 
> gcc sl.c -osl -ldl
> gcc sll.c -osll.so -shared -lpthread
> ./sl
> 
> (this is what i got after some hours of debugging.. maybe useful for
> something.)

Here's the real question:

What were you debugging when you encountered this, and what was loading
libpthread?  In general, this won't work.  The problem is that syslog
tries to lock a mutex; but the mutex was never initialized because
libpthread was not loaded until later.

My guess is some component of Debian (a PAM module maybe?) has started
using libpthread.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: