From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 30 22:20:30 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B9B316A420 for ; Fri, 30 Sep 2005 22:20:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC9D543D5C for ; Fri, 30 Sep 2005 22:20:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8UMKNNw017600 for ; Fri, 30 Sep 2005 22:20:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8UMKNhe017599; Fri, 30 Sep 2005 22:20:23 GMT (envelope-from gnats) Resent-Date: Fri, 30 Sep 2005 22:20:23 GMT Resent-Message-Id: <200509302220.j8UMKNhe017599@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Gilbert Healton Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB1D016A41F for ; Fri, 30 Sep 2005 22:12:02 +0000 (GMT) (envelope-from ghealton@lumeta.com) Received: from exgw2.lumeta.com (exgw2.lumeta.com [65.198.68.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20C8743D4C for ; Fri, 30 Sep 2005 22:11:59 +0000 (GMT) (envelope-from ghealton@lumeta.com) Received: from ingw2.lumeta.com (h65-246-245-2.lumeta.com [65.246.245.2]) by exgw2.lumeta.com (Postfix) with ESMTP id 53AD65F9022 for ; Fri, 30 Sep 2005 18:11:58 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by ingw2.lumeta.com (Postfix) with ESMTP id 15F1151984 for ; Fri, 30 Sep 2005 18:11:58 -0400 (EDT) Received: from ingw2.lumeta.com ([127.0.0.1]) by localhost (ingw2.lumeta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25786-10 for ; Fri, 30 Sep 2005 18:11:56 -0400 (EDT) Received: from lucy.corp.lumeta.com (lucy3 [65.246.245.10]) by ingw2.lumeta.com (Postfix) with ESMTP id DC98351976 for ; Fri, 30 Sep 2005 18:11:56 -0400 (EDT) Received: by lucy.corp.lumeta.com (Postfix, from userid 2076) id D1C12A8A33; Fri, 30 Sep 2005 18:11:56 -0400 (EDT) Message-Id: <20050930221156.D1C12A8A33@lucy.corp.lumeta.com> Date: Fri, 30 Sep 2005 18:11:56 -0400 (EDT) From: Gilbert Healton To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/86767: bogus "slice starts beyond end of the disk:..." on USB floppy access X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gilbert Healton List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 22:20:30 -0000 >Number: 86767 >Category: kern >Synopsis: bogus "slice starts beyond end of the disk:..." on USB floppy access >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 30 22:20:23 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Gilbert Healton >Release: FreeBSD 4.11-RELEASE i386 >Organization: Lumeta Corporation http://www.lumeta.com/ >Environment: System: FreeBSD ghealton5 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Fri Jan 21 17:21:22 GMT 2005 root@perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: When using USB based floppy disks under FreeBSD4.11 the kernel produces diagnostics that were not generated by FreeBSD4.9. These errors print on the console as well as being logged to /var/log/messages. Diagnostics on USB floppy mount: # mount -t msdos /dev/da0 /mnt da0s1: slice starts beyond end of the disk: rejecting it da0s2: slice starts beyond end of the disk: rejecting it da0s3: slice starts beyond end of the disk: rejecting it Diagnostics on USB floppy umount: # umount /mnt umass0: Unsupported UFI command 0x35 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x6, scsi status == 0x0 The mount appears successful, but not sure of that. It is very noisy and confusing. Will cause many complaints from our customer base. More details: * src/UPDATING read. Closest is 20030806 DA_OLD_QUIRKS note, but that claims it was removed in 4.9 and 4.9 worked without these errors. * Attachment has some duplicate details, logs, as well as much additional material. * Failures observed on two different Dell D600 systems and a Dell D610. * Failures do not occur on straight "fd0" floppies. * Notice many people asking about this error in various news groups when searching for error text using Google. * Related to fact that the "MSDOS partition table" area of preformatted non-system floppies have error text in the first three entires of the slice table (s1 to s3). If format floppy under Windows XP, which fills all four slices, get messages about s1 to s4. If use FreeBSD's new_msdos to format floppy, which leaves slice table zeros, mount shows no errors though umount still does. See attachment. >How-To-Repeat: Mount non-system MSDOS 3 1/2 formatted floppy in USB connected drive then mount -t msdos /dev/da0 /mnt umount /mnt Used multiple fresh-out-of-the-box preformatted floppies with nothing written to them as well as floppies formatted other ways. The key is having a non-system floppy that prints that classic error message where message text is stored where MSDOS partition table normally resides. 100% reproduction rate. Used Dell branded floppy (PN/71761-A01) though it lists as NEC in dmesg (see attachment). Other numbers on drive: FDDM-101 243-560390-101-0 UL E151483 M IC Class B ICES-003 Bar Code PH-02R152-17601-42B-E239 Rev A00. WORKAROUND - PARTIAL -------------------- Format floppy with FreeBSD's "newfs_msdos" program before mounting the floppy for use: newfs_msdos [-L label] /dev/da0 This stops mount errors, though the umount errors continue. (This happens to leave the partition table area zeros.) DD ERRORS --------- Has also been observed when using "dd" access of raw, unmounted, drive. This generates all of the errors in one command. But I've run "dd" at times where I did not notice there errors either. dd if=/dev/da0 of=./floppy.0 bs=512 count=1 This seems to favor the same messages as umount, though sometimes I've seen them all. FDFORMAT ERRORS --------------- fdformat program fails with these errors in addition to: fdformat: not a floppy disk: /dev/da0 FDISK ERRORS ------------ Fdisk gives up on floppies. NEWFS_MSDOS ERRORS ------------------ newfs_msdos appears to format correctly though it shows errors in the way DD does. >Fix: None found yet. still looking, but slowly as not used to FreeBSD I/O drivers and I have a software delivery coming well too soon. Never done BSD drivers nor these devices before so lots to learn. --- floppy-bug.txt begins here --- Summary: FreeBSD4.11 produces bogus "slice starts beyond end of the disk: rejecting it" errors under USB/umass floppies. 4.9 did not. -------------------------------------------------------------------- * Have searched GNATS database for anything close to this. Found nothing. * Marked serious as: * problem in kernel I/O routines (official reason for serious). * multiple people reporting messages. some can not mount floppies, or at least think they can't. * reliability of floppy operations questionable, which can cause be expensive on even occasional failures to our application. * Floppies formatted with Windows XP, which puts error text in "s4", a diagnostic for "s4" is also included. * Floppies formatted with FreeBSD's newfs_msdos command, which leaves s1-s4 zero, no mount errors occur though umount errors still occur. FIX REWARD: ----------------------------------------------------------------------- Whoever I receive the best fix from by 2005-10-12 gets a free poster-size map of the Internet (not for sale anywhere.... so don't ask if you don't send me a fix... no volume publishing facilities just a spin-off of something else). Offered for sure to USA residents. Other countries if, and after, passing additional legal checks and permissions. This map shows routes to all registered networks and not individual hosts nor generic ISPs. With over 180,000 networks it has quite a lot on it. It will be more complex than those shown at: sample: http://www.lumeta.com/gallery/isp-ss.gif details: http://www.lumeta.com/mapping.html Ideas: -------------------------------------------------------------------- My first guess is that these are caused by the fact that non-system floppy disks have error message text at offset 0x1BE rather than a MSDOS partition table. Such a floppy dump follows. My second guess involves someone adding SCSI/UFI code that cycles through MS-DOS partitions without first checking if the partition table exsists. Perhaps some SCSI related code for reading MBRs without partition tables was deleted as "unused" even though it is required for umass/UFI floppies. Looking at bytes 15 and 12-14 should tell the kernel if it has a floppy or not. Suspect UMASS/SCSI/UFI specific code as straight "fd0" floppy drives do not generate this error. /var/log/messages boot log extract -------------------------------------------------------------------- Sep 30 13:48:13 ghealton5 /kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Sep 30 13:48:13 ghealton5 /kernel: da0: Removable Direct Access SCSI-0 device Sep 30 13:48:13 ghealton5 /kernel: da0: 20KB/s transfers Sep 30 13:48:13 ghealton5 /kernel: da0: Attempt to query device size failed: NOT READY, Medium not present dmesg log follows -------------------------------------------------------------------- Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.11-RELEASE #0: Fri Jan 21 17:21:22 GMT 2005 root@perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz CPU: Intel(R) Pentium(R) M processor 2.00GHz (1995.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6d8 Stepping = 8 Features=0xafe9fbff real memory = 1073549312 (1048388K bytes) avail memory = 1039441920 (1015080K bytes) Preloaded elf kernel "kernel" at 0xc055c000. Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 10 entries at 0xc00fb2c0 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: irq 0 at device 1.0 on pci0 pci1: on pcib1 pci1: at 0.0 irq 11 pcib2: irq 0 at device 28.0 on pci0 pci2: on pcib2 bge0: mem 0xdfcf0000-0xdfcfffff irq 11 at device 0.0 on pci2 bge0: Ethernet address: 00:11:43:4d:b4:1c miibus0: on bge0 brgphy0: on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto uhci0: port 0xbf80-0xbf9f irq 11 at device 29.0 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xbf60-0xbf7f irq 10 at device 29.1 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xbf40-0xbf5f irq 9 at device 29.2 on pci0 usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered umass0: NEC NEC USB UF000x, rev 1.10/1.50, addr 2 uhci3: port 0xbf20-0xbf3f irq 7 at device 29.3 on pci0 usb3: on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered pci0: at 29.7 irq 11 pcib3: at device 30.0 on pci0 pci3: on pcib3 pcic0: irq 7 at device 1.0 on pci3 pcic0: PCI Memory allocated: 0x88000000 pccard0: on pcic0 pci3: (vendor=0x104c, dev=0x8038) at 1.5 irq 7 pci3: (vendor=0x14e4, dev=0x4320) at 3.0 irq 10 pci0: (vendor=0x8086, dev=0x266e) at 30.2 irq 11 pci0: (vendor=0x8086, dev=0x266d) at 30.3 irq 10 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xbfa0-0xbfaf,0x374-0x377,0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 irq 10 at device 31.2 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: (vendor=0x8086, dev=0x266a) at 31.3 irq 10 orm0: