From nobody@FreeBSD.org  Sun Jul 24 19:35:16 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E56DF16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jul 2005 19:35:16 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 84BA043D45
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jul 2005 19:35:16 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j6OJZGYw076703
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jul 2005 19:35:16 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j6OJZGXW076702;
	Sun, 24 Jul 2005 19:35:16 GMT
	(envelope-from nobody)
Message-Id: <200507241935.j6OJZGXW076702@www.freebsd.org>
Date: Sun, 24 Jul 2005 19:35:16 GMT
From: Rui Paulo <rpaulo@NetBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: xl(4) lock held
X-Send-Pr-Version: www-2.3

>Number:         84014
>Category:       kern
>Synopsis:       [panic] xl(4) lock held
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 24 19:40:16 GMT 2005
>Closed-Date:    Fri Sep 02 17:49:14 GMT 2005
>Last-Modified:  Fri Sep 02 17:49:14 GMT 2005
>Originator:     Rui Paulo
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD quanta.internal.fnop.net 7.0-CURRENT FreeBSD 7.0-CURRENT #3: Sun Jul 24 02:35:06 WEST 2005 rpaulo@quanta:/usr/obj/usr/src/sys/GENERIC i386
if_xl.c revision 1.191

>Description:
I get the following panic on system bootup:

taskqueue_drain with the following non-sleepable locks held:
exclusive sleep mutex xl0 (network driver) r = 0 (0xc135e0a4) locked @ /usr/src/sys/pci/if_xl.c:2798
KDB: stack backtrace:
kdb_backtrace(1,c135e0c8,c135c000,c1265c00,c7224904) at kdb_backtrace+0x29
witness_warn(5,0,c08599d8,c135c000,c135c000) at witness_warn+0x18e
taskqueue_drain(c1265c00,c135e0c8,c135e0a4,1,c086ce7d,cc9) at taskqueue_drain+0x1a
xl_stop(c135c000,c135e0a4,1,c086ce7d,afb) at xl_stop+0x44
xl_init_locked(c135c000,c135e0a4,0,c086ce7d,aee) at xl_init_locked+0x33
xl_init(c135c000) at xl_init+0x26
ether_ioctl(c1348400,8020690c,c1443400,0,1) at ether_ioctl+0x64
xl_ioctl(c1348400,8020690c,c1443400,0,c1443400) at xl_ioctl+0x2be
in6_ifinit(c1348400,c1443400,c7224b1c,1,40) at in6_ifinit+0x90
in6_update_ifa(c1348400,c7224b0c,0) at in6_update_ifa+0x456
in6_ifattach_linklocal(c1348400,0) at in6_ifattach_linklocal+0xe5
in6_ifattach(c1348400,0,c135f400,0,0) at in6_ifattach+0xb9
in6_if_up(c1348400,c1348400,80206910,c13f68c0,0) at in6_if_up+0x13
if_route(c1348400,1,0,c7224c4c,c069740f) at if_route+0x55
if_up(c1348400) at if_up+0xf
ifhwioctl(80206910,c1348400,c13f68c0,c1334a80,c06438ff) at ifhwioctl+0x29b
ifioctl(c1460000,80206910,c13f68c0,c1334a80,0) at ifioctl+0xc3
soo_ioctl(c14161b0,80206910,c13f68c0,c1265100,c1334a80) at soo_ioctl+0x2db
ioctl(c1334a80,c7224d04,3,6,247) at ioctl+0x370
syscall(3b,3b,3b,4,1) at syscall+0x22f
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (54, FreeBSD ELF32, ioctl), eip = 0x280c6287, esp = 0xbfbfe56c, ebp = 0xbfbfe5b8 ---

I think the bug was introduced in revision 1.191:

revision 1.191
date: 2005/07/13 14:06:13;  author: glebius;  state: Exp;  lines: +2 -0
NET_LOCK_GIANT() when entering network code.

Pointy hat to:  glebius
Reported by:    rodrigc

It worked fine during RELENG_6 freeze, IIRC.

>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Tue Aug 9 11:04:54 GMT 2005 
Responsible-Changed-Why:  
My problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84014 
Responsible-Changed-From-To: glebius->jhb 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Thu Aug 18 19:27:47 GMT 2005 
Responsible-Changed-Why:  
John have fixed the problem. Bounce PR to him. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84014 
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Thu Aug 18 20:49:44 GMT 2005 
State-Changed-Why:  
Fixed in HEAD, will be merged in a few days to 6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84014 
State-Changed-From-To: patched->closed 
State-Changed-By: jhb 
State-Changed-When: Fri Sep 2 17:48:53 GMT 2005 
State-Changed-Why:  
Merged to 6.0. 

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