On Tue, 20 Dec 2005, Fisher Yu wrote: > 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.
Is it possible to run your code (or a slightly hacked version of it) with the video driver not loaded? You could just write dummy data (zeros) to the 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. Those resets could be symptoms of a problem with the USB communication. They are typically caused by noise in the cable; perhaps replacing the USB cable would help. > 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: ... > 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? I wonder if this could be caused by a bug in the mpeg4k driver. That's why I suggested running a test without loading the driver. > > Have you tried turning on CONFIG_USB_DEBUG? > > I'm a linux newbie, never touched kernel. But I'll try... It might contain useful information. Alan Stern ------------------------------------------------------- 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_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel