From nobody@FreeBSD.org  Mon Feb 16 21:38:17 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B701910656D1
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Feb 2009 21:38:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A43B78FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Feb 2009 21:38:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n1GLcHtk069500
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Feb 2009 21:38:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n1GLcHsb069499;
	Mon, 16 Feb 2009 21:38:17 GMT
	(envelope-from nobody)
Message-Id: <200902162138.n1GLcHsb069499@www.freebsd.org>
Date: Mon, 16 Feb 2009 21:38:17 GMT
From: Jari Kirma <kirma.at.cs.hut.fi@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: kernel panic in hfsc_dequeue
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         131753
>Category:       kern
>Synopsis:       [altq] [panic] kernel panic in hfsc_dequeue
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 16 21:40:02 UTC 2009
>Closed-Date:    
>Last-Modified:  Tue Feb 17 01:09:31 UTC 2009
>Originator:     Jari Kirma
>Release:        7.1-STABLE
>Organization:
Helsinki University of Technology
>Environment:
FreeBSD xxx 7.1-STABLE FreeBSD 7.1-STABLE #17: Sat Jan 31 12:09:54 EET 2009     xxx@xxx:/usr/obj/usr/src/sys/XXX  i386
>Description:
System (four-core Intel Q6600 with SMP kernel) crashes under load
(although relatively light load, thanks to only 2 Mbit outbound link) of
roughty hundred TCP connections somewhat reproducibly when HFSC ALTQ
traffic scheduling is used.

Only information seen about this is the dmesg message:

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x4
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc04641e7
stack pointer           = 0x28:0xe719ca68
frame pointer           = 0x28:0xe719caac
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 15 (swi4: clock sio)
trap number             = 12
panic: page fault

Where the instruction pointer points to inlined code inside hfsc_dequeue:

(gdb) l *(0xc04641e7)
0xc04641e7 is in hfsc_dequeue (altq_classq.h:113).
108             struct mbuf  *m, *m0;
109
110             if ((m = qtail(q)) == NULL)
111                     return (NULL);
112             if ((m0 = m->m_nextpkt) != m)
113                     m->m_nextpkt = m0->m_nextpkt;
114             else
115                     qtail(q) = NULL;
116             qlen(q)--;
117             m0->m_nextpkt = NULL;

Could it be just a simple locking issue in the linked list?
>How-To-Repeat:
Exact conditions are not known, but running lots of outbound TCP traffic over HFSC connection on a SMP system might trigger it.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Feb 17 01:09:02 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131753 
>Unformatted:
