From owner-freebsd-current@FreeBSD.ORG Sat Nov 20 02:55:54 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 4DDD316A4CE for ; Sat, 20 Nov 2004 02:55:54 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F87D43D45 for ; Sat, 20 Nov 2004 02:55:54 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 232C172DD4; Fri, 19 Nov 2004 18:55:54 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 2158872DCB; Fri, 19 Nov 2004 18:55:54 -0800 (PST) Date: Fri, 19 Nov 2004 18:55:54 -0800 (PST) From: Doug White To: Sean McNeil In-Reply-To: <1100753869.21798.74.camel@server.mcneil.com> Message-ID: <20041119184253.R49832@carver.gumbysoft.com> References: <1100657472.74795.2.camel@server.mcneil.com> <1100725008.21333.2.camel@server.mcneil.com> <1100753869.21798.74.camel@server.mcneil.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: Why won't slapd shutdown (kill -0)? 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: Sat, 20 Nov 2004 02:55:54 -0000 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@gumbysoft.com | www.FreeBSD.org