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=0x633000) 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=0x62b000, td_wait=0x0, sigseqno=0) at /usr/src/lib/libpthread/thread/thr_kern.c:1843 #2 0x0000000801428078 in kse_sched_multi (kmbx=0x62ffa0) 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=0x633000) at pthread_md.h:226 226 if (ret == 0) { Current language: auto; currently c (gdb) bt #0 _thr_sched_switch_unlocked (curthread=0x633000) at pthread_md.h:226 #1 0x00000008014275e0 in _thr_sched_switch (curthread=0x633000) at /usr/src/lib/libpthread/thread/thr_kern.c:607 #2 0x000000080141acb4 in _pthread_join (pthread=0x74d000, thread_return=0x0) at /usr/src/lib/libpthread/thread/thr_join.c:133 #3 0x000000080071ad09 in ldap_pvt_thread_join (thread=0x80060a070, thread_return=0x62b068) 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=0x7fffffefef70) at /usr/src/lib/libpthread/thread/thr_sig.c:216 #2 0x0000000801427db5 in kse_sched_single (kmbx=0x7fffffefef70) 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?
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:23 UTC