Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Dec 2004 21:09:32 -0800
From:      Sean McNeil <sean@mcneil.com>
To:        current@freebsd.org
Subject:   need help understanding kse thread issue - signal lockup in slapd
Message-ID:  <1101964172.66579.12.camel@server.mcneil.com>

next in thread | raw e-mail | index | archive | help

--=-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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1101964172.66579.12.camel>