NetBSD Problem Report #46587

From www@NetBSD.org  Mon Jun 11 16:12:53 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 536FB63B89C
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 11 Jun 2012 16:12:53 +0000 (UTC)
Message-Id: <20120611161252.640C463B882@www.NetBSD.org>
Date: Mon, 11 Jun 2012 16:12:52 +0000 (UTC)
From: roger.pau@citrix.com
Reply-To: roger.pau@citrix.com
To: gnats-bugs@NetBSD.org
Subject: Kernel panic on shutdown of bridge
X-Send-Pr-Version: www-1.0

>Number:         46587
>Category:       kern
>Synopsis:       Kernel panic on shutdown of bridge
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 11 16:15:00 +0000 2012
>Closed-Date:    Wed Aug 22 09:36:16 +0000 2012
>Last-Modified:  Wed Aug 22 09:36:16 +0000 2012
>Originator:     Roger Pau Monne
>Release:        6.0BETA2
>Organization:
Citrix
>Environment:
NetBSD test 6.0_BETA2 NetBSD 6.0_BETA2 (XEN3_DOM0) #0: Mon Jun 11 17:03:22 BST 2012  root@test:/root/obj/sys/arch/amd64/compile/XEN3_DOM0 amd64
>Description:
Kernel panics when doing a 'shutdown -r now' under a Xen Dom0, if a bridge interface is present:

bnx1: detached
Skipping crash dump on recursive panic
panic: kernel diagnostic assertion "c->c_magic == CALLOUT_MAGIC" failed: file "/usr/src/sys/kern/kern_timeout.c", line 385 
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff80224405 cs e030 rflags 246 cr2  7f7ff7091640 cpl 6 rsp ffffa000357236f0
Stopped in pid 20534.1 (reboot) at      netbsd:breakpoint+0x5:  leave
breakpoint() at netbsd:breakpoint+0x5
vpanic() at netbsd:vpanic+0x1f2
kern_assert() at netbsd:kern_assert+0xae
callout_reset() at netbsd:callout_reset+0x98
bnx_init() at netbsd:bnx_init+0x103
bnx_ioctl() at netbsd:bnx_ioctl+0xf0
if_flags_set() at netbsd:if_flags_set+0x96
ifpromisc() at netbsd:ifpromisc+0x33
bridge_delete_member() at netbsd:bridge_delete_member+0x39
bridge_ioctl_del() at netbsd:bridge_ioctl_del+0x28
bridge_ifdetach() at netbsd:bridge_ifdetach+0x57
ether_ifdetach() at netbsd:ether_ifdetach+0x19
bnx_detach() at netbsd:bnx_detach+0xaa
config_detach() at netbsd:config_detach+0xda
config_detach_all() at netbsd:config_detach_all+0x7d
cpu_reboot() at netbsd:cpu_reboot+0x139
sys_reboot() at netbsd:sys_reboot+0x73
syscall() at netbsd:syscall+0xc4
ds          64
es          3730
fs          100
gs          1200
rdi         0
rsi         deadbeef
rbp         ffffa000357236f0
rbx         4
rdx         0
rcx         8
rax         1
r8          ffffffff80c0e3c0    cpu_info_primary
r9          1
r10         0
r11         1
r12         ffffffff80a9dbd8    __link_set_malloc_types_sym_M_XDATA+0x600
r13         ffffa00035723730
r14         64
r15         80906910
rip         ffffffff80224405    breakpoint+0x5
cs          e030
rflags      246
rsp         ffffa000357236f0
ss          e02b
netbsd:breakpoint+0x5:  leave
db> 
>How-To-Repeat:
From a NetBSD Dom0 (amd64) with a bnx2 card create a bridge, and then reboot the system.
>Fix:

>Release-Note:

>Audit-Trail:
From: Joseph Jansen Gotis <jtgotis@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-amd64/46587
Date: Thu, 14 Jun 2012 19:29:34 +0800

 I get a similar panic also when shutting down with a bridge interface
 configured, but this is the GENERIC kernel.

 NetBSD hobbes.jansen.homenet 6.0_BETA2 NetBSD 6.0_BETA2 (GENERIC) #1:
 Tue Jun 12 21:19:08 PHT 2012
 root@hobbes.jansen.homenet:/mnt/sd2/obj/sys/arch/amd64/compile/GENERIC
 amd64

 sd2: detached
 sd1: detached
 cd0: detached
 atapibus0: detached
 inphy0: detached
 Skipping crash dump on recursive panic
 panic: kernel diagnostic assertion "c->c_magic == CALLOUT_MAGIC"
 failed: file "/usr/src/sys/kern/kern_timeout.c", line 427
 cpu0: Begin traceback...
 kern_assert() at netbsd:kern_assert+0x48
 callout_stop() at netbsd:callout_stop+0xb6
 fxp_stop() at netbsd:fxp_stop+0x29
 fxp_init() at netbsd:fxp_init+0x6e
 fxp_ioctl() at netbsd:fxp_ioctl+0x4d
 if_flags_set() at netbsd:if_flags_set+0x96
 ifpromisc() at netbsd:ifpromisc+0x33
 bridge_delete_member() at netbsd:bridge_delete_member+0x39
 bridge_ioctl_del() at netbsd:bridge_ioctl_del+0x28
 bridge_ifdetach() at netbsd:bridge_ifdetach+0x57
 ether_ifdetach() at netbsd:ether_ifdetach+0x19
 fxp_detach() at netbsd:fxp_detach+0x89
 fxp_pci_detach() at netbsd:fxp_pci_detach+0x26
 config_detach() at netbsd:config_detach+0xda
 config_detach_all() at netbsd:config_detach_all+0x7d
 cpu_reboot() at netbsd:cpu_reboot+0x142
 sys_reboot() at netbsd:sys_reboot+0x7d
 syscall() at netbsd:syscall+0xc4
 cpu0: End traceback...
 rebooting...

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46587 CVS commit: src/sys/net
Date: Tue, 17 Jul 2012 14:08:20 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Tue Jul 17 18:08:20 UTC 2012

 Modified Files:
 	src/sys/net: if_ethersubr.c

 Log Message:
 PR/46587: Roger Pau Monne: Prevent panic on shutdown on bridge teardown ->
 ifpromisc-> if_ioctl -> if_init. Idea from dyoung.
 XXX: Pullup to 6.


 To generate a diff of this commit:
 cvs rdiff -u -r1.189 -r1.190 src/sys/net/if_ethersubr.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46587 CVS commit: [netbsd-6] src/sys/net
Date: Mon, 20 Aug 2012 19:23:07 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Mon Aug 20 19:23:07 UTC 2012

 Modified Files:
 	src/sys/net [netbsd-6]: if_ethersubr.c

 Log Message:
 Pull up following revision(s) (requested by christos in ticket #517):
 	sys/net/if_ethersubr.c: revision 1.190
 PR/46587: Roger Pau Monne: Prevent panic on shutdown on bridge teardown ->
 ifpromisc-> if_ioctl -> if_init. Idea from dyoung.
 XXX: Pullup to 6.


 To generate a diff of this commit:
 cvs rdiff -u -r1.188.8.1 -r1.188.8.2 src/sys/net/if_ethersubr.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-amd64-maintainer->kern-bug-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 22 Aug 2012 06:37:22 +0000
Responsible-Changed-Why:
not machine-dependent


State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 22 Aug 2012 06:37:22 +0000
State-Changed-Why:
A fix was committed and pulled up; does it work for you?


From: Roger Pau Monne <roger.pau@citrix.com>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>
Cc: "kern-bug-people@netbsd.org" <kern-bug-people@netbsd.org>,
	"netbsd-bugs@netbsd.org" <netbsd-bugs@netbsd.org>, "gnats-admin@netbsd.org"
	<gnats-admin@netbsd.org>, "dholland@NetBSD.org" <dholland@NetBSD.org>
Subject: Re: kern/46587 (Kernel panic on shutdown of bridge)
Date: Wed, 22 Aug 2012 10:36:08 +0100

 Yes, the committed fix works for me.

 Thanks.

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 22 Aug 2012 09:36:16 +0000
State-Changed-Why:
Confirmed fixed, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.