NetBSD and named: Error detected by libpthread: Invalid mutex

Jeremy C. Reed reed at reedmedia.net
Wed Aug 8 02:33:50 UTC 2007


This is with NetBSD/i386 -current (but not current :)

And with CVS HEAD of bind9 from today.

I built with --with-libxml2 --with-dlz-filesystem=yes --with-dlz-bdb=/usr/pkg

Running named immediately exits:

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 didn't report this to bind9-bugs yet.

What type of research do you want me to do with this? (Do you want me to 
report to a NetBSD list instead?)

  Jeremy C. Reed


More information about the bind-workers mailing list