Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2000 12:43:11 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Andrea Campi <andrea@webcom.it>
Cc:        freebsd-current@FreeBSD.org
Subject:   RE: Panic in -current
Message-ID:  <XFMail.001128124311.jhb@FreeBSD.org>
In-Reply-To: <20001128094457.A345@webcom.it>

next in thread | previous in thread | raw e-mail | index | archive | help

On 28-Nov-00 Andrea Campi wrote:
> Latest (this night) current, no system activity:
> 
> panic: mutex Giant owned at ../../kern/kern_intr.c:238
> 
> I can sen you kernel conf if needed.
> 
> Is this known or should I invest some time to debug it?

Eek!  I haven't seen this.  If you can reproduce this, stick DDB, WITNESS, and
MUTEX_DEBUG in your kernel.  Then when you get to the ddb prompt, do a
'x __mtx_debug_Giant' followed by 'x/x,8 __mtx_debug_Giant' (to work around
weird bugs in ddb).  The last commad is a dump of Giant's mtx_debug structure:

struct mtx_debug {
        struct witness  *mtxd_witness;
        LIST_ENTRY(mtx) mtxd_held;
        const char      *mtxd_file;
        int             mtxd_line;
        const char      *mtxd_description;
};

We want mtxd_file and mtxd_line.  If you look at the output of the last
command, it will probably look something like this:

db> x/x,8 __mtx_debug_Giant
__mtx_debug_Giant:      c03303d8        0               cb6475ac  c02fdd2a
__mtx_debug_Giant+0x10: da              c02f97ad        0         0

The last number of the first line is the address of the string holding the
filename:

db> x/s 0xc02fdd2a
__set_sysinit_set_sym...: ../../i386/isa/ithread.c

The first number on the second line is the line number:

db> x/d __mtx_debug_Giant+0x10
__mtx_debug_Giant+0x10: 218

So in this case Giant was last acquired at line 218 of ../../i386/isa/ithread.c.

Finding out where Giant was last obtained will help with finding out where it
was supposed to be dropped but wasn't.

> Bye,
>       Andrea


-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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