Subject: Re: pthread assertion failure
To: Min Sik Kim <>
From: Christian Limpach <>
List: current-users
Date: 01/08/2004 18:21:14

> I encountered an assertion failure while I was packaging
> gnome-terminal-2.4.2.  gnome-terminal tests all possible charsets
> using iconv to figure out which ones are available.  After trying
> about 30 charsets, iconv_close() dumps core due to assertion failure
> in pthread codes.
> A *streamlined* version of gnome-terminal is at the end of this
> message.  It iterates over 32 charsets, calling iconv_open() and
> iconv_close() for each.

_citrus_mapper_close is dead locking (frames 9 and 5):
#0  0x4808c90b in kill () from /usr/lib/
#1  0x4806c5b4 in pthread__assertfunc (file=0xbf000000 "\001",
    line=-1090519040, function=0x48120014 "", expr=0x4806764e "[\201รย\215")
    at /devel/netbsd/src-current/lib/libpthread-ci1/pthread.c:1029
#2  0x480677d6 in pthread__next (self=0xbf000000)
    at /devel/netbsd/src-current/lib/libpthread-ci1/pthread_run.c:130
#3  0x48067660 in pthread__block (self=0xbf000000, queuelock=0x4810e024)
    at /devel/netbsd/src-current/lib/libpthread-ci1/pthread_run.c:104
#4  0x48066cb6 in pthread_rwlock_wrlock (rwlock=0x4810e020)
    at /devel/netbsd/src-current/lib/libpthread-ci1/pthread_rwlock.c:206
#5  0x480c2bc1 in _citrus_mapper_close (cm=0x804a460)
    at /devel/netbsd/src-current/lib/libc/citrus/citrus_mapper.c:377
#6  0x4812fafe in _citrus_mapper_parallel_mapper_getops ()
   from /usr/lib/i18n/
#7  0x4812fd0d in _citrus_mapper_parallel_mapper_getops ()
   from /usr/lib/i18n/
#8  0x480c271a in mapper_close (cm=0x804a420)
    at /devel/netbsd/src-current/lib/libc/citrus/citrus_mapper.c:194
#9  0x480c2c28 in _citrus_mapper_close (cm=0x804a420)
    at /devel/netbsd/src-current/lib/libc/citrus/citrus_mapper.c:386
#10 0x48121b10 in _citrus_iconv_std_iconv_getops ()
   from /usr/lib/i18n/
#11 0x48121ca5 in _citrus_iconv_std_iconv_getops ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/i18n/
#12 0x48122005 in _citrus_iconv_std_iconv_getops ()
   from /usr/lib/i18n/
#13 0x480b767a in close_shared (ci=0x804e340)
    at /devel/netbsd/src-current/lib/libc/citrus/citrus_iconv.c:140
#14 0x480b72d1 in release_shared (ci=0x804e340)
    at /devel/netbsd/src-current/lib/libc/citrus/citrus_iconv.c:311
#15 0x480b74f6 in _citrus_iconv_close (cv=0x804c090)
    at /devel/netbsd/src-current/lib/libc/citrus/citrus_iconv.c:377
#16 0x480a3646 in iconv_close () from /usr/lib/
#17 0x080488fa in main () at terminal.c:51
#18 0x08048612 in ___start ()