NetBSD Problem Report #52947

From kardel@pip.kardel.name  Wed Jan 24 18:34:24 2018
Return-Path: <kardel@pip.kardel.name>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 388237A0F8
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 24 Jan 2018 18:34:24 +0000 (UTC)
Message-Id: <20180124183416.3AB4DDA0D8D@pip.kardel.name>
Date: Wed, 24 Jan 2018 19:34:16 +0100 (CET)
From: kardel@netbsd.org
Reply-To: kardel@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: panic: kernel diagnostic assertion "mutex_owned(softnet_lock)" failed: file /usr/src/sys/netinet6/nd6_rtr.c", line 2223
X-Send-Pr-Version: 3.95

>Number:         52947
>Category:       kern
>Synopsis:       panic: kernel diagnostic assertion "mutex_owned(softnet_lock)" failed: file /usr/src/sys/netinet6/nd6_rtr.c", line 2223
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    ozaki-r
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 24 18:35:00 +0000 2018
>Closed-Date:    Tue Feb 06 01:56:02 +0000 2018
>Last-Modified:  Tue Feb 06 01:56:02 +0000 2018
>Originator:     Frank Kardel
>Release:        NetBSD 8.99.12
>Organization:

>Environment:


System: NetBSD pip.kardel.name 8.99.12 NetBSD 8.99.12 (PIPGEN) #2: Tue Jan 23 23:25:08 CET 2018 kardel@pip:/usr/src/obj.amd64/sys/arch/amd64/compile/PIPGEN amd64
Architecture: x86_64
Machine: amd64
>Description:
	During shutdown with IPv6 configured vlan0 interface the assertion is triggered.
	Hand copied stacktrace
	nd6_rt_flush()
	nd6_defrtrlist_del()
	nd6_purge()
	in6_ifdetach()
	vlan_unconfig_locked()
	vlan_ifdetach()
	ether_ifdetach()
	wm_detach()
	config_detach()
	config_detach_all()
	cpu_reboot()
	sys_reboot()
	syscall()

>How-To-Repeat:
	Configure a vlan interface with IPv6 addresses on vlanX with wmX as parent.
	Perform shutdown -> panic on non NET_MPSAFE kernel.
>Fix:
	n/a

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->ozaki-r
Responsible-Changed-By: ozaki-r@NetBSD.org
Responsible-Changed-When: Thu, 25 Jan 2018 10:04:11 +0000
Responsible-Changed-Why:
take


From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52947 CVS commit: src/sys/netinet6
Date: Fri, 26 Jan 2018 06:37:21 +0000

 Module Name:	src
 Committed By:	ozaki-r
 Date:		Fri Jan 26 06:37:21 UTC 2018

 Modified Files:
 	src/sys/netinet6: nd6_rtr.c

 Log Message:
 Revert "Get rid of unnecessary splsoftnet" (v1.133)

 It's not always true that softnet_lock is held these places.
 See PR kern/52947.


 To generate a diff of this commit:
 cvs rdiff -u -r1.136 -r1.137 src/sys/netinet6/nd6_rtr.c

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

State-Changed-From-To: open->feedback
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Fri, 26 Jan 2018 06:52:27 +0000
State-Changed-Why:
Fixed in -current. Can you try it?


State-Changed-From-To: feedback->closed
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Fri, 26 Jan 2018 07:33:24 +0000
State-Changed-Why:
The reporter confirmed the fix. Thanks!


From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@NetBSD.org, ozaki-r@NetBSD.org, netbsd-bugs@netbsd.org,
 gnats-admin@netbsd.org
Cc: 
Subject: Re: kern/52947 (panic: kernel diagnostic assertion
 "mutex_owned(softnet_lock)" failed: file /usr/src/sys/netinet6/nd6_rtr.c",
 line 2223)
Date: Fri, 26 Jan 2018 08:30:42 +0100

 shutdown now works again without panic.

 Thanks for the fix.

 PR can be closed.


 On 01/26/18 07:52, ozaki-r@NetBSD.org wrote:
 > Synopsis: panic: kernel diagnostic assertion "mutex_owned(softnet_lock)" failed: file /usr/src/sys/netinet6/nd6_rtr.c", line 2223
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: ozaki-r@NetBSD.org
 > State-Changed-When: Fri, 26 Jan 2018 06:52:27 +0000
 > State-Changed-Why:
 > Fixed in -current. Can you try it?
 >
 >
 >

State-Changed-From-To: closed->pending-pullups
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Fri, 02 Feb 2018 02:13:03 +0000
State-Changed-Why:
pullup needed. [pullup-8 #528]


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52947 CVS commit: [netbsd-8] src/sys
Date: Mon, 5 Feb 2018 14:55:16 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Feb  5 14:55:16 UTC 2018

 Modified Files:
 	src/sys/kern [netbsd-8]: subr_workqueue.c
 	src/sys/net [netbsd-8]: if.c route.c
 	src/sys/net/agr [netbsd-8]: if_agr.c if_agrether.c if_agrsubr.c
 	    if_agrsubr.h
 	src/sys/netinet6 [netbsd-8]: nd6.c nd6_rtr.c
 	src/sys/netipsec [netbsd-8]: ipsec.c ipsec_input.c

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #528):
 	sys/net/agr/if_agr.c: revision 1.42
 	sys/netinet6/nd6_rtr.c: revision 1.137
 	sys/netinet6/nd6_rtr.c: revision 1.138
 	sys/net/agr/if_agr.c: revision 1.46
 	sys/net/route.c: revision 1.206
 	sys/net/if.c: revision 1.419
 	sys/net/agr/if_agrether.c: revision 1.10
 	sys/netinet6/nd6.c: revision 1.241
 	sys/netinet6/nd6.c: revision 1.242
 	sys/netinet6/nd6.c: revision 1.243
 	sys/netinet6/nd6.c: revision 1.244
 	sys/netinet6/nd6.c: revision 1.245
 	sys/netipsec/ipsec_input.c: revision 1.52
 	sys/netipsec/ipsec_input.c: revision 1.53
 	sys/net/agr/if_agrsubr.h: revision 1.5
 	sys/kern/subr_workqueue.c: revision 1.35
 	sys/netipsec/ipsec.c: revision 1.124
 	sys/net/agr/if_agrsubr.c: revision 1.11
 	sys/net/agr/if_agrsubr.c: revision 1.12
 Simplify; share agr_vlan_add and agr_vlan_del (NFCI)
 Fix late NULL-checking (CID 1427782: Null pointer dereferences (REVERSE_INULL))
 KNF: replace soft tabs with hard tabs
 Add missing NULL-checking for m_pullup (CID 1427770: Null pointer dereferences (NULL_RETURNS))
 Add locking.
 Revert "Get rid of unnecessary splsoftnet" (v1.133)
 It's not always true that softnet_lock is held these places.
 See PR kern/52947.
 Get rid of unnecessary splsoftnet (redo)
 Unless NET_MPSAFE, splsoftnet is still needed for rt_* functions.
 Use existing fill_[pd]rlist() functions to calculate size of buffer to
 allocate, rather than relying on an arbitrary length passed in from
 userland.
 Allow copyout() of partial results if the user buffer is too small, to
 be consistent with the way sysctl(3) is documented.
 Garbage-collect now-unused third parrameter in the fill_[pd]rlist()
 functions.
 As discussed on IRC.
 OK kamil@ and christos@
 XXX Needs pull-up to netbsd-8 branch.
 Simplify, from christos@
 More simplification, this time from ozaki-r@
 No need to break after return.
 One more from christos@
 No need to initialize fill_func
 more cleanup (don't allow oldlenp == NULL)
 Destroy ifq_lock at the end of if_detach
 It still can be used in if_detach.
 Prevent rt_free_global.wk from being enqueued to workqueue doubly
 Check if a queued work is tried to be enqueued again, which is not allowed


 To generate a diff of this commit:
 cvs rdiff -u -r1.33.30.1 -r1.33.30.2 src/sys/kern/subr_workqueue.c
 cvs rdiff -u -r1.394.2.6 -r1.394.2.7 src/sys/net/if.c
 cvs rdiff -u -r1.194.6.5 -r1.194.6.6 src/sys/net/route.c
 cvs rdiff -u -r1.41.6.1 -r1.41.6.2 src/sys/net/agr/if_agr.c
 cvs rdiff -u -r1.9 -r1.9.46.1 src/sys/net/agr/if_agrether.c
 cvs rdiff -u -r1.10 -r1.10.10.1 src/sys/net/agr/if_agrsubr.c
 cvs rdiff -u -r1.4 -r1.4.124.1 src/sys/net/agr/if_agrsubr.h
 cvs rdiff -u -r1.232.2.5 -r1.232.2.6 src/sys/netinet6/nd6.c
 cvs rdiff -u -r1.135.6.1 -r1.135.6.2 src/sys/netinet6/nd6_rtr.c
 cvs rdiff -u -r1.99.2.2 -r1.99.2.3 src/sys/netipsec/ipsec.c
 cvs rdiff -u -r1.43.2.1 -r1.43.2.2 src/sys/netipsec/ipsec_input.c

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

State-Changed-From-To: pending-pullups->closed
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Tue, 06 Feb 2018 01:56:02 +0000
State-Changed-Why:
Pulled up.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.