From sobomax@portaone.com  Tue Aug 16 19:19:16 2005
Return-Path: <sobomax@portaone.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4528316A41F;
	Tue, 16 Aug 2005 19:19:16 +0000 (GMT)
	(envelope-from sobomax@portaone.com)
Received: from www.portaone.com (web.portaone.com [195.70.151.35])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 43CF443D5D;
	Tue, 16 Aug 2005 19:19:13 +0000 (GMT)
	(envelope-from sobomax@portaone.com)
Received: from [192.168.0.49] (lesnik.portaone.com [195.140.246.50] (may be forged))
	(authenticated bits=0)
	by www.portaone.com (8.12.11/8.12.11) with ESMTP id j7GIoea1006057
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 16 Aug 2005 20:50:41 +0200 (CEST)
	(envelope-from sobomax@portaone.com)
Message-Id: <43023577.6080108@portaone.com>
Date: Tue, 16 Aug 2005 21:50:31 +0300
From: Maxim Sobolev <sobomax@portaone.com>
Reply-To: Maxim.Sobolev@portaone.com
To: hackers@FreeBSD.org, bms@FreeBSD.org, drosih@rpi.edu,
        Bill Paul <wpaul@FreeBSD.org>, John Baldwin <jhb@FreeBSD.org>,
        Alexander Timoshenko <gonzo@portaone.com>, bug-followup@FreeBSD.org
Subject: Network interrupt after shutdown method has been called [kern/62889]

>Number:         85005
>Category:       kern
>Synopsis:       Network interrupt after shutdown method has been called [relates to kern/62889?]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 16 19:20:07 GMT 2005
>Closed-Date:    Mon Mar 03 13:23:18 UTC 2008
>Last-Modified:  Mon Mar 03 13:23:18 UTC 2008
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 Folks,
 
 We experience a 100% reproducible panic on one of our machines during 
 shutdown+power off. We have found that it's caused by the interrupt 
 which happens in re(4) after re_shutdown() method has been called. Quick 
 googling reveals that we are not alone who experience this problem and 
 such condition sometimes happens as a result of interaction with the 
 particular ACPI implementation on shutdown+power off.
 
 Some FreeBSD network drivers have been patched to workaround for the 
 problem (i.e. vr(4), see kern/62889), but quick browsing through sources 
 suggests that majority still can be affected by the exactly the same 
 problem.
 
 Hence the question:
 
 Who is "guilty"? Can the network driver make an assumption that no 
 interrupt will happen after its foo_shutdown() has been called? Or such 
 assumption cannot be made? In the former case most of the network 
 drivers have to be fixed (usually by turning foo_shutdown() into a 
 wrapper to foo_detach() as with vr(4)), while in the latter the reason 
 of this stray irq should be investigated further and fixed where 
 appropriate.
 
 Any comments/ideas?
 
 -Maxim
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Aug 18 06:53:44 GMT 2005 
Responsible-Changed-Why:  
Rescue this PR from the 'pending' category. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85005 

From: Thiemo Nordenholz <list+infz4501jl1lohub@thiemo.net>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/85005: Network interrupt after shutdown method has been called [relates to kern/62889?]
Date: Mon, 12 Sep 2005 22:48:53 +0200

 Panic occurs also on a 5.4-STABLE as of Aug 25, and I suppose on a "current"
 STABLE, too.
 For easier finding when searching for a bug, I include the interesting part
 of the stacktrace:
 
 #25 0xc0494b52 in re_rxeof (sc=0xc1a72800) at ../../../dev/re/if_re.c:1624
 #26 0xc0494f71 in re_intr (arg=0xc1a72800) at ../../../dev/re/if_re.c:1860
 #27 0xc04e92c9 in ithread_loop (arg=0xc197b800)
     at ../../../kern/kern_intr.c:547
 #28 0xc04e855c in fork_exit (callout=0xc04e9178 <ithread_loop>, 
     arg=0xc197b800, frame=0xd41ecd38) at ../../../kern/kern_fork.c:791
 #29 0xc062891c in fork_trampoline () at ../../../i386/i386/exception.s:209
 
 Maybe one can backport the fix (marking the interface as down) from CURRENT
 to STABLE?
 
 Cheers,
   Thiemo
 
 -- 
 Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629.
 Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml
State-Changed-From-To: open->closed 
State-Changed-By: gavin 
State-Changed-When: Mon Mar 3 13:20:53 UTC 2008 
State-Changed-Why:  
Fixed in sys/dev/re/if_re.c 1.50, MFC'd to RELENG_6 before 6.1 was 
released. (brucec spotted this) 

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