Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jun 2008 16:23:17 +0400
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        freebsd-stable@freebsd.org
Subject:   FreeBSD 7-STABLE deadlock!
Message-ID:  <372651116.20080615162317@serebryakov.spb.ru>

next in thread | raw e-mail | index | archive | help
Hello, freebsd-stable.

  Sometimes my FreeBSD 7 machine becomes semi-dead: all network sttack
is working (pingable, etc), all LIVE processes are live, but it is
impossible to create new (and, it seems, EXIT finished) process.
  So, I can work in shell via SSH, if I have connection, but if I try
to run any external program session is lost for me -- it try to run it
forever, and ^C is not working. Same with "real" console. Same with
scripts -- if script working, it locks on next external command
forever and can not be killed with ^C.
  It is dual-core (E4500)-based comuter, amd64 arch. It have these
debug options in kernel:

options                DDB
options                KDB
options                KDB_UNATTENDED
options                INVARIANTS
options                INVARIANT_SUPPORT
options                WITNESS
options                DEBUG_MEMGUARD
options                WITNESS_KDB
options                MUTEX_DEBUG

  I have kernel debugger and here is some information (it is re-typed
from screen, so is not byte-to-byte exact output and I skipped long
64-bit addresses):

(1) show allpcpu
Current CPU: 1

cpuid = 0
curthread = <ADDRESS-1> pid 12: "idle: cpu0"
curpcb = <ADDRESS-2>
fpcurthread = none
idlethread = <ADDRESS-1> pid 12: "idle: cpu0"
spinlocks held:

cpuid = 1
curthread = <ADDRESS-3> pid 17: "swi6: Giant taskq"
curpcb = <ADDRESS-4>
fpcurthread = none
idlethread = <ADDRESS-5> pid 11: "idle: cpu1"
spinlocks held:

(2) show locks
exclusive sleep mutex Giant r = 0 (ADDRESS) locked @
/usr/src/sys/kern/kern_intr.c:1035

(3) show alllocks
process 723 (sshd) thread <ADDRESS> (TID)
exclusive sx so_rcv_sx r = 1 (ADDRESS) locked @
/usr/src/sys/kern/uipc_sockbuf.c:148
process 574 (nmdb) thread <ADDRESS> (TID)
exclusive sx user map r = 0 (ADDRESS) locked @
/usr/src/sys/vm/vm_map.c:3111
process 17 (swi6: Ginat taskq) thread <ADDRESS> (TID)
exclusive sleep mutex Giant r = 0 (ADDRESS) locked @
/usr/src/sys/kern/kern_intr.c:1035

(4) alltrace shows:

(a) I have MANY (about 20) sendmail processes (on
computer without mail traffic at all!), and all of them have
"VOP_LOCK1_AVP()" in trace, which leads to sched_switch() after some
steps, including _sleep().

(b) cron is sleeping with sched_switch() after vfork() (Oh!
Impossibility to create processes!)

(c) All other userland processes are traced up to sched_switch() from
different syscalls, via _sleep()...

 I don't reboot this computer for now, and waiting for requests which
 can help diagnose this situation :)

-- 
// Black Lion AKA Lev Serebryakov <lev@FreeBSD.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?372651116.20080615162317>