From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 12 07:09:44 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 CC7E216A418 for ; Mon, 12 Nov 2007 07:09:44 +0000 (UTC) (envelope-from james@mansionfamily.plus.com) Received: from pih-relay08.plus.net (pih-relay08.plus.net [212.159.14.134]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB0713C49D for ; Mon, 12 Nov 2007 07:09:44 +0000 (UTC) (envelope-from james@mansionfamily.plus.com) Received: from [80.229.150.39] (helo=mansionfamily.plus.com) by pih-relay08.plus.net with esmtp (Exim) id 1IrTQP-0007UY-GE for freebsd-scsi@freebsd.org; Mon, 12 Nov 2007 07:09:37 +0000 Received: from [192.168.0.120] ([192.168.0.120]:4252) by mansionfamily.plus.com with [XMail 1.22 ESMTP Server] id for from ; Mon, 12 Nov 2007 07:14:09 -0000 Message-ID: <4737FC8B.1090608@mansionfamily.plus.com> Date: Mon, 12 Nov 2007 07:11:07 +0000 From: James Mansion User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Scott Long References: <47300ADE.5070506@mansionfamily.plus.com> <4730C8EC.7050002@mansionfamily.plus.com> <4732C7DC.60902@samsco.org> In-Reply-To: <4732C7DC.60902@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org, Ivan Voras Subject: Re: iSCSI in 7.0 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, 12 Nov 2007 07:09:44 -0000 Scott Long wrote: > inspected it closely for this. Unfortunately, the GEOM block layer is > not free of this deadlock, so this whole discussion is mostly academic > (the GEOM problem is small and very hard to trigger since it uses the > zone allocator, but problems have been observed in real-world > situations, which is a shame). Sorry if this is blindingly obvious to everyone else, but does this mean 'FreeBSD is prone to swap deadlock when swapping against local partition and file swap areas'? I hadn't considered that you need to be non-pageable AND that you have to have pre-allocated the zones that you allocate from for avoid a deadlock like this. (ie, code paths doing IO driven by swap must use a different memory management strategy - and that mkes life interesting when receiving network packats that might be in response to such an IO request, which is where we came in) Is there any work underway to fix it? James From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 12 11:07:05 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 4252316A41A for ; Mon, 12 Nov 2007 11:07:05 +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 2F18013C4BB for ; Mon, 12 Nov 2007 11:07:05 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lACB75TX089813 for ; Mon, 12 Nov 2007 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lACB748G089809 for freebsd-scsi@FreeBSD.org; Mon, 12 Nov 2007 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Nov 2007 11:07:04 GMT Message-Id: <200711121107.lACB748G089809@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, 12 Nov 2007 11:07:05 -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/23314 scsi [aic] aic driver fails to detect Adaptec 1520B unless 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 6 problems total. From owner-freebsd-scsi@FreeBSD.ORG Tue Nov 13 08:21:09 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 045DF16A417; Tue, 13 Nov 2007 08:21:09 +0000 (UTC) (envelope-from oleg.lomaka@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7C813C4AA; Tue, 13 Nov 2007 08:21:08 +0000 (UTC) (envelope-from oleg.lomaka@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1Irr0x-0006DT-AK; Tue, 13 Nov 2007 10:20:59 +0200 Received: from tdevil.lomaka.org.ua (dmitry.kiev.zoral.com.ua [10.1.1.24]) (authenticated bits=0) by skuns.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id lAD8KjCx066413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Nov 2007 10:20:45 +0200 (EET) (envelope-from oleg.lomaka@gmail.com) Message-ID: <47395E62.2070404@gmail.com> Date: Tue, 13 Nov 2007 10:20:50 +0200 From: Oleg Lomaka User-Agent: Thunderbird 2.0.0.6 (X11/20071102) MIME-Version: 1.0 To: Scott Long References: <4729E8D3.2020404@gmail.com> <472A8D31.2080503@samsco.org> <472AF723.7080802@gmail.com> <472B4419.3030805@samsco.org> <473075B4.4000600@gmail.com> <4730776B.3020804@samsco.org> In-Reply-To: <4730776B.3020804@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 2d4f5d33491be47a8e8639414ad67c6d X-DrWeb-checked: yes X-SpamTest-Envelope-From: oleg.lomaka@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1768 [Nov 12 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-scsi@freebsd.org, Oleg Lomaka , kib@freebsd.org Subject: Re: RELENG_7 core dump (sgread) 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: Tue, 13 Nov 2007 08:21:09 -0000 Hello, I do not had casual kernel crashes for last week. Thanks a lot Scott. Anyway I got crashes when plug in USB HDD on working kernel. I believe this is issue you know about, but just in case here is trace of this trap. If it is not known issue, i can e-mail you more info. Thanks again. Fatal trap 12: page fault while in kernel mode fault virtual address = 0x18 fault code = supervisor read, page not present instruction pointer = 0x20:0xc04d6472 stack pointer = 0x28:0xe74c4abc frame pointer = 0x28:0xe74c4ad4 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 1320 (hald-probe-storage) trap number = 12 panic: page fault (kgdb) bt #0 doadump () at pcpu.h:195 #1 0xc04aab63 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 #2 0xc04aad2c in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:563 #3 0xc0688ef3 in trap_fatal (frame=0xe74c4a7c, eva=24) at /usr/src/sys/i386/i386/trap.c:872 #4 0xc068972a in trap (frame=0xe74c4a7c) at /usr/src/sys/i386/i386/trap.c:277 #5 0xc0673cbb in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #6 0xc04d6472 in turnstile_broadcast (ts=0x0, queue=0) at /usr/src/sys/kern/subr_turnstile.c:834 #7 0xc04a0ac2 in _mtx_unlock_sleep (m=0xc0723e30, opts=0, file=0xc06b0353 "/usr/src/sys/kern/kern_mutex.c", line=158) at /usr/src/sys/kern/kern_mutex.c:593 #8 0xc04a0b41 in _mtx_unlock_flags (m=0xc0723e30, opts=0, file=0xc06b0353 "/usr/src/sys/kern/kern_mutex.c", line=158) at /usr/src/sys/kern/kern_mutex.c:210 #9 0xc04a0b79 in unlock_mtx (lock=0xc0723e30) at /usr/src/sys/kern/kern_mutex.c:158 #10 0xc04b1f1b in _sleep (ident=0xc44cc40c, lock=0xc0723e30, priority=256, wmesg=0xc08c57ca "sgread", timo=0) at /usr/src/sys/kern/kern_synch.c:187 #11 0xc08bb06b in sgread (dev=0xc4db6100, uio=0xe74c4c60, ioflag=0) at /usr/src/sys/modules/cam/../../cam/scsi/scsi_sg.c:798 #12 0xc047ef38 in giant_read (dev=0xc4db6100, uio=0xe74c4c60, ioflag=0) at /usr/src/sys/kern/kern_conf.c:361 #13 0xc0464621 in devfs_read_f (fp=0xc5432d38, uio=0xe74c4c60, cred=0xc437c800, flags=0, td=0xc50cc000) at /usr/src/sys/fs/devfs/devfs_vnops.c:880 #14 0xc04d9b26 in dofileread (td=0xc50cc000, fd=4, fp=0xc5432d38, auio=0xe74c4c60, offset=-1, flags=0) at file.h:242 #15 0xc04d9e98 in kern_readv (td=0xc50cc000, fd=4, auio=0xe74c4c60) at /usr/src/sys/kern/sys_generic.c:192 #16 0xc04d9f7f in read (td=0xc50cc000, uap=0xe74c4cfc) at /usr/src/sys/kern/sys_generic.c:108 #17 0xc06893a3 in syscall (frame=0xe74c4d38) at /usr/src/sys/i386/i386/trap.c:1008 #18 0xc0673d20 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:196 #19 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) Uptime: 27m30s (kgdb) frame 11 #11 0xc08bb06b in sgread (dev=0xc4db6100, uio=0xe74c4c60, ioflag=0) at /usr/src/sys/modules/cam/../../cam/scsi/scsi_sg.c:798 798 if (msleep(&sc->rdwr_done, periph->sim->mtx, PCATCH, "sgread", (kgdb) info locals sc = (struct sg_softc *) 0xc44cc400 rdwr = (struct sg_rdwr *) 0x0 hstat = Variable "hstat" is not available. Scott Long wrote: > Oleg Lomaka wrote: >> I'm sorry for a long delay. >> Kernel failed to compile after patch. >> I've got more info about crash. It looks like it happening when I >> plug in USB HDD. In some cases I can plug it in and make mount, in >> some cases I just plug it in, and core dumps. >> > > Sorry about the typo, take the same patch and change the "sc" on line > 366 to "softc". > > Panic due to USB drive insertion and removal are unfortunately expected > right now. I'm looking into it. However, please do test the sg patch; > the panic that you originally reported is not related to the known > problems with USB. > > Scott From owner-freebsd-scsi@FreeBSD.ORG Tue Nov 13 13:39: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 CF07A16A417 for ; Tue, 13 Nov 2007 13:39:55 +0000 (UTC) (envelope-from M.S.Powell@salford.ac.uk) Received: from abbe.salford.ac.uk (abbe.salford.ac.uk [146.87.0.10]) by mx1.freebsd.org (Postfix) with SMTP id 485BE13C4A6 for ; Tue, 13 Nov 2007 13:39:54 +0000 (UTC) (envelope-from M.S.Powell@salford.ac.uk) Received: (qmail 95129 invoked by uid 98); 13 Nov 2007 13:13:05 +0000 Received: from 146.87.255.121 by abbe.salford.ac.uk (envelope-from , uid 401) with qmail-scanner-2.01 (clamdscan: 0.90/3838. spamassassin: 3.1.8. Clear:RC:1(146.87.255.121):. Processed in 0.044601 secs); 13 Nov 2007 13:13:05 -0000 Received: from rust.salford.ac.uk (HELO rust.salford.ac.uk) (146.87.255.121) by abbe.salford.ac.uk (qpsmtpd/0.3x.614) with SMTP; Tue, 13 Nov 2007 13:13:05 +0000 Received: (qmail 2207 invoked by uid 1002); 13 Nov 2007 13:13:03 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 13 Nov 2007 13:13:03 -0000 Date: Tue, 13 Nov 2007 13:13:03 +0000 (GMT) From: "Mark Powell" To: freebsd-scsi@freebsd.org Message-ID: <20071113130614.Y99575@rust.salford.ac.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: scottl@freebsd.org Subject: Maximum block size on scsi tape? 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: Tue, 13 Nov 2007 13:39:55 -0000 Hi, I'm having trouble with large block sizes. FreeBSD 7.0-BETA2 on amd64: ahc0: port 0xd000-0xd0ff mem 0xf5000000-0xf5000fff irq 20 at device 0.0 on pci7 ahc0: [ITHREAD] aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs ahc1: port 0xd100-0xd1ff mem 0xf5001000-0xf5001fff irq 19 at device 0.1 on pci7 ahc1: [ITHREAD] aic7899: Ultra160 Wide Channel B, SCSI Id=7, 32/253 SCBs ... sa0 at ahc1 bus 0 target 6 lun 0 sa0: Removable Sequential Access SCSI-3 device sa0: 160.000MB/s transfers (80.000MHz DT, offset 31, 16bit) In variable block-size mode, it seems to have a 64KB maximum: # mt blocksize 0 # sdd if=/dev/random of=/dev/sa0 bs=32k count=1 sdd: Read 1 records + 0 bytes (total of 32768 bytes = 32.00k). sdd: Wrote 1 records + 0 bytes (total of 32768 bytes = 32.00k). Try to read it back without specifying a buffer size: # sdd if=/dev/sa0 -onull (sa0:ahc1:0:6:0): 32768-byte tape record bigger than supplied buffer sdd: Input/output error. Error reading '/dev/sa0'. sdd: Read 0 records + 0 bytes (total of 0 bytes = 0.00k). sdd: Wrote 0 records + 0 bytes (total of 0 bytes = 0.00k). As expect we are warned that the blocksize is 32k. Do that with 64k and we get expected behaviour too: # sdd if=/dev/random of=/dev/sa0 bs=64k count=1 sdd: Read 1 records + 0 bytes (total of 65536 bytes = 64.00k). sdd: Wrote 1 records + 0 bytes (total of 65536 bytes = 64.00k). # sdd if=/dev/sa0 -onull (sa0:ahc1:0:6:0): 65536-byte tape record bigger than supplied buffer sdd: Input/output error. Error reading '/dev/sa0'. sdd: Read 0 records + 0 bytes (total of 0 bytes = 0.00k). sdd: Wrote 0 records + 0 bytes (total of 0 bytes = 0.00k). But go beyond 64k and the blocksize seems to be limited: # sdd if=/dev/random of=/dev/sa0 bs=65k count=1 sdd: Read 1 records + 0 bytes (total of 66560 bytes = 65.00k). sdd: Wrote 1 records + 0 bytes (total of 66560 bytes = 65.00k). # sdd if=/dev/sa0 -onull (sa0:ahc1:0:6:0): 65536-byte tape record bigger than supplied buffer sdd: Input/output error. Error reading '/dev/sa0'. sdd: Read 0 records + 0 bytes (total of 0 bytes = 0.00k). sdd: Wrote 0 records + 0 bytes (total of 0 bytes = 0.00k). What's going on here? Why is blocksize getting limited to 64k? Isn't that rather small these days? An LTO-2 drive can support block sizes in the megabytes. Or is this just a problem in variable block mode? Yes, I don't understand how sa(4) really works :) Many thanks. -- Mark Powell - UNIX System Administrator - The University of Salford Information Services Division, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 6843 Fax: +44 161 295 5888 www.pgp.com for PGP key