From owner-freebsd-usb@FreeBSD.ORG Thu Nov 13 18:10:07 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1A81065689 for ; Thu, 13 Nov 2008 18:10:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 30F6D8FC22 for ; Thu, 13 Nov 2008 18:10:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mADIA7Vg043072 for ; Thu, 13 Nov 2008 18:10:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mADIA7a0043070; Thu, 13 Nov 2008 18:10:07 GMT (envelope-from gnats) Resent-Date: Thu, 13 Nov 2008 18:10:07 GMT Resent-Message-Id: <200811131810.mADIA7a0043070@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Patrick Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D22681065678 for ; Thu, 13 Nov 2008 18:09:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id BFFDA8FC13 for ; Thu, 13 Nov 2008 18:09:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mADI9iHd049797 for ; Thu, 13 Nov 2008 18:09:44 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mADI9ixq049795; Thu, 13 Nov 2008 18:09:44 GMT (envelope-from nobody) Message-Id: <200811131809.mADI9ixq049795@www.freebsd.org> Date: Thu, 13 Nov 2008 18:09:44 GMT From: Patrick To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/128847: Detachment of mounted USB flash drive causes system freeze X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 18:10:07 -0000 >Number: 128847 >Category: usb >Synopsis: Detachment of mounted USB flash drive causes system freeze >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 13 18:10:06 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Patrick >Release: 7.0 >Organization: >Environment: FreeBSD hostname 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: When I manually detach my USB flash drive that contains files in use on the system in question without umounting it, and then re-attach it, my system freezes. >How-To-Repeat: Mount the USB flash drive. Open one of the files located on the drive with a program such as Opera or leafpad (what I did). Manually remove the USB flash drive. Reinsert the flash drive. I then tried to save the file I had opened in leafpad, and it told me it could not open the file for saving. I opened up a terminal and ran 'su', and that's when my system froze. /var/log/messages showed this: Nov 13 17:16:10 kernel: GEOM_LABEL: Label msdosfs/WWMPCDD_USB removed. Nov 13 17:45:23 kernel: umass0: at uhub4 port 5 (addr 2) disconnected Nov 13 17:45:23 kernel: (da0:umass-sim0:0:0:0): lost device Nov 13 17:45:23 kernel: umass0: detached Nov 13 17:45:54 kernel: umass0: on uhub4 Nov 13 17:45:54 root: Unknown USB device: vendor 0x0781 product 0x5150 bus uhub4 Nov 13 17:45:55 kernel: da1 at umass-sim0 bus 0 target 0 lun 0 Nov 13 17:45:55 kernel: da1: Removable Direct Access SCSI-2 device Nov 13 17:45:55 kernel: da1: 40.000MB/s transfers Nov 13 17:45:55 kernel: da1: 244MB (501759 512 byte sectors: 64H 32S/T 244C) Nov 13 17:45:55 kernel: GEOM_LABEL: Label for provider da1s1 is msdosfs/WWMPCDD_USB. Nov 13 17:45:58 kernel: g_vfs_done():da0s1[WRITE(offset=22452224, length=2048)]error = 6 >Fix: Patch attached with submission follows: Copyright (c) 1992-2008 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 is a registered trademark of The FreeBSD Foundation. FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (1202.73-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff Features2=0x4400 Logical CPUs per core: 2 real memory = 536805376 (511 MB) avail memory = 503001088 (479 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) hptrr: HPT RocketRAID controller driver v1.1 (Feb 24 2008 19:59:27) acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 1fef0000 (3) failed Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 cpu0: on acpi0 p4tcc0: on cpu0 cpu1: on acpi0 p4tcc1: on cpu1 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: on hostb0 pcib1: at device 1.0 on pci0 pci1: on pcib1 nvidia0: mem 0xf0000000-0xf0ffffff,0xe8000000-0xefffffff irq 16 at device 0.0 on pci1 nvidia0: [GIANT-LOCKED] nvidia0: [ITHREAD] uhci0: port 0xac00-0xac1f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] uhci0: [ITHREAD] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xa000-0xa01f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] uhci1: [ITHREAD] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xa400-0xa41f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] uhci2: [ITHREAD] usb2: on uhci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered uhci3: port 0xa800-0xa81f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] uhci3: [ITHREAD] usb3: on uhci3 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xf4000000-0xf40003ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: on usb4 uhub4: 8 ports with 8 removable, self powered pcib2: at device 30.0 on pci0 pci2: on pcib2 fwohci0: mem 0xf3005000-0xf30057ff,0xf3000000-0xf3003fff irq 17 at device 1.0 on pci2 fwohci0: [FILTER] fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:50:8d:00:00:f8:21:82 fwohci0: Phy 1394a available S400, 3 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 dcons_crom0: on firewire0 dcons_crom0: bus_addr 0x1a68000 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:50:8d:f8:21:82 fwe0: Ethernet address: 02:50:8d:f8:21:82 fwip0: on firewire0 fwip0: Firewire address: 00:50:8d:00:00:f8:21:82 @ 0xfffe00000000, S400, maxrec 2048 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode rl0: port 0x9000-0x90ff mem 0xf3004000-0xf30040ff irq 18 at device 2.0 on pci2 miibus0: on rl0 rlphy0: PHY 0 on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:50:8d:f9:21:82 rl0: [ITHREAD] isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] ata1: on atapci0 ata1: [ITHREAD] pci0: at device 31.3 (no driver attached) pci0: at device 31.5 (no driver attached) acpi_tz0: on acpi0 acpi_tz0: _PSV value is absurd, ignored (-266.7C) fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio0: [FILTER] atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model IntelliMouse, device ID 3 pmtimer0 on isa0 ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 ppbus0: [ITHREAD] plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 ppc0: [GIANT-LOCKED] ppc0: [ITHREAD] sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec hptrr: no controller detected. firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) ad0: 286188MB at ata0-master UDMA100 acd0: CDRW at ata0-slave PIO4 acpi_tz0: _PSV value is absurd, ignored (-266.7C) acpi_tz0: _PSV value is absurd, ignored (-266.7C) SMP: AP CPU #1 Launched! Trying to mount root from ufs:/dev/ad0s3a WARNING: / was not properly dismounted WARNING: /tmp was not properly dismounted WARNING: /usr was not properly dismounted WARNING: /var was not properly dismounted umass0: on uhub4 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 244MB (501759 512 byte sectors: 64H 32S/T 244C) GEOM_LABEL: Label for provider da0s1 is msdosfs/WWMPCDD_USB. GEOM_LABEL: Label msdosfs/WWMPCDD_USB removed. >Release-Note: >Audit-Trail: >Unformatted: