NetBSD and named: Error detected by libpthread: Invalid mutex

Jeremy C. Reed reed at reedmedia.net
Wed Aug 8 02:54:27 UTC 2007


> glacier:/usr/local/etc$ sudo /usr/local/sbin/named -g -d 1 
> named: Error detected by libpthread: Invalid mutex.
> Detected by file "/usr/src/lib/libpthread/pthread_mutex.c", line 334, 
> function "pthread_mutex_unlock".
> See pthread(3) for information.
> Abort (core dumped) 
> 
> Here's the backtrace:
> 
> (gdb) bt
> #0  0xbb7c2a6b in kill () from /usr/lib/libc.so.12
> #1  0xbb9d0e03 in pthread__errorfunc () from /usr/lib/libpthread.so.0
> #2  0xbb9cf811 in pthread_mutex_unlock () from /usr/lib/libpthread.so.0
> #3  0x081606d4 in isc_mem_createx2 (init_max_size=0, target_size=0, 
>     memalloc=0x815e944 <default_memalloc>, 
>     memfree=0x815da18 <default_memfree>, arg=0x0, ctxp=0x81b32e0, flags=2)
>     at mem.c:814
> #4  0x081608c6 in isc_mem_create (init_max_size=0, target_size=0, 
>     ctxp=0x81b32e0) at mem.c:841
> #5  0x0805846f in main (argc=0, argv=0xbfbfec70) at ./main.c:866
> #6  0x0804bb70 in ___start ()
> 
> 
> If I understand this correctly, some operating systems' threading 
> implementations ignore the error of calling pthread_mutex_unlock() on a 
> data area which is not a properly initialized mutex. But NetBSD doesn't 
> allow it.

I used NetBSD environment variable PTHREAD_DIAGASSERT=Ae and got more 
details:

mem.c:814: fatal error: RUNTIME_CHECK(((__libc_mutex_unlock(((&lock))) 
== 0) ? 0 : 34) == 0) failed

... if that helps.

  Jeremy C. Reed


More information about the bind-workers mailing list