On 12/19/05, Alan Stern <[EMAIL PROTECTED]> wrote:
> On Mon, 19 Dec 2005, Fisher Yu wrote:
>
> > Hi, folks,
> >      I econutered this hang problem several times. Google doesn't give
> > help.  So I go to here.
> >
> >      The kernel version is 2.6.14.3, attached a usb-ide disk (m-system
> > flash disk, 16GB), usb-ide chip model is MYSON CS8818. The system also
> > have 4 mpeg encoder cards(MPEG4K) from AMP.
> >      Load mpeg4k driver, run capturing application. After several
> > hours, usb disk can't be accessed, fdisk -l hangs, df -l hangs, umount
> > /home(on which usb disk mounted) reports device busy, and ps shows
> > this application process is in D state. If this occurs, power off is
> > the only way(as I known...) to recover.
>
> It sounds like there's a bug in the USB video driver.

At the begining, I also suspect it's a video driver bug or video lib.
But after running the example program comes with driver, I turn my
attention to my application program - the example code seems more
stable, I haven't seen it hangs usb disk till now in the comparison
test.

The main difference between my code and example code is that: in my
application, there is a thread in monitor the free space of usb disk,
by calling stat() and statfs() per two munites, if free space is below
the threshold, the oldest file will be deleted. The example code is
just writing data to usb disk. They all have muliple threads and among
these, 4 threads(one theard per card) save encoded data to disk.

I have ever seen "reset high speed USB device" message in the output
of dmesg (which is pasted below) during testing, but I am not sure it
is the cause or a helpful hint. The data rate of video streaming is
about 1MB/s, over usb 2.0 connection,
USB disk is formated to FAT32.

Hang usually occurred after running application for seveal hours.

> >      This problem happens occasionally, not every time - sometime
> > several hours, but sometime it can run one day(and I terminate it). I
> > also see several similar cases: fdisk -l success, but df -l hangs, and
> > usb disk can be access.
> >
> >      Any hint will be highly appreciate!
>
> Does anything show up in the system log?  Or the dmesg log?

Sorry, I don't know how to attach dmesg output here, I pasted them below:
------------------------------------------------------------------------------------------------------------------------
Linux version 2.6.14.3 ([EMAIL PROTECTED]) (gcc version 3.3.3
20040412 (Red Hat Linux 3.3.3-7)) #1 PREEMPT Tue Dec 13 11:04:01 EST
2005
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000000e7f0000 (usable)
 BIOS-e820: 000000000e7f0000 - 000000000e7f3000 (reserved)
 BIOS-e820: 000000000e7f3000 - 000000000e800000 (ACPI data)
231MB LOWMEM available.
On node 0 totalpages: 59376
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 55280 pages, LIFO batch:31
  HighMem zone: 0 pages, LIFO batch:1
DMI not present.
ACPI: Unable to locate RSDP
Allocating PCI resources starting at 10000000 (gap: 0e800000:f1800000)
Built 1 zonelists
Kernel command line: ro root
Initializing CPU#0
PID hash table entries: 1024 (order: 10, 16384 bytes)
Detected 797.310 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 230980k/237504k available (2626k kernel code, 5936k reserved,
752k data, 180k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 1654.67 BogoMIPS (lpj=3309349)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 0084893f 0080813f 00000000 00000000
00000000 00000000 00000000
CPU: After vendor identify, caps: 0084893f 0080813f 000005ce 00000000
00000000 00000000 00000000
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 512K (128 bytes/line)
CPU: Processor revision 1.5.0.2, 800 MHz
CPU: Code Morphing Software revision 4.5.1-12-8
CPU: 20040317 19:23 official release 4.5.1#2
CPU serial number disabled.
CPU: After all inits, caps: 0080893f 0080813f 000005ce 00000000
00000000 00000000 00000000
mtrr: v2.0 (20020519)
CPU: Transmeta(tm) Crusoe(tm) Processor TM5800 stepping 03
Checking 'hlt' instruction... OK.
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 108k freed
NET: Registered protocol family 16
PCI: Using configuration type 1
ACPI: Subsystem revision 20050902
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 4000-40ff claimed by vt82c586 ACPI
PCI quirk: region 6000-607f claimed by vt82c868 HW-mon
PCI quirk: region 5000-500f claimed by vt82c868 SMB
PCI: Bridge: 0000:00:08.0
  IO window: disabled.
  MEM window: c0200000-c03fffff
  PREFETCH window: disabled.
PCI: Setting latency timer of device 0000:00:08.0 to 64
audit: initializing netlink socket (disabled)
audit(1135029999.208:1): initialized
Initializing Cryptographic API
lp: driver loaded but no devices found
Linux agpgart interface v0.101 (c) Dave Jones
[drm] Initialized drm 1.0.0 20040925
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
parport_pc: VIA 686A/8231 detected
parport_pc: probing current configuration
parport_pc: Current parallel port base: 0x378
parport0: PC-style at 0x378, irq 7 [PCSPP(,...)]
lp0: using parport0 (interrupt-driven).
parport_pc: VIA parallel port: io=0x378, irq=7
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:07.1
PCI: Via IRQ fixup for 0000:00:07.1, from 255 to 0
VP_IDE: chipset revision 16
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686a (rev 22) IDE UDMA66 controller on pci0000:00:07.1
    ide0: BM-DMA at 0xde00-0xde07, BIOS settings: hda:pio, hdb:pio
Probing IDE interface ide0...
hda: SAMSUNG MP0302H, ATA DISK drive
hdb: CD ROM PATF565E, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hda: max request size: 1024KiB
hda: 58711968 sectors (30060 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(33)
hda: cache flushes supported
 hda: hda1 hda2 hda3 hda4 < hda5 >
hdb: ATAPI 40X CD-ROM drive, 128kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
libata version 1.12 loaded.
ieee1394: raw1394: /dev/raw1394 device initialized
usbmon: debugfs is not available
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
mice: PS/2 mouse device common for all mice
Advanced Linux Sound Architecture Driver Version 1.0.10rc1 (Mon Sep 12
08:13:09 2005 UTC).
ALSA device list:
  No soundcards found.
oprofile: using timer interrupt.
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
ip_conntrack version 2.3 (1855 buckets, 14840 max) - 216 bytes per conntrack
input: AT Translated Set 2 keyboard on isa0060/serio0
ip_tables: (C) 2000-2002 Netfilter core team
ipt_recent v0.3.1: Stephen Frost <[EMAIL PROTECTED]>. 
http://snowman.net/projects/ipt_recent/
arp_tables: (C) 2002 David S. Miller
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 32768) 4194304
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
EXT3-fs: hda3: orphan cleanup on readonly fs
kjournald starting.  Commit interval 5 seconds
ext3_orphan_cleanup: deleting unreferenced inode 1599597
ext3_orphan_cleanup: deleting unreferenced inode 1599596
ext3_orphan_cleanup: deleting unreferenced inode 1599594
ext3_orphan_cleanup: deleting unreferenced inode 1599595
EXT3-fs: hda3: 4 orphan inodes deleted
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 180k freed
Real Time Clock Driver v1.12
USB Universal Host Controller Interface driver v2.3
uhci_hcd 0000:00:07.2: UHCI Host Controller
uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:07.2: irq 15, io base 0x0000dc00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ehci_hcd 0000:01:09.2: EHCI Host Controller
ehci_hcd 0000:01:09.2: new USB bus registered, assigned bus number 2
ehci_hcd 0000:01:09.2: irq 15, io mem 0xc0203000
ehci_hcd 0000:01:09.2: park 0
ehci_hcd 0000:01:09.2: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 5 ports detected
usb 2-1: new high speed USB device using ehci_hcd and address 2
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
EXT3 FS on hda3, internal journal
Adding 1012052k swap on /dev/hda5.  Priority:-1 extents:1 across:1012052k
  Vendor: M-System  Model: s FFD ULTRA ATA   Rev: 1.13
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 32180224 512-byte hdwr sectors (16476 MB)
sda: assuming drive cache: write through
SCSI device sda: 32180224 512-byte hdwr sectors (16476 MB)
sda: assuming drive cache: write through
 sda: sda1
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
usb-storage: device scan complete
kjournald starting.  Commit interval 5 seconds
EXT3 FS on hda2, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
8139too Fast Ethernet driver 0.9.27
eth0: RealTek RTL8139 at 0xcf0b2400, 00:e0:6c:3a:00:b4, IRQ 15
eth0:  Identified 8139 chip type 'RTL-8139C'
8139too Fast Ethernet driver 0.9.27
mpeg4k: module license 'unspecified' taints kernel.
usb 2-1: reset high speed USB device using ehci_hcd and address 2
usb 2-1: reset high speed USB device using ehci_hcd and address 2
usb 2-1: reset high speed USB device using ehci_hcd and address 2
usb 2-1: reset high speed USB device using ehci_hcd and address 2
usb 2-1: reset high speed USB device using ehci_hcd and address 2
usb 2-1: reset high speed USB device using ehci_hcd and address 2
------------------------------------------------------------------------------------------------------------------------

but sometimes, there is no "reset" message and my application still
hangs, and so dose fdisk -l and df -l.

Another 'better' case: fdisk -l can see /dev/sda1,  but df -l shows no
/dev/sda1, and the mount point /home/ can be accessed. Anyone saw
this?

> Have you tried turning on CONFIG_USB_DEBUG?

  I'm a linux newbie, never touched kernel. But I'll try...

  Thanks for the reply!

> Alan Stern
>
>


--
Best Regards,
Fisher


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to