From owner-freebsd-scsi@FreeBSD.ORG Mon Dec 27 11:07:06 2010 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 ADF0E10656BB for ; Mon, 27 Dec 2010 11:07:06 +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 9B9D88FC28 for ; Mon, 27 Dec 2010 11:07:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oBRB76l9055862 for ; Mon, 27 Dec 2010 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oBRB76VX055860 for freebsd-scsi@FreeBSD.org; Mon, 27 Dec 2010 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Dec 2010 11:07:06 GMT Message-Id: <201012271107.oBRB76VX055860@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, 27 Dec 2010 11:07:06 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/153361 scsi [ciss] Smart Array 5300 boot/detect drive problem o kern/152250 scsi [ciss] [patch] Kernel panic when hw.ciss.expose_hidden o kern/151564 scsi [ciss] ciss(4) should increase CISS_MAX_LOGICAL to 10 o docs/151336 scsi Missing documentation of scsi_ and ata_ functions in c o kern/148083 scsi [aac] Strange device reporting o kern/147704 scsi [mpt] sys/dev/mpt: new chip revision, partially unsupp o kern/146287 scsi [ciss] ciss(4) cannot see more than one SmartArray con o kern/145768 scsi [mpt] can't perform I/O on SAS based SAN disk in freeb o kern/144648 scsi [aac] Strange values of speed and bus width in dmesg o kern/144301 scsi [ciss] [hang] HP proliant server locks when using ciss o kern/142351 scsi [mpt] LSILogic driver performance problems o kern/141934 scsi [cam] [patch] add support for SEAGATE DAT Scopion 130 o kern/134488 scsi [mpt] MPT SCSI driver probes max. 8 LUNs per device o kern/132250 scsi [ciss] ciss driver does not support more then 15 drive o kern/132206 scsi [mpt] system panics on boot when mirroring and 2nd dri o kern/130621 scsi [mpt] tranfer rate is inscrutable slow when use lsi213 o kern/129602 scsi [ahd] ahd(4) gets confused and wedges SCSI bus o kern/128452 scsi [sa] [panic] Accessing SCSI tape drive randomly crashe o kern/128245 scsi [scsi] "inquiry data fails comparison at DV1 step" [re o kern/127927 scsi [isp] isp(4) target driver crashes kernel when set up o kern/127717 scsi [ata] [patch] [request] - support write cache toggling o kern/124667 scsi [amd] [panic] FreeBSD-7 kernel page faults at amd-scsi o kern/123674 scsi [ahc] ahc driver dumping o kern/123520 scsi [ahd] unable to boot from net while using ahd o sparc/121676 scsi [iscsi] iscontrol do not connect iscsi-target on sparc o kern/120487 scsi [sg] scsi_sg incompatible with scanners o kern/120247 scsi [mpt] FreeBSD 6.3 and LSI Logic 1030 = only 3.300MB/s o kern/114597 scsi [sym] System hangs at SCSI bus reset with dual HBAs o kern/110847 scsi [ahd] Tyan U320 onboard problem with more than 3 disks o kern/99954 scsi [ahc] reading from DVD failes on 6.x [regression] o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load o kern/60598 scsi wire down of scsi devices conflicts with config s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o bin/57088 scsi [cam] [patch] for a possible fd leak in libcam.c o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/40895 scsi wierd kernel / device driver bug o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce 45 problems total. From owner-freebsd-scsi@FreeBSD.ORG Wed Dec 29 12:51:02 2010 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 626AD106566B for ; Wed, 29 Dec 2010 12:51:02 +0000 (UTC) (envelope-from prt@prt.org) Received: from smtp6.uk.umis.net (smtp6.uk.umis.net [217.65.166.41]) by mx1.freebsd.org (Postfix) with ESMTP id 169F08FC13 for ; Wed, 29 Dec 2010 12:51:01 +0000 (UTC) Received: from kate.prtsystems.ltd.uk ([217.65.165.35]) by smtp6.uk.umis.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PXusb-000Eic-P3 for freebsd-scsi@freebsd.org; Wed, 29 Dec 2010 12:11:45 +0000 Message-ID: <4D1B2580.7010004@prt.org> Date: Wed, 29 Dec 2010 12:11:44 +0000 From: Paul Thornton User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: freebsd-scsi@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Target mode problems with scsi_target and firewire 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, 29 Dec 2010 12:51:02 -0000 Hi, I've been trying to make target mode and firewire work using 8.1 release (i386), and haven't had much success. Using Sean Bruno's BSDCan presentation as a guide, I have a kernel with the right bits in it, and am using scsi_target to provide a file-based back-end (I'm not trying to make any physical SCSI discs act as the backing store here), but the whole setup is very unreliable. In a nutshell, and after a lot of testing on different hardware, client machines and FreeBSD versions, it seems to come down to the fact that the setup works for a short period of time (1s - ~30s is usual) and then scsi_target hangs on the box being used as the target. I've tested with FreeBSD, Windows and Mac OS as the client and I see the same issue - sometimes I get as far as mounting the disc, and starting to copy files; other times I can't even mount it. Sometimes, scsi_target hangs so early on the OS at the far end never works out that it has gained a disc. I'm looking for some help in how best to troubleshoot. I'm not sufficiently advanced with either the scsi code or the debugger to know precisely where to look to see exactly where things are hanging. I'll happily try out anything things with this setup to get it working though - it is a test after all, and not in production. When I ktrace scsi_target, it does what seems sensible for a while until a call to kevent never returns. Nothing can then get rid of that hung scsi_target short of a power cycle. fwcontrol on both the target PC and client still shows the other ID present, so the actual underlying link hasn't gone away. I've put the full output of scsi_target in debug mode, the ktrace results, kernel config, dmesg etc relating to this here: http://www.prt.org/temp/targ - interesting extracts of these are: scsi_target: event -3 done scsi_target: read ready scsi_target: tcmd_handle atio 0x2826e740 ctio 0x2826e8c0 atioflags 0x8000 scsi_target: CTIO done freeing CTIO scsi_target: sending ccb (0x332) scsi_target: event -1 done scsi_target: Working on ATIO 0x2826e5c0 scsi_target: tcmd_handle atio 0x2826e5c0 ctio 0x2826e8c0 atioflags 0x8000 scsi_target: Calling rdwr_decode scsi_target: R/W from 0: 28 0 0 0 1 17 0 0 8 0 scsi_target: read 8 blocks @ blkno 279 scsi_target: read async 8d @ block 279 scsi_target: Starting 0x282702e0 DIR_IN @142848:4096 scsi_target: aio ready scsi_target: tcmd_handle atio 0x2826e5c0 ctio 0x2826e8c0 atioflags 0x8000 scsi_target: sending CTIO for sync read scsi_target: sending ccb (0x933) scsi_target: event -3 done (here we hang) and the corresponding last few lines from the ktrace: 1056 scsi_target CALL write(0x2,0xbfbf8370,0xd) 1056 scsi_target GIO fd 2 wrote 13 bytes "event -3 done" 1056 scsi_target RET write 13/0xd 1056 scsi_target CALL write(0x2,0x281ac813,0x1) 1056 scsi_target GIO fd 2 wrote 1 byte " " 1056 scsi_target RET write 1 1056 scsi_target CALL kevent(0x5,0,0,0xbfbf8934,0x405,0) My kernel configuration is GENERIC with: device targ device sbp_targ options VFS_AIO options DDB options KDB options KDB_UNATTENDED added. The only other firewire changes are disabling fwe, fwip, dcons and dcons_crom. sbp remains disabled. I have also tried this with witness enabled; this causes a lot of console output (as you'd expect) and when scsi_target hangs I ended up with a panic: --- syscall (4, FreeBSD ELF32, write), eip = 0x2819a583, esp = 0xbfbf87dc, ebp = 0xbfbf87f8 --- Kernel page fault with the following non-sleepable locks held: exclusive sleep mutex sbp_targ (sbp_targ) r = 0 (0xc473aaa4) locked @ cam/cam_periph.h:188 KDB: stack backtrace: db_trace_self_wrapper(c0c58890,e6be3944,c08bb395,bc,1,...) at db_trace_self_wrapper+0x26 kdb_backtrace(bc,1,ffffffff,c0ede344,e6be397c,...) at kdb_backtrace+0x29 _witness_debugger(c0c59f78,e6be3990,4,1,0,...) at _witness_debugger+0x25 witness_warn(5,0,c0c85213,c08bb48c,c4f35550,...) at witness_warn+0x20d trap(e6be3a1c) at trap+0x19e calltrap() at calltrap+0x6 --- trap 0xc, eip = 0xc0b86525, esp = 0xe6be3a5c, ebp = 0xe6be3a6c --- fubyte(28283000,1,c0f17a60,0,0,...) at fubyte+0x1d vmapbuf(d84e3df0,0,c0bf506b,2af,1,...) at vmapbuf+0x75 cam_periph_mapmem(c4ecf800,c52a4de0,c52a4de0,c4f38000,c4ecf800,...) at cam_periph_mapmem+0x29e targsendccb(c4e8e61c,c0bf6294,c4531c10,0,c5006880,...) at targsendccb+0x5e targstart(c5006880,c4ecf800,1,c4775ac0,c4ecf800,...) at targstart+0x68 xpt_run_dev_allocq(c4766d80,c48bd808,1) at xpt_run_dev_allocq+0xdd xpt_schedule(c5006880,1,c0bf628b,bc,0,...) at xpt_schedule+0xf4 targwrite(c5078a00,e6be3c5c,0,1b0,4,...) at targwrite+0x181 giant_write(c5078a00,e6be3c5c,0,0,0,...) at giant_write+0x60 devfs_write_f(c4f211c0,e6be3c5c,c4f0ed00,0,c4f32780,...) at devfs_write_f+0x7f dofilewrite(e6be3c5c,ffffffff,ffffffff,0,c4f211c0,...) at dofilewrite+0x95 kern_writev(c4f32780,4,e6be3c5c,e6be3c7c,1,...) at kern_writev+0x58 write(c4f32780,e6be3cf8,1,c0c4175f,206,...) at write+0x4f syscall(e6be3d38) at syscall+0x200 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (4, FreeBSD ELF32, write), eip = 0x2819a583, esp = 0xbfbf87dc, ebp = 0xbfbf87f8 --- Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0x28283000 fault code = supervisor read, page not present instruction pointer = 0x20:0xc0b86525 stack pointer = 0x28:0xe6be3a5c frame pointer = 0x28:0xe6be3a6c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1062 (scsi_target) trap number = 12 panic: page fault Any advice on how to carry on tracking this down would be much appreciated. Paul.