Subject: lib/19987: assert(0) in pthread__idle() triggered every now and then
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/22/2003 09:57:52
>Number:         19987
>Category:       lib
>Synopsis:       assert(0) in pthread__idle() triggered every now and then
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 21 15:59:00 PST 2003
>Originator:     Rene Hexel
>Release:        NetBSD 1.6M
System: NetBSD inspiron 1.6M NetBSD 1.6M (INSPIRON) #1: Tue Jan 21 11:27:28 EST 2003 rh@inspiron:/sys/arch/i386/compile/INSPIRON i386
Architecture: i386
Machine: i386
	I just tried compiling openoffice.  "idlc" (one of the tools
created by openoffice) fails every once in a while with the following
error message:

assertion "0" failed: file "/usr/src/lib/libpthread/pthread.c", line 341, function "pthread__idle"
Abort (core dumped)

	Through the jungle of openoffice dependencies, "idlc" links
against /usr/lib/, though it does not appear to create
any threads when it's running (though the whole structure of the
openoffice tools is a bit obscure, so I may be mistaken here).

	Typically, "idlc" compiles the .idl files just fine, but
every now and then (about once in several hundred runs) it appears
to get pre-empted by the scheduler and then fail by hitting the
assertion after sa_yield() in pthread__idle().

	Since gdb doesn't understand our threads implementation
yet, I cannot get a sensible backtrace, but I have made available
the binaries and a core dump available under

	Since this problem is timing-dependent and seems to occur
only when "idlc" gets preempted, this is probably difficult to
reproduce.  Trying to compile the pkgsrc version of openoffice under
-current has been a reliable way for me to reproduce this problem.

	Alternatively, please download the core dump and binaries
from the above web location.  Maybe someone with a more intimate
knowledge of scheduler activations and libpthread than I can make
something of the traces.