From owner-freebsd-scsi@FreeBSD.ORG Mon Dec 10 11:07:12 2007 Return-Path: Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1054B16A4E0 for ; Mon, 10 Dec 2007 11:07:12 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F317513C457 for ; Mon, 10 Dec 2007 11:07:11 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lBAB7Bn2073481 for ; Mon, 10 Dec 2007 11:07:11 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBAB7BWr073477 for freebsd-scsi@FreeBSD.org; Mon, 10 Dec 2007 11:07:11 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 Dec 2007 11:07:11 GMT Message-Id: <200712101107.lBAB7BWr073477@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-scsi@FreeBSD.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2007 11:07:12 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/40895 scsi wierd kernel / device driver bug o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o kern/60598 scsi wire down of scsi devices conflicts with config o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 o kern/81887 scsi [aac] Adaptec SCSI 2130S aac0: GetDeviceProbeInfo comm o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/93128 scsi [sym] FreeBSD 6.1 BETA 1 has problems with Symbios/LSI o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/99954 scsi [ahc] reading from DVD failes on 6.x (regression) o kern/110847 scsi [ahd] Tyan U320 onboard problem with more than 3 disks 15 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce o kern/38828 scsi [feature request] DPT PM2012B/90 doesn't work o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/114597 scsi [sym] System hangs at SCSI bus reset with dual HBAs 5 problems total. From owner-freebsd-scsi@FreeBSD.ORG Tue Dec 11 14:58:26 2007 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5126716A418 for ; Tue, 11 Dec 2007 14:58:26 +0000 (UTC) (envelope-from user-7164946.91b0cf-1@xing.com) Received: from mail.openbc.com (mail.openbc.com [213.238.59.16]) by mx1.freebsd.org (Postfix) with ESMTP id 06B0F13C4D3 for ; Tue, 11 Dec 2007 14:58:25 +0000 (UTC) (envelope-from user-7164946.91b0cf-1@xing.com) Received: by obc-crn42-2.rz.epublica.de (Postfix, from userid 1000) id BB03B4A997; Tue, 11 Dec 2007 15:58:17 +0100 (CET) From: "=?UTF-8?Q?MUSTAFA_MESUT_NEB=c4=b0O=c4=9eLU?=" To: "" X-UBounce: U2FsdGVkX18ZHwcMrvsUYMasO4Q3ZOXZeKFZn5sSxk_bbWCZAAIgMA|1 X-UBounceID: 14160689.95868e MIME-Version: 1.0 Message-Id: <20071211145824.BB03B4A997@obc-crn42-2.rz.epublica.de> Date: Tue, 11 Dec 2007 15:58:17 +0100 (CET) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: =?utf-8?b?WElORyBhxJ/EsW1hIGRhdmV0?= X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?UTF-8?Q?MUSTAFA_MESUT_NEB=c4=b0O=c4=9eLU?= List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 14:58:26 -0000 Merhaba, Sizi XING çevreme davet etmek isterim! Kararlar sözkonusu olduğunda ilişkiler gittikçe daha çok önem kazanıyor. XING üzerinden ilişkileri güncel tutmak, geliştirmek ve onlardan yararlanmak çok kolay. İlişkilerim arasında sizi de görebilirsem memnun olurum. Candan selamlar MUSTAFA MESUT NEBİOĞLU ----------------------------------------------------------------------- MUSTAFA MESUT NEBİOĞLU sizi XING platformundaki ağına davet ediyor: http://www.xing.com/go/inv/14160689.11560a Artık XING davetiyesi almak istemiyorum: http://www.xing.com/go/opt_out_invite/U2FsdGVkX18e4SB_mG7xsVDOhaxiirWoz2neRS5En9VKqgvVo7WpOg From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 00:53:17 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B7F016A474 for ; Wed, 12 Dec 2007 00:53:17 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 382A113C45D for ; Wed, 12 Dec 2007 00:53:17 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id DFBE861B046; Tue, 11 Dec 2007 16:53:16 -0800 (PST) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08936-06; Tue, 11 Dec 2007 16:53:16 -0800 (PST) Received: from [10.0.0.40] (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id 4443061B032; Tue, 11 Dec 2007 16:53:16 -0800 (PST) From: Sean Bruno To: nate@root.org Content-Type: text/plain Date: Tue, 11 Dec 2007 16:53:15 -0800 Message-Id: <1197420795.2738.6.camel@iago.office.miralink.com> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 (2.12.2-2.fc8) Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Dec 11 16:53:16 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 475f30fc110587852419847 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: freebsd-scsi@freebsd.org Subject: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 00:53:17 -0000 While I was debugging some random stuff with the firewire target, I noted the following witness lock: http://www.consultcsg.com/scsitarget_witness.txt It looks like there is some kind of conflict between the locks in sys/cam/scsi/scsi_target.c and the kern environment locks? I'm fairly certain that this is an easy fix, but I just don't see how to work around it. Sean From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 02:17:29 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C7EB16A417 for ; Wed, 12 Dec 2007 02:17:29 +0000 (UTC) (envelope-from simokawa@freebsd.org) Received: from mail4.ecc.u-tokyo.ac.jp (mail3.ecc.u-tokyo.ac.jp [133.11.205.99]) by mx1.freebsd.org (Postfix) with ESMTP id C165A13C46B for ; Wed, 12 Dec 2007 02:17:28 +0000 (UTC) (envelope-from simokawa@freebsd.org) Received: from mail0.ecc.u-tokyo.ac.jp (mail0.ecc.u-tokyo.ac.jp [133.11.50.199]) by mail4.ecc.u-tokyo.ac.jp (Postfix) with ESMTP id 0904B5B1669 for ; Wed, 12 Dec 2007 10:32:20 +0900 (JST) Received: from spam001.ecc.u-tokyo.ac.jp (spam001.ecc.u-tokyo.ac.jp [133.11.50.194]) by mail0.ecc.u-tokyo.ac.jp (Postfix) with ESMTP id 611491C58003 for ; Wed, 12 Dec 2007 10:32:18 +0900 (JST) Received: from maru5.nunu.org (157.82.169.72 [157.82.169.72]) by spam001.ecc.u-tokyo.ac.jp (SpamBlock.pst 3.4.102) with ESMTP id <86sl28snpe.wl%simokawa@FreeBSD.ORG> for ; Wed, 12 Dec 2007 10:31:41 +0900 Date: Wed, 12 Dec 2007 10:31:41 +0900 Message-ID: <86sl28snpe.wl%simokawa@FreeBSD.ORG> From: Hidetoshi Shimokawa To: Sean Bruno In-Reply-To: <1197420795.2738.6.camel@iago.office.miralink.com> References: <1197420795.2738.6.camel@iago.office.miralink.com> User-Agent: Wanderlust/2.15.2 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd5.4) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-IP: 157.82.169.72 X-FROM-DOMAIN: freebsd.org X-FROM-EMAIL: simokawa@freebsd.org X-SPAM-MARK: by Spam Filter Rule Cc: freebsd-scsi@freebsd.org, freebsd-firewire@freebsd.org, nate@root.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 02:17:29 -0000 Hi Sean, At Tue, 11 Dec 2007 16:53:15 -0800, Sean Bruno wrote: > > While I was debugging some random stuff with the firewire target, I > noted the following witness lock: > > http://www.consultcsg.com/scsitarget_witness.txt > > It looks like there is some kind of conflict between the locks in > sys/cam/scsi/scsi_target.c and the kern environment locks? I'm fairly > certain that this is an easy fix, but I just don't see how to work > around it. > > Sean This a patch I sent Scott several months ago. It may help you. (this is for -current at that time) /\ Hidetoshi Shimokawa \/ simokawa@FreeBSD.ORG Subject: scsi_target and WITNESS From: Hidetoshi Shimokawa Date: Fri, 01 Jun 2007 11:57:50 +0900 Message-ID: <86vee8pej5.wl%simokawa@FreeBSD.ORG> Hi Scott, scsi_target seems to have several problems with WITNESS and MPSAFE sim. I applied the following patch to workaround recurse/sleep/pagefault problems. I think you should have a better fix. ============================================= (cd /usr/src && patch -p6) < diff_to_current ============================================= --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_target.c 2007/04/15 08:53:22 +++ //depot/user/simokawa/firewire_lock/sys/cam/scsi/scsi_target.c 2007/05/21 14:31:55 @@ -372,10 +372,14 @@ int retval; softc = (struct targ_softc *)kn->kn_hook; +#if 0 cam_periph_lock(softc->periph); +#endif retval = !TAILQ_EMPTY(&softc->user_ccb_queue) || !TAILQ_EMPTY(&softc->abort_queue); +#if 0 cam_periph_unlock(softc->periph); +#endif return (retval); } @@ -585,12 +589,12 @@ cam_periph_unlock(softc->periph); break; default: - cam_periph_lock(softc->periph); if ((func_code & XPT_FC_QUEUED) != 0) { CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("Sending queued ccb %#x (%p)\n", func_code, user_ccb)); descr = targgetdescr(softc); + cam_periph_lock(softc->periph); descr->user_ccb = user_ccb; descr->priority = priority; descr->func_code = func_code; @@ -601,6 +605,7 @@ CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("Sending inline ccb %#x (%p)\n", func_code, user_ccb)); + cam_periph_lock(softc->periph); ccb = targgetccb(softc, func_code, priority); descr = (struct targ_cmd_descr *) ccb->ccb_h.targ_descr; @@ -762,7 +767,9 @@ && ((ccb_h->flags & CAM_DIR_MASK) != CAM_DIR_NONE)) || (ccb_h->func_code == XPT_DEV_MATCH))) { + cam_periph_unlock(softc->periph); error = cam_periph_mapmem(ccb, mapinfo); + cam_periph_lock(softc->periph); /* * cam_periph_mapmem returned an error, we can't continue. @@ -966,13 +973,16 @@ int ccb_len; ccb_len = targccblen(type); + /* XXX */ + cam_periph_unlock(softc->periph); MALLOC(ccb, union ccb *, ccb_len, M_TARG, M_WAITOK); + ccb->ccb_h.targ_descr = targgetdescr(softc); + cam_periph_lock(softc->periph); CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("getccb %p\n", ccb)); xpt_setup_ccb(&ccb->ccb_h, softc->path, priority); ccb->ccb_h.func_code = type; ccb->ccb_h.cbfcnp = targdone; - ccb->ccb_h.targ_descr = targgetdescr(softc); return (ccb); } @@ -1099,6 +1109,7 @@ static void notify_user(struct targ_softc *softc) { + mtx_assert(softc->periph->sim->mtx, MA_OWNED); /* * Notify users sleeping via poll(), kqueue(), and * blocking read(). From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 02:18:55 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4217316A419; Wed, 12 Dec 2007 02:18:55 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 1E3CD13C468; Wed, 12 Dec 2007 02:18:54 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id A82F661B012; Tue, 11 Dec 2007 18:18:54 -0800 (PST) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06578-06; Tue, 11 Dec 2007 18:18:53 -0800 (PST) Received: from [10.47.1.50] (vpn.office.miralink.com [10.0.0.5]) by plato.miralink.com (Postfix) with ESMTP id 8F65161B006; Tue, 11 Dec 2007 18:18:53 -0800 (PST) From: Sean Bruno To: Hidetoshi Shimokawa In-Reply-To: <86sl28snpe.wl%simokawa@FreeBSD.ORG> References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> Content-Type: text/plain Date: Tue, 11 Dec 2007 18:15:59 -0800 Message-Id: <1197425759.14437.0.camel@home-desk> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 (2.12.2-2.fc8) Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Dec 11 18:18:54 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 475f450e260141804284693 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: freebsd-scsi@freebsd.org, freebsd-firewire@freebsd.org, nate@root.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 02:18:55 -0000 > --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_target.c 2007/04/15 08:53:22 > +++ //depot/user/simokawa/firewire_lock/sys/cam/scsi/scsi_target.c 2007/05/21 14:31:55 > @@ -372,10 +372,14 @@ > int retval; > > softc = (struct targ_softc *)kn->kn_hook; > +#if 0 > cam_periph_lock(softc->periph); > +#endif > retval = !TAILQ_EMPTY(&softc->user_ccb_queue) || > !TAILQ_EMPTY(&softc->abort_queue); > +#if 0 > cam_periph_unlock(softc->periph); > +#endif > return (retval); > } Are these two "if 0"'s supposed to be commented out? I'm leaving this out of my RELENG_6 test for now unless you say otherwise. Sean From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 02:37:15 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A24F16A417 for ; Wed, 12 Dec 2007 02:37:15 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by mx1.freebsd.org (Postfix) with ESMTP id E5B8D13C442 for ; Wed, 12 Dec 2007 02:37:14 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: by py-out-1112.google.com with SMTP id u77so147238pyb.3 for ; Tue, 11 Dec 2007 18:37:13 -0800 (PST) Received: by 10.142.131.18 with SMTP id e18mr17039wfd.207.1197427032495; Tue, 11 Dec 2007 18:37:12 -0800 (PST) Received: by 10.142.224.12 with HTTP; Tue, 11 Dec 2007 18:37:12 -0800 (PST) Message-ID: <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> Date: Wed, 12 Dec 2007 11:37:12 +0900 From: "Hidetoshi Shimokawa" Sender: freebsd@gm.nunu.org To: "Sean Bruno" In-Reply-To: <1197425759.14437.0.camel@home-desk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> X-Google-Sender-Auth: e0f3cb1d7a16183e Cc: freebsd-scsi@freebsd.org, freebsd-firewire@freebsd.org, nate@root.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 02:37:15 -0000 On 12/12/07, Sean Bruno wrote: > > --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_target.c 2007/04/15 08:53:22 > > +++ //depot/user/simokawa/firewire_lock/sys/cam/scsi/scsi_target.c 2007/05/21 14:31:55 > > @@ -372,10 +372,14 @@ > > int retval; > > > > softc = (struct targ_softc *)kn->kn_hook; > > +#if 0 > > cam_periph_lock(softc->periph); > > +#endif > > retval = !TAILQ_EMPTY(&softc->user_ccb_queue) || > > !TAILQ_EMPTY(&softc->abort_queue); > > +#if 0 > > cam_periph_unlock(softc->periph); > > +#endif > > return (retval); > > } > Are these two "if 0"'s supposed to be commented out? I'm leaving this > out of my RELENG_6 test for now unless you say otherwise. > > > Sean Yes, it is same as comment out. The patch was for RELENG_7 or current. I'm not sure about RELENG_6. -- /\ Hidetoshi Shimokawa \/ simokawa@FreeBSD.ORG From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 03:33:02 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A66C16A498; Wed, 12 Dec 2007 03:33:02 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3AA13C467; Wed, 12 Dec 2007 03:33:01 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id BA92161B012; Tue, 11 Dec 2007 19:33:01 -0800 (PST) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25746-01; Tue, 11 Dec 2007 19:32:58 -0800 (PST) Received: from [10.47.1.50] (vpn.office.miralink.com [10.0.0.5]) by plato.miralink.com (Postfix) with ESMTP id 624D661B006; Tue, 11 Dec 2007 19:32:58 -0800 (PST) Message-ID: <475F5669.1010800@miralink.com> Date: Tue, 11 Dec 2007 19:32:57 -0800 From: Sean Bruno User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Hidetoshi Shimokawa References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> In-Reply-To: <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Dec 11 19:32:59 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 475f566b300065260519334 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: freebsd-scsi@freebsd.org, freebsd-firewire@freebsd.org, nate@root.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 03:33:02 -0000 Hidetoshi Shimokawa wrote: > On 12/12/07, Sean Bruno wrote: > >>> --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_target.c 2007/04/15 08:53:22 >>> +++ //depot/user/simokawa/firewire_lock/sys/cam/scsi/scsi_target.c 2007/05/21 14:31:55 >>> @@ -372,10 +372,14 @@ >>> int retval; >>> >>> softc = (struct targ_softc *)kn->kn_hook; >>> +#if 0 >>> cam_periph_lock(softc->periph); >>> +#endif >>> retval = !TAILQ_EMPTY(&softc->user_ccb_queue) || >>> !TAILQ_EMPTY(&softc->abort_queue); >>> +#if 0 >>> cam_periph_unlock(softc->periph); >>> +#endif >>> return (retval); >>> } >>> >> Are these two "if 0"'s supposed to be commented out? I'm leaving this >> out of my RELENG_6 test for now unless you say otherwise. >> >> >> Sean >> > > Yes, it is same as comment out. > The patch was for RELENG_7 or current. I'm not sure about RELENG_6. > > Ok, I merged the patch(RELENG_6) to the best of my ability. The system now panics and has the same witness error. panic/witness/trace --> http://consultcsg.com/scsitarget_witness.txt scsi_target.c diff --> http://consultcsg.com/scsi_target.c.diff Sean From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 19:22:39 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9BE616A41A; Wed, 12 Dec 2007 19:22:39 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id B713013C4D5; Wed, 12 Dec 2007 19:22:39 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id 664AC61B020; Wed, 12 Dec 2007 11:22:39 -0800 (PST) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20073-07; Wed, 12 Dec 2007 11:22:38 -0800 (PST) Received: from iago.office.miralink.com (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id 89DAC61AE1A; Wed, 12 Dec 2007 11:22:38 -0800 (PST) Message-ID: <476034FE.7080003@miralink.com> Date: Wed, 12 Dec 2007 11:22:38 -0800 From: Sean Bruno User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Hidetoshi Shimokawa References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> <475F5669.1010800@miralink.com> In-Reply-To: <475F5669.1010800@miralink.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Dec 12 11:22:39 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 476034ff325261592213743 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: freebsd-scsi@freebsd.org, freebsd-firewire@freebsd.org, nate@root.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 19:22:40 -0000 Alrighty, a little cleaner patch to allow sbp_targ.c to acutally work under RELENG_6. http://www.consultcsg.com/RELENG_6.diff Also and update with the witness error. And the kernel config I am using: http://www.consultcsg.com/scsitarget_witness.txt http://www.consultcsg.com/FIREWIRE_TGT Is scsi_target the only application that is making this kern env witness error appear? I find it hard to believe that nothing else in the code base hits this type of problem? Sean From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 20:54:38 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1E9E16A420 for ; Wed, 12 Dec 2007 20:54:38 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id 802D913C45B for ; Wed, 12 Dec 2007 20:54:37 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 38716 invoked from network); 12 Dec 2007 20:27:54 -0000 Received: from 209-128-117-003.bayarea.net (HELO ?10.0.8.5?) (nate-mail@209.128.117.3) by root.org with ESMTPA; 12 Dec 2007 20:27:54 -0000 Message-ID: <4760446D.2060102@root.org> Date: Wed, 12 Dec 2007 12:28:29 -0800 From: Nate Lawson User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Sean Bruno References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> <475F5669.1010800@miralink.com> <476034FE.7080003@miralink.com> In-Reply-To: <476034FE.7080003@miralink.com> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Hidetoshi Shimokawa , freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 20:54:38 -0000 Sean Bruno wrote: > Alrighty, a little cleaner patch to allow sbp_targ.c to acutally work > under RELENG_6. http://www.consultcsg.com/RELENG_6.diff > > Also and update with the witness error. And the kernel config I am using: > http://www.consultcsg.com/scsitarget_witness.txt > http://www.consultcsg.com/FIREWIRE_TGT > > Is scsi_target the only application that is making this kern env witness > error appear? I find it hard to believe that nothing else in the code > base hits this type of problem? Apparently scsi_target wasn't fully tested when the CAM locking went in. It was written before there was a design for CAM locking so it may need some reworking. For example, it assumes that it should acquire/drop locks multiple times in its start method if there are multiple CCBs queued. That may not be the fastest way, depending on contention for the SIM lock. -- Nate From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 20:54:49 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EA9816A418; Wed, 12 Dec 2007 20:54:49 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 1726013C45B; Wed, 12 Dec 2007 20:54:48 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id 1C23261B04A; Wed, 12 Dec 2007 12:54:48 -0800 (PST) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18731-10; Wed, 12 Dec 2007 12:54:46 -0800 (PST) Received: from iago.office.miralink.com (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id D76CD61AD83; Wed, 12 Dec 2007 12:54:46 -0800 (PST) Message-ID: <47604A96.6020401@miralink.com> Date: Wed, 12 Dec 2007 12:54:46 -0800 From: Sean Bruno User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Nate Lawson References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> <475F5669.1010800@miralink.com> <476034FE.7080003@miralink.com> <4760446D.2060102@root.org> In-Reply-To: <4760446D.2060102@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Dec 12 12:54:47 2007 X-DSPAM-Confidence: 0.7829 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 47604a97113741592213743 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, AWL=-0.000, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: Hidetoshi Shimokawa , freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 20:54:49 -0000 Nate Lawson wrote: > Sean Bruno wrote: > >> Alrighty, a little cleaner patch to allow sbp_targ.c to acutally work >> under RELENG_6. http://www.consultcsg.com/RELENG_6.diff >> >> Also and update with the witness error. And the kernel config I am using: >> http://www.consultcsg.com/scsitarget_witness.txt >> http://www.consultcsg.com/FIREWIRE_TGT >> >> Is scsi_target the only application that is making this kern env witness >> error appear? I find it hard to believe that nothing else in the code >> base hits this type of problem? >> > > Apparently scsi_target wasn't fully tested when the CAM locking went in. > It was written before there was a design for CAM locking so it may need > some reworking. For example, it assumes that it should acquire/drop > locks multiple times in its start method if there are multiple CCBs > queued. That may not be the fastest way, depending on contention for > the SIM lock. > > Hmmm...I just applied(ripped off!) a RELENG_7 modifed version of kern_environment.c that uses non-sleepable mutex's and the witness went away. http://www.consultcsg.com/kern_env.diff It appears that you are on to something Nate with regard to the CAM locking. scsi_target appears to be blocking on a call to cam_periph_lock(): http://www.consultcsg.com/cam_periph_lock.txt Hidetoshi suggested a patch that I will now apply and retest: http://consultcsg.com/scsi_target.c.diff I do however, get a kernel panic when trying to exit from scsi_target via ctrl-c http://www.consultcsg.com/knlist_lock.txt Sean P.S. Is the URL based logging working better than a cut/paste into the email for everyone? From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 21:42:51 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B21D016A419 for ; Wed, 12 Dec 2007 21:42:51 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 44FA213C455 for ; Wed, 12 Dec 2007 21:42:50 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lBCLgkWO016721; Wed, 12 Dec 2007 14:42:47 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <476055BF.90808@samsco.org> Date: Wed, 12 Dec 2007 14:42:23 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Nate Lawson References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> <475F5669.1010800@miralink.com> <476034FE.7080003@miralink.com> <4760446D.2060102@root.org> In-Reply-To: <4760446D.2060102@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 12 Dec 2007 14:42:47 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.4 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 21:42:51 -0000 Nate Lawson wrote: > Sean Bruno wrote: >> Alrighty, a little cleaner patch to allow sbp_targ.c to acutally work >> under RELENG_6. http://www.consultcsg.com/RELENG_6.diff >> >> Also and update with the witness error. And the kernel config I am using: >> http://www.consultcsg.com/scsitarget_witness.txt >> http://www.consultcsg.com/FIREWIRE_TGT >> >> Is scsi_target the only application that is making this kern env witness >> error appear? I find it hard to believe that nothing else in the code >> base hits this type of problem? > > Apparently scsi_target wasn't fully tested when the CAM locking went in. Yep, hate to say it, it dropped off my radar. Sorry. > It was written before there was a design for CAM locking so it may need > some reworking. For example, it assumes that it should acquire/drop > locks multiple times in its start method if there are multiple CCBs > queued. That may not be the fastest way, depending on contention for > the SIM lock. > I've found that grabbing+dropping a lock in a loop is really, really bad for performance critical paths. The cost of the atomic ops is trivial, but the cost of contention is huge. The same is true of grabbing and dropping locks in a long linear path. Imagine driving down a street with a lot of stoplights, and each stoplight is sensor-triggered by cross traffic. Even if cross-traffic is light and you only have to stop for one light, and that one light is really short, you still loose a lot of time from slowing down and then speeding back up. You could imagine that it would be a lot faster to have all lights stay green for you. Scott From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 21:45:04 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52B2A16A417 for ; Wed, 12 Dec 2007 21:45:04 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id E5EED13C459 for ; Wed, 12 Dec 2007 21:45:03 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lBCLj0Mq016746; Wed, 12 Dec 2007 14:45:00 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <47605645.70509@samsco.org> Date: Wed, 12 Dec 2007 14:44:37 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Sean Bruno References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> <475F5669.1010800@miralink.com> In-Reply-To: <475F5669.1010800@miralink.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 12 Dec 2007 14:45:00 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.4 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: nate@root.org, freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 21:45:04 -0000 Sean Bruno wrote: > Hidetoshi Shimokawa wrote: >> On 12/12/07, Sean Bruno wrote: >> >>>> --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_target.c >>>> 2007/04/15 08:53:22 >>>> +++ >>>> //depot/user/simokawa/firewire_lock/sys/cam/scsi/scsi_target.c >>>> 2007/05/21 14:31:55 >>>> @@ -372,10 +372,14 @@ >>>> int retval; >>>> >>>> softc = (struct targ_softc *)kn->kn_hook; >>>> +#if 0 >>>> cam_periph_lock(softc->periph); >>>> +#endif >>>> retval = !TAILQ_EMPTY(&softc->user_ccb_queue) || >>>> !TAILQ_EMPTY(&softc->abort_queue); >>>> +#if 0 >>>> cam_periph_unlock(softc->periph); >>>> +#endif >>>> return (retval); >>>> } >>>> >>> Are these two "if 0"'s supposed to be commented out? I'm leaving this >>> out of my RELENG_6 test for now unless you say otherwise. >>> >>> >>> Sean >>> >> >> Yes, it is same as comment out. >> The patch was for RELENG_7 or current. I'm not sure about RELENG_6. >> >> > Ok, I merged the patch(RELENG_6) to the best of my ability. The system > now panics and has the same witness error. > > panic/witness/trace --> http://consultcsg.com/scsitarget_witness.txt > scsi_target.c diff --> http://consultcsg.com/scsi_target.c.diff > CAM locking in RELENG_6 is completely different from locking in RELENG_7. I'm not saying that your problems are imaginary, just pointing out that any problems in 6.x are going to almost certainly be completely different from problems in 7.x. I'll look at both. Scott From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 12 21:45:50 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCFF116A417 for ; Wed, 12 Dec 2007 21:45:50 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8DB13C442 for ; Wed, 12 Dec 2007 21:45:50 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lBCLjlRR016766; Wed, 12 Dec 2007 14:45:47 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <47605674.5060600@samsco.org> Date: Wed, 12 Dec 2007 14:45:24 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Hidetoshi Shimokawa References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> In-Reply-To: <86sl28snpe.wl%simokawa@FreeBSD.ORG> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 12 Dec 2007 14:45:47 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.4 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org, freebsd-firewire@freebsd.org, nate@root.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 21:45:50 -0000 Hidetoshi Shimokawa wrote: > Hi Sean, > > At Tue, 11 Dec 2007 16:53:15 -0800, > Sean Bruno wrote: >> While I was debugging some random stuff with the firewire target, I >> noted the following witness lock: >> >> http://www.consultcsg.com/scsitarget_witness.txt >> >> It looks like there is some kind of conflict between the locks in >> sys/cam/scsi/scsi_target.c and the kern environment locks? I'm fairly >> certain that this is an easy fix, but I just don't see how to work >> around it. >> >> Sean > > This a patch I sent Scott several months ago. > It may help you. (this is for -current at that time) Dang, sorry I forgot about this. I'll try to review it today. If I drop it again, please don't hesitate to just commit it. Scott From owner-freebsd-scsi@FreeBSD.ORG Thu Dec 13 17:37:03 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA67916A418; Thu, 13 Dec 2007 17:37:03 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 8F41713C45B; Thu, 13 Dec 2007 17:37:03 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id 2891A61B15C; Thu, 13 Dec 2007 09:37:03 -0800 (PST) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24668-02; Thu, 13 Dec 2007 09:36:57 -0800 (PST) Received: from iago.office.miralink.com (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id C7BB761B14C; Thu, 13 Dec 2007 09:36:57 -0800 (PST) Message-ID: <47616DB9.3070100@miralink.com> Date: Thu, 13 Dec 2007 09:36:57 -0800 From: Sean Bruno User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Scott Long References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> <475F5669.1010800@miralink.com> <47605645.70509@samsco.org> In-Reply-To: <47605645.70509@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Thu Dec 13 09:36:58 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 47616dba15041109565483 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: nate@root.org, freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 17:37:04 -0000 Scott Long wrote: > Sean Bruno wrote: >> Hidetoshi Shimokawa wrote: >>> On 12/12/07, Sean Bruno wrote: >>> >>>>> --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_target.c >>>>> 2007/04/15 08:53:22 >>>>> +++ >>>>> //depot/user/simokawa/firewire_lock/sys/cam/scsi/scsi_target.c >>>>> 2007/05/21 14:31:55 >>>>> @@ -372,10 +372,14 @@ >>>>> int retval; >>>>> >>>>> softc = (struct targ_softc *)kn->kn_hook; >>>>> +#if 0 >>>>> cam_periph_lock(softc->periph); >>>>> +#endif >>>>> retval = !TAILQ_EMPTY(&softc->user_ccb_queue) || >>>>> !TAILQ_EMPTY(&softc->abort_queue); >>>>> +#if 0 >>>>> cam_periph_unlock(softc->periph); >>>>> +#endif >>>>> return (retval); >>>>> } >>>>> >>>> Are these two "if 0"'s supposed to be commented out? I'm leaving this >>>> out of my RELENG_6 test for now unless you say otherwise. >>>> >>>> >>>> Sean >>>> >>> >>> Yes, it is same as comment out. >>> The patch was for RELENG_7 or current. I'm not sure about RELENG_6. >>> >>> >> Ok, I merged the patch(RELENG_6) to the best of my ability. The >> system now panics and has the same witness error. >> >> panic/witness/trace --> http://consultcsg.com/scsitarget_witness.txt >> scsi_target.c diff --> http://consultcsg.com/scsi_target.c.diff >> > > CAM locking in RELENG_6 is completely different from locking in > RELENG_7. I'm not saying that your problems are imaginary, just > pointing out that any problems in 6.x are going to almost certainly > be completely different from problems in 7.x. I'll look at both. > > Scott Scott: Thanks. Let me know when/if you would like some testing/debugging with your updates. Sean From owner-freebsd-scsi@FreeBSD.ORG Thu Dec 13 21:30:34 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02A4916A419 for ; Thu, 13 Dec 2007 21:30:34 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id B44EA13C45B for ; Thu, 13 Dec 2007 21:30:33 +0000 (UTC) (envelope-from peo@intersonic.se) X-Virus-Scanned: amavisd-new at inter-sonic.com Message-ID: <4761A06F.8090209@intersonic.se> Date: Thu, 13 Dec 2007 22:13:19 +0100 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Thunderbird 2.0.0.6 (X11/20071103) MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: can I make amr(4) more noisy? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 21:30:34 -0000 Hi, I am trying out a MegaRAID SCSI 320 controller, performance is fine but dissappointed by the fact that the driver tells you nothing when a drive goes bad or the array is rebuilt etc. Am I missing something or must I rely on another piece to get the info required? Thanks, --per From owner-freebsd-scsi@FreeBSD.ORG Thu Dec 13 21:50:40 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8C5216A417 for ; Thu, 13 Dec 2007 21:50:40 +0000 (UTC) (envelope-from mksmith@adhost.com) Received: from mail-defer01.adhost.com (mail-defer01.adhost.com [216.211.128.150]) by mx1.freebsd.org (Postfix) with ESMTP id ADC3613C45B for ; Thu, 13 Dec 2007 21:50:40 +0000 (UTC) (envelope-from mksmith@adhost.com) Received: from mail-in04.adhost.com (mail-in04.adhost.com [10.211.128.131]) by mail-defer01.adhost.com (Postfix) with ESMTP id 1289DEFF33 for ; Thu, 13 Dec 2007 13:35:11 -0800 (PST) (envelope-from mksmith@adhost.com) Received: from ad-exh01.adhost.lan (unknown [216.211.143.69]) by mail-in04.adhost.com (Postfix) with ESMTP id 4E87E192815; Thu, 13 Dec 2007 13:35:09 -0800 (PST) (envelope-from mksmith@adhost.com) MIME-Version: 1.0 X-PGP-Encoding-Format: MIME X-PGP-Encoding-Version: 2.0.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PGP_Universal_D93C4510_1E684256_B3C3D141_6CA22982" X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Date: Thu, 13 Dec 2007 13:35:07 -0800 Message-ID: <17838240D9A5544AAA5FF95F8D52031603068470@ad-exh01.adhost.lan> In-Reply-To: <4761A06F.8090209@intersonic.se> X-MS-Has-Attach: X-MS-TNEF-Correlator: x-pgp-mapi-encoding-version: 2.5.0 Thread-Topic: can I make amr(4) more noisy? Thread-Index: Acg9z2sa32yRPUk+TFWSlm47Jgm2AgAAG7Eg References: <4761A06F.8090209@intersonic.se> From: "Michael K. Smith - Adhost" To: "Per olof Ljungmark" , Cc: Subject: RE: can I make amr(4) more noisy? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 21:50:40 -0000 --PGP_Universal_D93C4510_1E684256_B3C3D141_6CA22982 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: QUOTED-PRINTABLE Hello Per: > -----Original Message----- > From: owner-freebsd-scsi@freebsd.org [mailto:owner-freebsd- > scsi@freebsd.org] On Behalf Of Per olof Ljungmark > Sent: Thursday, December 13, 2007 1:13 PM > To: freebsd-scsi@freebsd.org > Subject: can I make amr(4) more noisy? >=20 > Hi, >=20 > I am trying out a MegaRAID SCSI 320 controller, performance is fine but > dissappointed by the fact that the driver tells you nothing when a > drive > goes bad or the array is rebuilt etc. >=20 > Am I missing something or must I rely on another piece to get the info > required? >=20 > Thanks, >=20 > --per The application amrstat will give you that information from the command lin= e. We run it from cron and have it send us mail on a daily basis with stat= s. This is what the output looks like. Logical volume 0: optimal (407.92 GB, RAID1) Physical drive 0:0 online Physical drive 0:1 online Physical drive 0:2 online Physical drive 0:3 online Physical drive 0:4 online Physical drive 0:5 online Regards, Mike --PGP_Universal_D93C4510_1E684256_B3C3D141_6CA22982 Content-Type: application/pgp-signature; name="PGP.sig" Content-Transfer-Encoding: 7BIT Content-Disposition: attachment; filename="PGP.sig" -----BEGIN PGP SIGNATURE----- Version: 9.7.0 (Build 867) iQEVAwUBR2Gli/TXQhZ+XcVAAQiJVAf/dJ17EZxeQ6YlYtf7sVOXnDl2r6z3Db0G cza72HJudKvqQ1SY4Yc/xXNK60CJ0ARxJ0O/IHd4BzI7FYVOZ22xe6AiIo3SFszb JnHYggN9mx0dXFVwbqwKm20k/IDqOX79QQVUpBSapGr+ZAf3zircVfCjn6QtzoSh PfBKsZwheQFwL/CvxVM9iiid9NqkzaObqf8/wMC9t4AUnNX6HkMZvKlYMDohioaK mZNnzIpYyblLJ7EJaAKJOAsHVGbN4hmaIc/eG3VNQ2Xg9jYve+5WKPn37wZUwIjA 0eBx99nITZNiqa25Nshpe3Qg399ENxm2qp2VB2p+tsiAm/2lvbdBAA== =NWzh -----END PGP SIGNATURE----- --PGP_Universal_D93C4510_1E684256_B3C3D141_6CA22982-- From owner-freebsd-scsi@FreeBSD.ORG Thu Dec 13 21:57:28 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF1416A417 for ; Thu, 13 Dec 2007 21:57:28 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id BDE1613C467 for ; Thu, 13 Dec 2007 21:57:27 +0000 (UTC) (envelope-from peo@intersonic.se) X-Virus-Scanned: amavisd-new at inter-sonic.com Message-ID: <4761AAC1.7060907@intersonic.se> Date: Thu, 13 Dec 2007 22:57:21 +0100 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Thunderbird 2.0.0.6 (X11/20071103) MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <4761A06F.8090209@intersonic.se> <17838240D9A5544AAA5FF95F8D52031603068470@ad-exh01.adhost.lan> In-Reply-To: <17838240D9A5544AAA5FF95F8D52031603068470@ad-exh01.adhost.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: can I make amr(4) more noisy? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 21:57:28 -0000 Michael K. Smith - Adhost wrote: > Hello Per: >> I am trying out a MegaRAID SCSI 320 controller, performance is fine but >> dissappointed by the fact that the driver tells you nothing when a >> drive >> goes bad or the array is rebuilt etc. >> >> Am I missing something or must I rely on another piece to get the info >> required? > The application amrstat will give you that information from the command line. We run it from cron and have it send us mail on a daily basis with stats. This is what the output looks like. > > Logical volume 0: optimal (407.92 GB, RAID1) > Physical drive 0:0 online > Physical drive 0:1 online > Physical drive 0:2 online > Physical drive 0:3 online > Physical drive 0:4 online > Physical drive 0:5 online Thanks. Yes, this could be used in a script I suppose to send an alarm. For instance, if the word "optimal" above is not present, I could safely assume something is wrong?