From owner-freebsd-firewire@FreeBSD.ORG Mon Dec 10 11:07:03 2007 Return-Path: Delivered-To: freebsd-firewire@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2699616A476 for ; Mon, 10 Dec 2007 11:07:03 +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 F0E3B13C4EF for ; Mon, 10 Dec 2007 11:07:02 +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 lBAB72Po073327 for ; Mon, 10 Dec 2007 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBAB72PO073323 for freebsd-firewire@FreeBSD.org; Mon, 10 Dec 2007 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 Dec 2007 11:07:02 GMT Message-Id: <200712101107.lBAB72PO073323@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-firewire@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-firewire@FreeBSD.org X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2007 11:07:03 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/74238 firewire [firewire] fw_rcv: unknown response; firewire ad-hoc w 1 problem total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- f kern/113785 firewire [firewire] dropouts when playing DV on firewire 1 problem total. From owner-freebsd-firewire@FreeBSD.ORG Wed Dec 12 02:17:29 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E43E16A418 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 C15F313C46E 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 0C9C65B1681 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 5F1EE1C58001 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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD 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-firewire@FreeBSD.ORG Wed Dec 12 02:18:55 2007 Return-Path: Delivered-To: freebsd-firewire@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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD 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-firewire@FreeBSD.ORG Wed Dec 12 02:37:14 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34BE216A41A for ; Wed, 12 Dec 2007 02:37:14 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.238]) by mx1.freebsd.org (Postfix) with ESMTP id 0068A13C469 for ; Wed, 12 Dec 2007 02:37:13 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: by nz-out-0506.google.com with SMTP id l8so41921nzf.13 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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 02:37:14 -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-firewire@FreeBSD.ORG Wed Dec 12 03:33:02 2007 Return-Path: Delivered-To: freebsd-firewire@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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD 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-firewire@FreeBSD.ORG Wed Dec 12 19:22:39 2007 Return-Path: Delivered-To: freebsd-firewire@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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD 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-firewire@FreeBSD.ORG Wed Dec 12 20:54:38 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C19FC16A419 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 801DB13C448 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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD 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-firewire@FreeBSD.ORG Wed Dec 12 20:54:49 2007 Return-Path: Delivered-To: freebsd-firewire@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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD 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-firewire@FreeBSD.ORG Wed Dec 12 22:17:39 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B6EB16A419; Wed, 12 Dec 2007 22:17:39 +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 5CFB013C45A; Wed, 12 Dec 2007 22:17:39 +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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 22:17:39 -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-firewire@FreeBSD.ORG Wed Dec 12 22:17:40 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5466216A468; Wed, 12 Dec 2007 22:17:40 +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 EE54E13C45B; Wed, 12 Dec 2007 22:17:39 +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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 22:17:40 -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-firewire@FreeBSD.ORG Wed Dec 12 22:17:41 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DDFB16A469; Wed, 12 Dec 2007 22:17:41 +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 A797713C467; Wed, 12 Dec 2007 22:17:40 +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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 22:17:41 -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-firewire@FreeBSD.ORG Thu Dec 13 17:37:03 2007 Return-Path: Delivered-To: freebsd-firewire@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-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD 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-firewire@FreeBSD.ORG Thu Dec 13 22:42:31 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8D3D16A469; Thu, 13 Dec 2007 22:42:31 +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 A08FC13C458; Thu, 13 Dec 2007 22:42:31 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id 5733961B10A; Thu, 13 Dec 2007 14:42:31 -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 21742-04; Thu, 13 Dec 2007 14:42:30 -0800 (PST) Received: from iago.office.miralink.com (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id BE64161B0EE; Thu, 13 Dec 2007 14:42:30 -0800 (PST) Message-ID: <4761B556.5090601@miralink.com> Date: Thu, 13 Dec 2007 14:42:30 -0800 From: Sean Bruno User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: freebsd-firewire@freebsd.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 14:42:31 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4761b557275371848420296 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: Hidetoshi Shimokawa Subject: sbp_targ debug errors? X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 22:42:31 -0000 I'm seeing some data inconsistency when writing to a backend disk, and I wondered how to interpret the following debug messages? sbp_targ_action1: XPT_CONT_TARGET_IO sbp_targ_action1: data_size(1024) != dxfer_len(512) sbp_targ_action1: XPT_CONT_TARGET_IO sbp_targ_action1: data_size(1024) != dxfer_len(512) sbp_targ_send_status: STATUS_OK sbp_targ_cmd: ORB_POINTER sean