From owner-freebsd-stable@FreeBSD.ORG Mon Aug 18 14:47:17 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C997F1065845 for ; Mon, 18 Aug 2008 14:47:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0771A8FC1B for ; Mon, 18 Aug 2008 14:47:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [IPv6:2001:470:1f11:75:2a0:d2ff:fe18:8b38]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m7IEkWkS052949; Mon, 18 Aug 2008 10:47:05 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-stable@freebsd.org Date: Mon, 18 Aug 2008 10:33:05 -0400 User-Agent: KMail/1.9.7 References: <20080815235523.5b019915.torfinn.ingolfsen@broadpark.no> In-Reply-To: <20080815235523.5b019915.torfinn.ingolfsen@broadpark.no> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808181033.05680.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:2001:470:1f11:75::1]); Mon, 18 Aug 2008 10:47:06 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8053/Mon Aug 18 08:42:12 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Torfinn Ingolfsen Subject: Re: trying to mount a write prptected zip disk panics the machine (unless the -r flag is used) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 14:47:17 -0000 On Friday 15 August 2008 05:55:23 pm Torfinn Ingolfsen wrote: > Hello, > > Do you remember the zip[1] disks? The original 100 Mbyte ones? well > recently, I got a scsi zip drive (internal) with a scsi card (Adaptec > ava-2904) and some zip-100 disks, and a request to try to copy the data > from those disks. I found a cable, installed the card and zip drive > in a machine[2] running FreeBSd 7.0-stable, and luckily the zip disks could > be read. > > But during this process I discovered one thing; if I try to mount a > write protected zip disk without using the '-r' flag to the mount > command, my machine will panic a few seconds later. As there is no visual > indication to tell you that a zip disk is write protected, it is quite > easy to forget mounting it read only. > > Note: using zip disks that aren't write protected works fine. > > Details: > root@music1# uname -a > FreeBSD music1.kg4.no 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Aug 15 > 12:56:35 CEST 2008 root@music1.kg4.no:/usr/obj/usr/src/sys/GENERIC > i386 > > root@music1# dmesg | grep ahc > ahc0: port 0x1400-0x14ff mem > 0x5c100000-0x5c100fff irq 10 at device 15.0 on pci0 ahc0: Host Adapter Bios > disabled. Using default SCSI device parameters ahc0: [ITHREAD] > da0 at ahc0 bus 0 target 5 lun 0 > root@music1# dmesg | grep aic > aic7850: Single Channel A, SCSI Id=7, 3/253 SCBs > > root@music1# dmesg | grep da0 > da0 at ahc0 bus 0 target 5 lun 0 > da0: Removable Direct Access SCSI-2 device > da0: 3.300MB/s transfers > da0: 96MB (196608 512 byte sectors: 64H 32S/T 96C) > > This is what I got on the console (and in /var/log/messages) when I tried > to mount the disk: Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): > WRITE(06). CDB: a 0 0 21 8 0 Aug 15 20:14:33 music1 kernel: > (da0:ahc0:0:5:0): CAM Status: SCSI Status Error Aug 15 20:14:33 music1 > kernel: (da0:ahc0:0:5:0): SCSI Status: Check Condition Aug 15 20:14:33 > music1 kernel: (da0:ahc0:0:5:0): DATA PROTECT asc:27,0 Aug 15 20:14:33 > music1 kernel: (da0:ahc0:0:5:0): Write protected > Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): Unretryable error > Aug 15 20:14:33 music1 kernel: g_vfs_done():da0s4[WRITE(offset=512, > length=4096)]error = 13 Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): > WRITE(06). CDB: a 0 0 21 8 0 Aug 15 20:14:33 music1 kernel: > (da0:ahc0:0:5:0): CAM Status: SCSI Status Error Aug 15 20:14:33 music1 > kernel: (da0:ahc0:0:5:0): SCSI Status: Check Condition Aug 15 20:14:33 > music1 kernel: (da0:ahc0:0:5:0): DATA PROTECT asc:27,0 Aug 15 20:14:33 > music1 kernel: (da0:ahc0:0:5:0): Write protected > Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): Unretryable error > Aug 15 20:14:33 music1 kernel: g_vfs_done():da0s4[WRITE(offset=512, > length=4096)]error = 13 Aug 15 20:14:33 music1 kernel: fsync: giving up on > dirty > Aug 15 20:14:33 music1 kernel: 0xc2988114: tag devfs, type VCHR > Aug 15 20:14:33 music1 kernel: usecount 1, writecount 0, refcount 27 > mountedhere 0xc2617700 Aug 15 20:14:33 music1 kernel: flags () > Aug 15 20:14:33 music1 kernel: v_object 0xc299707c ref 0 pages 25 > Aug 15 20:14:33 music1 kernel: > Aug 15 20:14:33 music1 kernel: dev da0s4 > Aug 15 20:14:34 music1 kernel: GEOM_LABEL: Label for provider da0s4 is > msdosfs/DIPLOM. > > A few seconds went by, and then the machine panic'ed with apage fault: > root@music1# more /var/crash/info.0 > Dump header from device /dev/ad0s1b > Architecture: i386 > Architecture Version: 2 > Dump Length: 60837888B (58 MB) > Blocksize: 512 > Dumptime: Fri Aug 15 20:15:03 2008 > Hostname: music1.kg4.no > Magic: FreeBSD Kernel Dump > Version String: FreeBSD 7.0-STABLE #0: Fri Aug 15 12:56:35 CEST 2008 > root@music1.kg4.no:/usr/obj/usr/src/sys/GENERIC > Panic String: page fault > Dump Parity: 2682527093 > Bounds: 0 > Dump Status: good > > (crash dump, 58 Mbyte, available on request). > > Is this how it is supposed to be, or should I file a PR? Can you get the stack trace? > References: > 1) http://en.wikipedia.org/wiki/Zip_drive > 2) http://tingox.googlepages.com/dp-ep-c400_freebsd -- John Baldwin