Why won't slapd shutdown (kill -0)?
Doug White
dwhite at gumbysoft.com
Fri Nov 19 18:55:54 PST 2004
On Wed, 17 Nov 2004, Sean McNeil wrote:
> > > It appears that all the threads are destroyed yet it is still in the
> > > thread processing loop. The process is no longer active at all. I just
> > > had a similar problem happen with vlc where I closed it yet it is
> > > hanging in the same place as slapd with all the threads gone.
> >
> > Interesting... what scheduler are you using?
>
> 4BSD with PREEMPTION on. -CURRENT as of yesterday. This has been an
> issue for quite some time now, however.
Fairly standard defaults then ...
> > > Here is the one from vlc:
> > >
> > > (gdb) bt full
> > > #0 _thr_sched_switch_unlocked (curthread=0x955000) at pthread_md.h:226
> >
> > I can't find a reference to this in that file. Can you run ldd against
> > your vlc binary? I('m curious what thread library it thinks its running.
>
> /usr/X11R6/bin/vlc:
> libpthread.so.1 => /usr/lib/libpthread.so.1 (0x801c7c000)
OK so not using libthr...
> I just ran it again and had a thread sitting at
> _thr_sched_switch_unlocked. Here is the trace for that thread:
>
> (gdb) bt
> #0 _thr_sched_switch_unlocked (curthread=0x1b38c00) at pthread_md.h:226
> #1 0x0000000801c8da8f in _nanosleep (time_to_sleep=0x7fffffe8df50,
> time_remaining=0x0)
> at /usr/src/lib/libpthread/thread/thr_nanosleep.c:71
> #2 0x0000000801c8dbd3 in __nanosleep (time_to_sleep=0x7fffffe8df50,
> time_remaining=0x0)
> at /usr/src/lib/libpthread/thread/thr_nanosleep.c:125
> #3 0x000000000042b1f9 in msleep (delay=34369437808) at
> src/misc/mtime.c:309
> #4 0x0000000806a51e02 in OSSThread (p_aout=0x1b38800) at oss.c:624
> #5 0x0000000801c87139 in thread_start (curthread=0x800940070,
> start_routine=0x94d068, arg=0x800940070)
> at /usr/src/lib/libpthread/thread/thr_create.c:343
> #6 0x0000000801df1ff4 in makectx_wrapper (ucp=0x800940060, func=0x6636,
> args=0x1) at /usr/src/lib/libc/amd64/gen/makecontext.c:100
Ah ha. I think we're on to something here. You didn't make it clear before
this is an amd64 machine, which is why I couldn't find the reference on
i386. :)
The argument to msleep looks like a 64-bit extension bug. The thread is
sleeping properly, just for a few thousand years or something :)
So the problems with slapd and vlc may just be 64-but uncleanliness.
Although slapd is wierd since it works fine on sparc64 under solaris 8 (we
run it at work) so I doubt that its something that silly.
--
Doug White | FreeBSD: The Power to Serve
dwhite at gumbysoft.com | www.FreeBSD.org
More information about the freebsd-current
mailing list