From owner-freebsd-current@FreeBSD.ORG Thu Dec 2 05:09:34 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 548C816A4CE for ; Thu, 2 Dec 2004 05:09:34 +0000 (GMT) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0501E43D54 for ; Thu, 2 Dec 2004 05:09:34 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id B64D4F2148 for ; Wed, 1 Dec 2004 21:09:33 -0800 (PST) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (server.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02063-03 for ; Wed, 1 Dec 2004 21:09:32 -0800 (PST) Received: from mcneil.com (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id 50AF3F1802 for ; Wed, 1 Dec 2004 21:09:32 -0800 (PST) From: Sean McNeil To: current@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-hob8gqayCul+gKbYYmeY" Date: Wed, 01 Dec 2004 21:09:32 -0800 Message-Id: <1101964172.66579.12.camel@server.mcneil.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 FreeBSD GNOME Team Port X-Virus-Scanned: by amavisd-new at mcneil.com Subject: need help understanding kse thread issue - signal lockup in slapd X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2004 05:09:34 -0000 --=-hob8gqayCul+gKbYYmeY Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I'm trying to figure out why slapd hangs on shutdown for my amd64 system. It use to exit just fine, but for quite a while now it hangs: /usr/local/etc/rc.d/slapd.sh stop and it just sits there even though it is pretty much closed down. I see 3 threads that appear to be running: (gdb) info thr * 3 LWP 100272 0x000000080142f914 in kse_release () at kse_release.S:2 2 Thread 8 (sleeping) _thr_sched_switch_unlocked (curthread=3D0x633000) at pthread_md.h:226 1 Thread 7 (LWP 100134) 0x000000080142f914 in kse_release () at kse_release.S:2 0x000000080142f914 in kse_release () at kse_release.S:2 2 RSYSCALL(kse_release) (gdb) bt #0 0x000000080142f914 in kse_release () at kse_release.S:2 #1 0x0000000801429e49 in kse_wait (kse=3D0x62b000, td_wait=3D0x0, sigseqno=3D0) at /usr/src/lib/libpthread/thread/thr_kern.c:1843 #2 0x0000000801428078 in kse_sched_multi (kmbx=3D0x62ffa0) at /usr/src/lib/libpthread/thread/thr_kern.c:1039 #3 0x000000080142bfbf in _amd64_enter_uts () at /usr/src/lib/libpthread/arch/amd64/amd64/enter_uts.S:40 [Switching to thread 2 (Thread 8 (sleeping))]#0 _thr_sched_switch_unlocked ( curthread=3D0x633000) at pthread_md.h:226 226 if (ret =3D=3D 0) { Current language: auto; currently c (gdb) bt #0 _thr_sched_switch_unlocked (curthread=3D0x633000) at pthread_md.h:226 #1 0x00000008014275e0 in _thr_sched_switch (curthread=3D0x633000) at /usr/src/lib/libpthread/thread/thr_kern.c:607 #2 0x000000080141acb4 in _pthread_join (pthread=3D0x74d000, thread_return=3D0x0) at /usr/src/lib/libpthread/thread/thr_join.c:133 #3 0x000000080071ad09 in ldap_pvt_thread_join (thread=3D0x80060a070, thread_return=3D0x62b068) at thr_posix.c:165 [Switching to thread 1 (Thread 7 (LWP 100134))]#0 0x000000080142f914 in kse_release () at kse_release.S:2 2 RSYSCALL(kse_release) Current language: auto; currently asm (gdb) bt #0 0x000000080142f914 in kse_release () at kse_release.S:2 #1 0x000000080141e926 in sig_daemon (arg=3D0x7fffffefef70) at /usr/src/lib/libpthread/thread/thr_sig.c:216 #2 0x0000000801427db5 in kse_sched_single (kmbx=3D0x7fffffefef70) at /usr/src/lib/libpthread/thread/thr_kern.c:902 #3 0x0000000000000000 in ?? () Error accessing memory address 0x7fffffeff000: Bad address. Looks like thread 3 is the scheduling thread, thread 1 is the main thread and got the signal but for some reason thread 2 is still waiting to join a thread that isn't there anymore (0x74d000 - Thread 8?). Does anyone have any ideas? If a thread is created joinable, then it should not go away until someone actually joins it, no? --=-hob8gqayCul+gKbYYmeY Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBrqOMyQsGN30uGE4RAtkpAJ9aYw1dG9U+mKKS0a7tCS7Xgm/FHQCdFRnN 17W82CTk2llF+7HVaaWlp54= =HWUy -----END PGP SIGNATURE----- --=-hob8gqayCul+gKbYYmeY--