From nobody@FreeBSD.org  Wed Sep 28 13:55:49 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04CDC106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Sep 2011 13:55:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id CE9378FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Sep 2011 13:55:48 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p8SDtm4N050822
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Sep 2011 13:55:48 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p8SDtmAA050821;
	Wed, 28 Sep 2011 13:55:48 GMT
	(envelope-from nobody)
Message-Id: <201109281355.p8SDtmAA050821@red.freebsd.org>
Date: Wed, 28 Sep 2011 13:55:48 GMT
From: Martin Simmons <martin@lispworks.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Unkillable process hanging waiting for "exithold" when p_lock is 1
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         161097
>Category:       kern
>Synopsis:       [sched_ule] Unkillable process hanging waiting for "exithold" when p_lock is 1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 28 14:00:18 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Oct 10 04:52:50 UTC 2011
>Originator:     Martin Simmons
>Release:        7.4-RELEASE-p2
>Organization:
>Environment:
Self-build kernel from GENERIC conf + 1 tiny nfs patch
FreeBSD greig.cam.lispworks.com 7.4-RELEASE-p2 FreeBSD 7.4-RELEASE-p2 #0: Thu Sep 15 11:32:16 BST 2011     martin@greig.cam.lispworks.com:/usr/obj/usr/src/sys/LOCALGENERIC  i386

>Description:
A process, which should have exited, is hanging and procstat reports

  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
37462 37460 31946 31946     0   1 martin   exithold  FreeBSD ELF32 devel-gtk-shaken

procstat -k prints nothing for this process, but kgdb gives the following:

(kgdb) where
#0  sched_switch (td=0xc5e5d480, newtd=Variable "newtd" is not available.
) at /usr/src/sys/kern/sched_ule.c:1944
#1  0xc08246f6 in mi_switch (flags=Variable "flags" is not available.
) at /usr/src/sys/kern/kern_synch.c:444
#2  0xc085153b in sleepq_switch (wchan=Variable "wchan" is not available.
) at /usr/src/sys/kern/subr_sleepqueue.c:497
#3  0xc0851b86 in sleepq_wait (wchan=0xc62e5a08) at /usr/src/sys/kern/subr_sleepqueue.c:580
#4  0xc0824b79 in _sleep (ident=0xc62e5a08, lock=0xc62e58d0, priority=92, wmesg=0xc0bd061f "exithold", timo=0) at /usr/src/sys/kern/kern_synch.c:230
#5  0xc07f362b in exit1 (td=0xc5e5d480, rv=0) at /usr/src/sys/kern/kern_exit.c:208
#6  0xc07f4eed in sys_exit (td=Could not find the frame base for "sys_exit".
) at /usr/src/sys/kern/kern_exit.c:110
#7  0xc0b2a005 in syscall (frame=0xe7cf7d38) at /usr/src/sys/i386/i386/trap.c:1101
#8  0xc0b0d010 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:262
#9  0x00000033 in ?? ()
(kgdb) up 5
#5  0xc07f362b in exit1 (td=0xc5e5d480, rv=0) at /usr/src/sys/kern/kern_exit.c:208
208			msleep(&p->p_lock, &p->p_mtx, PWAIT, "exithold", 0);
(kgdb) p p->p_lock
$5 = 1 '\001'
(kgdb) 
>How-To-Repeat:
I don't know how to repeat it.  This process runs every night, but this
is the first time I've seen it hang like this.

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
