NetBSD Problem Report #20214
Received: (qmail 25664 invoked by uid 605); 5 Feb 2003 14:58:41 -0000
Message-Id: <20030205145834.40A701A1@compaq.cms.tecmath.com>
Date: Wed, 5 Feb 2003 15:58:34 +0100 (CET)
From: joachim@cms.tecmath.com
Sender: gnats-bugs-owner@netbsd.org
Reply-To: joachim@cms.tecmath.com
To: gnats-bugs@gnats.netbsd.org
Subject: building pkgsrc/databases/py-bsddb3 throws libpthread assertion
X-Send-Pr-Version: 3.95
>Number: 20214
>Category: lib
>Synopsis: building pkgsrc/databases/py-bsddb3 throws libpthread assertion
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 05 14:59:01 +0000 2003
>Closed-Date: Thu Apr 17 08:05:24 +0000 2003
>Last-Modified: Thu Apr 17 08:10:00 +0000 2003
>Originator: Joachim Koenig-Baltes
>Release: NetBSD 1.6N
>Organization:
>Environment:
System: NetBSD compaq 1.6N NetBSD 1.6N (JOACHIM_ISDN) #0: Mon Feb 3 11:36:17 CET 2003 joachim@compaq:/usr/src/sys/arch/i386/compile/JOACHIM_ISDN i386
Architecture: i386
Machine: i386
>Description:
trying to build pkgsrc/databases/py-bsddb3 with python2.2 with native pthreads
throws an assertion and leads to an endless loop in the python interpreter
>How-To-Repeat:
% cd /usr/pkgsrc/database/py-bsddb3; make
=> Checksum OK for bsddb3-4.1.1.tar.gz.
===> Extracting for py22-bsddb3-4.1.1nb1
===> Required installed package db4>=4.0.14: db4-4.0.14 found
===> Required installed package python22>=2.2: python22-2.2.2 found
===> Patching for py22-bsddb3-4.1.1nb1
===> Applying pkgsrc patches for py22-bsddb3-4.1.1nb1
===> Buildlinking for py22-bsddb3-4.1.1nb1
===> Configuring for py22-bsddb3-4.1.1nb1
===> Building for py22-bsddb3-4.1.1nb1
(cd /user/unix/work/NetBSD-current/pkgsrc/databases/py-bsddb3/work.i386/bsddb3-4.1.1 && /usr/bin/env USETOOLS=no MAKECONF=/dev/null USETOOLS="no" OBJECT_FMT="ELF" LDFLAGS=" -Wl,-R/usr/pkg/lib -L/usr/pkg/lib" PATH=/user/unix/work/NetBSD-current/pkgsrc/databases/py-bsddb3/work.i386/.buildlink/bin:/root/bin:/usr/X11R6/bin:/usr/pkg/sbin:/usr/sbin:/sbin:/home/joachim/bin:/usr/local/share/sbin:/usr/local/share/bin:/usr/local/sbin:/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin:/usr/pkg/bin:/usr/X11R6/bin PREFIX=/usr/pkg LOCALBASE=/usr/pkg X11BASE=/usr/X11R6 CFLAGS="-O2 -I/usr/pkg/include" CPPFLAGS=" -I/usr/pkg/include" FFLAGS="-O" X11PREFIX=/usr/pkg BSD_INSTALL_PROGRAM="install -c -s -o root -g wheel -m 555" BSD_INSTALL_SCRIPT="install -c -o root -g wheel -m 555" BSD_INSTALL_DATA="install -c -o root -g wheel -m 444" BSD_INSTALL_MAN="install -c -o root -g wheel -m 444" BSD_INSTALL="install" BSD_INSTALL_PROGRAM_DIR="insta
ll -d -o root -g wheel -m 555" BSD_INSTALL_SCRIPT_DIR="install -d -o root -g wheel -m 555" BSD_INSTALL_DATA_DIR="install -d -o root -g wheel -m 555" BSD_INSTALL_MAN_DIR="install -d -o root -g wheel -m 555" PKG_SYSCONFDIR="/usr/pkg/etc" BUILDLINK_DIR="/user/unix/work/NetBSD-current/pkgsrc/databases/py-bsddb3/work.i386/.buildlink" BUILDLINK_X11_DIR="/user/unix/work/NetBSD-current/pkgsrc/databases/py-bsddb3/work.i386/.buildlink-x11" BUILDLINK_CACHE_ALL=yes BUILDLINK_CPPFLAGS="-I/usr/pkg/include" BUILDLINK_LDFLAGS="-L/usr/pkg/lib -Wl,-R/usr/pkg/lib" CC="cc" CXX="c++" LD="ld" /usr/pkg/bin/python2.2 setup.py --berkeley-db=/usr/pkg build)
assertion "next != 0" failed: file "/user/unix/work/NetBSD-current/src/lib/libpthread/pthread_run.c", line 118, function "pthread__next"
----------
the process then consumes 100% cpu.
>Fix:
no idea
>Release-Note:
>Audit-Trail:
From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: joachim@cms.tecmath.com
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/20214: building pkgsrc/databases/py-bsddb3 throws libpthread
assertion
Date: Wed, 05 Feb 2003 18:44:22 +0100
joachim@cms.tecmath.com said:
> trying to build pkgsrc/databases/py-bsddb3 with python2.2 with native
> pthreads throws an assertion
I can confirm that there is a problem.
> leads to an endless loop in the python interpreter
In my case it dumped core. So I'll append a stacktrace in case it
helps debugging.
There are still more issues with Python and native threads. Stacksize
is a serious problem (python-2.1's regex test triggers this).
With python-2.2, test_gettext just made the interpreter hanging in "sawait".
That's the reason why pkgsrc still uses GNU pth for python.
best regards
Matthias
(gdb) bt
#0 0x48144207 in kill () from /usr/lib/libc.so.12
#1 0x146 in ?? ()
#2 0x4818ba96 in __assert13 () from /usr/lib/libc.so.12
#3 0x480fa538 in pthread__next (self=0x481009e0)
at /usr/src/lib/libpthread/pthread_run.c:117
#4 0x480fa474 in pthread__block (self=0x481009e0, queuelock=0x481cac04)
at /usr/src/lib/libpthread/pthread_run.c:94
#5 0x480f9c64 in pthread_rwlock_wrlock (rwlock=0x481cac00)
at /usr/src/lib/libpthread/pthread_rwlock.c:197
#6 0x48174693 in setenv () from /usr/lib/libc.so.12
#7 0x48149cab in putenv () from /usr/lib/libc.so.12
#8 0x809d39c in PyOS_AfterFork ()
#9 0x80c8395 in PyCFunction_Call ()
[...]
From: Joachim Koenig-Baltes <joachim@cms.tecmath.com>
To: Matthias Drochner <M.Drochner@fz-juelich.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/20214: building pkgsrc/databases/py-bsddb3 throws libpthread assertion
Date: Thu, 6 Feb 2003 10:00:23 +0100
On Wed, Feb 05, 2003 at 06:44:22PM +0100, Matthias Drochner wrote:
> In my case it dumped core. So I'll append a stacktrace in case it
> helps debugging.
So I attached gdb to the process for a stacktrace too:
(gdb) bt
#0 0x315b455c in ?? ()
#1 0x480fd52c in pthread_spinlock () from /usr/lib/libpthread.so.0
#2 0x480fa01e in pthread__sched_sleepers () from /usr/lib/libpthread.so.0
#3 0x480f9ce1 in pthread_rwlock_unlock () from /usr/lib/libpthread.so.0
#4 0x481abb73 in fflush () from /usr/lib/libc.so.12
#5 0x48178f9d in _cleanup () from /usr/lib/libc.so.12
#6 0x481b1c18 in abort () from /usr/lib/libc.so.12
#7 0x48184606 in __assert13 () from /usr/lib/libc.so.12
#8 0x480f9ec4 in pthread__next () from /usr/lib/libpthread.so.0
#9 0x480f9e04 in pthread__block () from /usr/lib/libpthread.so.0
#10 0x480f9705 in pthread_rwlock_wrlock () from /usr/lib/libpthread.so.0
#11 0x4816ea9b in setenv () from /usr/lib/libc.so.12
#12 0x48147513 in putenv () from /usr/lib/libc.so.12
#13 0x809d384 in PyOS_AfterFork ()
#14 0x80c837d in PyCFunction_Call ()
#15 0x8076ed3 in _PyExc_Fini ()
#16 0x8077ec8 in PyEval_EvalCodeEx ()
#17 0x80bc844 in PyFunction_New ()
#18 0x80abf90 in PyObject_Call ()
#19 0x80b16a8 in PyInstance_New ()
#20 0x80abf90 in PyObject_Call ()
[...]
Joachim
Responsible-Changed-From-To: lib-bug-people->jdolecek
Responsible-Changed-By: jdolecek
Responsible-Changed-When: Thu Feb 6 02:07:49 PST 2003
Responsible-Changed-Why:
I'll look on this.
State-Changed-From-To: open->analyzed
State-Changed-By: jdolecek
State-Changed-When: Thu Feb 6 02:14:17 PST 2003
State-Changed-Why:
I can repeat the problem, looking at why it happens.
From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/20214 CVS commit: pkgsrc/lang/python22
Date: Thu, 6 Feb 2003 23:03:00 +0200 (EET)
Module Name: pkgsrc
Committed By: drochner
Date: Thu Feb 6 21:02:59 UTC 2003
Modified Files:
pkgsrc/lang/python22: Makefile
Log Message:
revert previous, adding some comments
Before using native pthreads per default, we should make sure it is
at least stable enough for the Python selftests and pkgsrc applications.
(in response to PR pkg/20214)
To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 pkgsrc/lang/python22/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->feedback
State-Changed-By: jdolecek
State-Changed-When: Mon Mar 10 13:43:27 PST 2003
State-Changed-Why:
The problem doesn't happen for me with up-to-date kernel, libc, libpthread.
Can you confirm the problem is gone, too?
State-Changed-From-To: feedback->closed
State-Changed-By: darcy
State-Changed-When: Thu Apr 17 07:47:51 UTC 2003
State-Changed-Why:
Received the following from the originator:
yes, the problem is gone. I already reported it to Mathias Drochner after
some significant changes to the pthread implementation by Jason and Nathan.
I also responded to a request by Julio Merino (not sure if it was really
him and I unfortunately have no copies of my mails from this period).
So, the problem is gone now (even if you enable native pthread support
in python22, which has been disabled since).
Please close the PR,
thanks,
Joachim
From: "D'Arcy J.M. Cain" <darcy@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/20214 CVS commit: pkgsrc/lang/python22
Date: Thu, 17 Apr 2003 08:09:04 +0000 (UTC)
Module Name: pkgsrc
Committed By: darcy
Date: Thu Apr 17 08:09:04 UTC 2003
Modified Files:
pkgsrc/lang/python22: Makefile
Log Message:
Remove comment about PR lib/20214 (libpthread assertion failure triggered
by py-bsddb3) since the PR has been closed. Two other issues remain.
To generate a diff of this commit:
cvs rdiff -r1.13 -r1.14 pkgsrc/lang/python22/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.