Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jan 2005 14:48:34 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: Deadlock under recent 6.0
Message-ID:  <200501061448.34992.jhb@FreeBSD.org>
In-Reply-To: <20041218221322.GA18557@xor.obsecurity.org>
References:  <20041218221322.GA18557@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 18 December 2004 05:13 pm, Kris Kennaway wrote:
> After updating it earlier this week, one of my SMP machines (with
> SCHED_4BSD) is regularly deadlocking under load; nothing is reported
> by WITNESS.  A sample process listing from DDB and some strack traces
> are as follows:
>
> db> ps
>   pid   proc     uid  ppid  pgrp  flag   stat  wmesg    wchan  cmd
> 83025 c8142dc8    0 83014 77576 0004000 [CPU 1] kldload

 [ snip, many threads blocked on Giant ]

>    12 c563e9d8    0     0     0 000020c [CPU 0] idle: cpu0
>    11 c563ebd0    0     0     0 000020c [Can run] idle: cpu1
>     1 c563edc8    0     0     1 0004200 [SLPQ wait 0xc563edc8][SLP] init
>    10 c5647000    0     0     0 0000204 [SLPQ ktrace 0xc074e818][SLP]
> ktrace 0 c074dd80    0     0     0 0000200 [SLPQ sched 0xc074dd80][SLP]
> swapper db> tr 83025
> Tracing pid 83025 tid 100398 td 0xc8145b80
> sched_switch(c0758848,c075f120,1,c0758848,c075f0e0) at sched_switch+0xfe
> w_data(e8721c73,8b01c783,75db851b,83d231d0,d08914c4) at w_data+0x16a8

Unless you are on CPU 1, you aren't going to get an accurate trace of that 
thread.  That thread is the one holding Giant, so it is the one that needs to 
be looked at.  If kldload is the thread that is always running across several 
different attempts at breaking into ddb, doing a ps, and then doing a 
continue, then I'd try to look for some kind of infinite loop while holding 
Giant.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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