From owner-freebsd-current@FreeBSD.ORG  Tue Oct 28 15:48:33 2003
Return-Path: <owner-freebsd-current@FreeBSD.ORG>
Delivered-To: freebsd-current@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 7586C16A4CE; Tue, 28 Oct 2003 15:48:33 -0800 (PST)
Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id B1ED243F93; Tue, 28 Oct 2003 15:48:32 -0800 (PST)
	(envelope-from dan@dan.emsphone.com)
Received: (from dan@localhost)
	by dan.emsphone.com (8.12.9/8.12.9) id h9SNmUFT046412;
	Tue, 28 Oct 2003 17:48:30 -0600 (CST)
	(envelope-from dan)
Date: Tue, 28 Oct 2003 17:48:29 -0600
From: Dan Nelson <dnelson@allantgroup.com>
To: John Baldwin <jhb@freebsd.org>
Message-ID: <20031028234825.GB2284@dan.emsphone.com>
References: <20031028224604.GA2284@dan.emsphone.com>
	<XFMail.20031028181207.jhb@FreeBSD.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <XFMail.20031028181207.jhb@FreeBSD.org>
X-OS: FreeBSD 5.1-CURRENT
X-message-flag: Outlook Error
User-Agent: Mutt/1.5.4i
cc: current@freebsd.org
Subject: Re: page fault in propagate_priority
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
	<freebsd-current.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>,
	<mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current>
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>,
	<mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Oct 2003 23:48:33 -0000

In the last episode (Oct 28), John Baldwin said:
> On 28-Oct-2003 Dan Nelson wrote:
> > I've gotten the following panic twice in the last few days.  I'm
> > pretty sure truss has something to do with it, since I just started
> > trussing something when it paniced.  No crashdumps unfortunately,
> > and the system locks up hard so I have to reset it.
> > 
> > The fault address is 0x24 so it looks like a null pointer
> > dereference of some sort.  I've added asserts to propagate_priority
> > any place a pointer to a structure is dereferenced, so if it
> > happens again I should have the line number at least.
> > 
> > panic1 was on an Oct 15 kernel, panic2 was on an Oct 27 kernel.
> 
> It might help some if you could use gdb -k on your kernel.debug and
> do 'l *propagate_priority+0x66' to see where it is dying.

Yes, definitely :)

(gdb) l *propagate_priority+0x66
0xc0575b36 is in propagate_priority (../../../kern/kern_mutex.c:178).
171    m = td->td_blocked;
172    MPASS(m != NULL);
173
174    /*
175     * Check if the thread needs to be moved up on
176     * the blocked chain
177     */
178    if (td == TAILQ_FIRST(&m->mtx_blocked)) {
179            continue;
180    }
181
182    td1 = TAILQ_PREV(td, threadqueue, td_lockq);

So I guess m was NULL here.  If I had INVARIANTS enabled, it would have
paniced at line 172.  Time to re-enable those kernel debug options :)

-- 
	Dan Nelson
	dnelson@allantgroup.com