Bug 161097 - [sched_ule] Unkillable process hanging waiting for "exithold" when p_lock is 1
Summary: [sched_ule] Unkillable process hanging waiting for "exithold" when p_lock is 1
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.4-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2011-09-28 15:00 UTC by martin
Modified: 2019-06-12 23:49 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description martin 2011-09-28 15:00:18 UTC
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'

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.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:44 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Hans Petter Selasky freebsd_committer 2019-04-10 18:24:06 UTC
This appears to be known race, which won't be fixed for 7.4.