From mjacob@FreeBSD.org  Fri Sep  1 22:22:47 2006
Return-Path: <mjacob@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 038EF16A4E5
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  1 Sep 2006 22:22:47 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 948A843DB6
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  1 Sep 2006 22:22:15 +0000 (GMT)
	(envelope-from mjacob@FreeBSD.org)
Received: from freefall.freebsd.org (mjacob@localhost [127.0.0.1])
	by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k81MM8um061797
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 1 Sep 2006 22:22:08 GMT
	(envelope-from mjacob@freefall.freebsd.org)
Received: (from mjacob@localhost)
	by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k81MM8Ha061796;
	Fri, 1 Sep 2006 22:22:08 GMT
	(envelope-from mjacob)
Message-Id: <200609012222.k81MM8Ha061796@freefall.freebsd.org>
Date: Fri, 1 Sep 2006 22:22:08 GMT
From: Matt Jacob <mjacob@FreeBSD.org>
Reply-To: Matt Jacob <mjacob@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: geom panics when devices go away
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102766
>Category:       kern
>Synopsis:       geom panics when devices go away
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 01 22:30:18 GMT 2006
>Closed-Date:    Sun Sep 10 09:19:18 GMT 2006
>Last-Modified:  Tue Sep 19 11:10:13 GMT 2006
>Originator:     Matt Jacob
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD 7.0-CURRENT #4: Thu Aug 31 22:21:34 PDT 2006 mjacob@colfax.in1.lcl:/home/FreeBSD/p4/newisp/i386/compile/GENERIC


I was starting to play with some failover stuff, and in the process of
doing so, I made some devices go away. The system panic'd in the fgoem stack.

It's hard to imagine a failover environment that would work w/o this
somehow being managed better. Not sure what the right answer here is
except that I don't believe that this should be swallowd at the SIM level.

There are other issues here as well to mull over as well.

isp0: LIP Received
isp0: Port Database Changed
isp0: Firmware State <Config Wait->Ready>
isp0: Our PortID 0x00006e N-Port Handle 66, Connection Topology 'Private Loop'
      WWNN 0x200000e08b18ead8 WWPN 0x210000e08b18ead8
isp0: PortID 0x0000cc N-port Handle 17 pdb_idx 17 role Target arrived at tgt 17
      WWNN 0x20000004cf00648f WWPN 0x22000004cf00648f
isp0: PortID 0x0000cb N-port Handle 18 pdb_idx 18 role Target arrived at tgt 18
      WWNN 0x20000004cf00202d WWPN 0x22000004cf00202d
isp0: PortID 0x0000ca N-port Handle 19 pdb_idx 19 role Target arrived at tgt 19
      WWNN 0x20000004cf0099b8 WWPN 0x22000004cf0099b8
isp0: PortID 0x0000c9 N-port Handle 20 pdb_idx 20 role Target stayed at tgt 20
      WWNN 0x20004250000000f7 WWPN 0x22004250000000f7
isp0: PortID 0x0000c7 N-port Handle 21 pdb_idx 21 role Target stayed at tgt 21
      WWNN 0x20000004cf021702 WWPN 0x22000004cf021702
(da2:isp0:0:19:0): READ(10). CDB: 28 0 2 5c 6 90 0 0 80 0
(da2:isp0:0:19:0): CAM Status: SCSI Status Error
(da2:isp0:0:19:0): SCSI Status: Check Condition
(da2:isp0:0:19:0): UNIT ATTENTION asc:29,1
(da2:isp0:0:19:0): Power on occurred field replaceable unit: 1
(da2:isp0:0:19:0): Retrying Command (per Sense Data)
(da2:isp0:0:19:0): SYNCHRONIZE CACHE. CDB: 35 0 0 0 0 0 0 0 0 0
(da2:isp0:0:19:0): NOT READY asc:4,1
(da2:isp0:0:19:0): Logical unit is in process of becoming ready field replaceable unit: 2
(da2:isp0:0:19:0): removing device entry
panic: detach with active requests
cpuid = 1
KDB: enter: panic
[thread pid 2 tid 100001 ]
Stopped at      kdb_enter+0x2b: nop
db> bt
Tracing pid 2 tid 100001 td 0xc1e8fd80
kdb_enter(c09279bb) at kdb_enter+0x2b
panic(c092272b,c21e6340,cba00cac,c258d1f4,c21e6340,...) at panic+0x127
g_detach(c21e6340,c23db180,c21e6340,0,cba00cbc,...) at g_detach+0x82
g_stripe_remove_disk(c21e6400,c2552380,cba00cd4,c066898e,c21e6340,...) at g_stripe_remove_disk+0x98
g_stripe_orphan(c21e6340,c2552380,3e8,0,cba00ce4,...) at g_stripe_orphan+0x31
g_orphan_register(c2552380) at g_orphan_register+0x6e
one_event(cba00d04,c066c12d,258,190,c066c0c0,...) at one_event+0xcf
g_run_events(258,190,c066c0c0,c066c0c0,cba00d24,...) at g_run_events+0x9
g_event_procbody(0,cba00d38) at g_event_procbody+0x6d
fork_exit(c066c0c0,0,cba00d38) at fork_exit+0xac
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xcba00d6c, ebp = 0 ---




>Description:
	
>How-To-Repeat:
	
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->pjd 
Responsible-Changed-By: pjd 
Responsible-Changed-When: Sat Sep 2 10:23:22 UTC 2006 
Responsible-Changed-Why:  
Take this PR. I still think such situations should be handled in 
GEOM, not in every single GEOM class. ehh. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102766 
State-Changed-From-To: open->closed 
State-Changed-By: pjd 
State-Changed-When: Sun Sep 10 09:18:09 UTC 2006 
State-Changed-Why:  
Fixed in HEAD. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/102766: commit references a PR
Date: Tue, 19 Sep 2006 11:08:07 +0000 (UTC)

 pjd         2006-09-19 11:07:59 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/geom             geom_event.c 
   Log:
   MFC:    sys/geom/geom_event.c   1.55
   
   Delay an orphan event if provider has still in-flight I/O requests.
   This way GEOM classes can safely detach from provider when an orphan
   event is received. This fixes 'detach with active requests' panic for
   gstripe/gconcat under load.
   
   PR:             kern/102766
   Submitted by:   mjacob
   OK'ed by:       phk
   Approved by:    re (mux)
   
   Revision  Changes    Path
   1.53.2.2  +4 -1      src/sys/geom/geom_event.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
