usb flash memory hangs after copying few MB

Bug #17881 reported by Leszek Tarkowski
34
Affects Status Importance Assigned to Milestone
Linux
New
Undecided
Unassigned
linux-source-2.6.12 (Ubuntu)
Invalid
High
Unassigned
linux-source-2.6.17 (Ubuntu)
Confirmed
Medium
Unassigned
linux-source-2.6.20 (Ubuntu)
New
Undecided
Unassigned
linux-source-2.6.22 (Ubuntu)
New
Undecided
TJ

Bug Description

After plugging usbdisk in everything is fine - shows up, i can browse etc.

Problem is, that when i start to copy from/to device (using cp, or mc or
nautilus) after few MB it "hangs". Nothing in dmesg or logs, nothing from apps
(they just show still progress bar). All I can do is to remove device and use my
flash memory with another computer What is more strange (at least for me) is
that my external usb dvd-recorder works flawlessly. Another thing is that this
pendrive is working on my laptop - but on laptop i have 686 kernel (it is
Pentium-M based) and that is one diffrence everything else is the same.

I'v noticed (using ps fax) that scsi_eh_4, /usr/sbin/hald --drop-privileges and
usb-storage are in state D (Uninterruptible sleep).... So i balme hald :)

I tried both k-7 and generic 386 kernel. It was working on warty, and on hoary
but earlier. I use it ocassionally so i can't track when it stopped working.

Revision history for this message
Leszek Tarkowski (leszek-tarkowski) wrote :

after boot i stoped hald:
  sudo /etc/init.d/dbus-1 stop

after this everything is working (of course i have to mount flash memory
manually) - i can copy large/lots of files etc.
so problem is that in current version of hal (0.4.7-1-ubuntu15) causes some
problems (at least on my desktop hardware - ASUS A7V600 (KT600) + Barton 2500+)

Revision history for this message
Matt Zimmerman (mdz) wrote :

Please attach a copy of the output from the dmesg command after reproducing this
problem

Revision history for this message
Leszek Tarkowski (leszek-tarkowski) wrote :

Created an attachment (id=2698)
output from dmesg

As you see - there is nothing in it...
$ps fax | grep " D"
 6772 ? Ds 0:23 /usr/sbin/hald --drop-privileges
21116 pts/2 D+ 0:00 \_ mc
20933 ? D 0:00 [scsi_eh_5]
20934 ? D 0:00 [usb-storage]

Revision history for this message
Rodger Williams (rwilliams-water) wrote :

Similar problem using the kubuntu live dvd. Flash drives (both memorex and
sandisk) work okay a time or two and then rapidly decay until they lock up on
retrievals. When I do "e2fsck -cckpv /dev/sdb1" under knoppix, it fixes it. I
don't believe I have lost data, though I can't be sure. I have an asus k8v se
deluxe motherboard with an amd64 3200+.

Revision history for this message
Ben Collins (ben-collins) wrote :

Can I get some confirmation of this bug on dapper's 2.6.15 kernel, please?

Revision history for this message
alzibub (alex-zeffertt) wrote :
Download full text (4.4 KiB)

I think I have seen the same problem. I am running an up to date breezy badger and whenever I write to my 256 MB Sweex usb pen drive the write hangs. I've used this same pen drive on a number of linux-2.4 based machines with no problem.

I wanted to eliminate gnome, so I disabled automount in "Preferences", inserted the pen drive, mounted /dev/sda from the command line, and tried to copy around 40MB of files. It still took about 10 times longer than I would expect to finish copying, and the "umount" hung forever!

By this point I was sure it was the kernel usb system to blame. In order to eliminate the filesystem I tried just copying data directly:

       dd if=dosfs.img of=/dev/sda # where dosfs.img is a 22 MB file

This also hung forever. I looked at /var/log/messages and found that it was generating masses of lines of output, so I just removed the usb pen drive and they stopped. Here are the first few lines:

Feb 9 08:36:11 localhost -- MARK --
Feb 9 08:53:19 localhost kernel: [4511832.187000] usb 1-1: new full speed USB device using uhci_hcd and address 35
Feb 9 08:53:19 localhost kernel: [4511832.323000] scsi13 : SCSI emulation for USB Mass Storage devices
Feb 9 08:53:20 localhost usb.agent[26127]: usb-storage: already loaded
Feb 9 08:53:24 localhost kernel: [4511837.329000] Vendor: ICSI Model: MP3 PLAYER FLASH Rev: 1.0A
Feb 9 08:53:24 localhost kernel: [4511837.329000] Type: Direct-Access ANSI SCSI revision: 00
Feb 9 08:53:24 localhost kernel: [4511837.341000] SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
Feb 9 08:53:24 localhost kernel: [4511837.347000] sda: Write Protect is off
Feb 9 08:53:24 localhost kernel: [4511837.363000] SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
Feb 9 08:53:24 localhost kernel: [4511837.369000] sda: Write Protect is off
Feb 9 08:53:24 localhost kernel: [4511837.369000] /dev/scsi/host13/bus0/target0/lun0:
Feb 9 08:53:24 localhost kernel: [4511837.441000] Attached scsi removable disk sda at scsi13, channel 0, id 0, lun 0
Feb 9 08:53:24 localhost scsi.agent[26173]: sd_mod: loaded sucessfully (for disk)
Feb 9 08:55:30 localhost kernel: [4511963.259000] SCSI error : <13 0 0 0> return code = 0x10070000
Feb 9 08:55:30 localhost kernel: [4511963.259000] end_request: I/O error, dev sda, sector 0
Feb 9 08:55:30 localhost kernel: [4511963.259000] printk: 3132 messages suppressed.
Feb 9 08:55:30 localhost kernel: [4511963.259000] lost page write due to I/O error on sda
Feb 9 08:55:30 localhost kernel: [4511963.387000] SCSI error : <13 0 0 0> return code = 0x10070000
Feb 9 08:55:30 localhost kernel: [4511963.387000] end_request: I/O error, dev sda, sector 8
Feb 9 08:55:30 localhost kernel: [4511963.387000] lost page write due to I/O error on sda
Feb 9 08:55:30 localhost kernel: [4511963.526000] SCSI error : <13 0 0 0> return code = 0x10070000
Feb 9 08:55:30 localhost kernel: [4511963.526000] end_request: I/O error, dev sda, sector 16
Feb 9 08:55:30 localhost kernel: [4511963.526000] lost page write due to I/O error on sda
Feb 9 08:55:30 localhost kernel: [4511963.663000] SCSI error : <13 0 0 0> return code = 0x10070000
Feb 9 0...

Read more...

Revision history for this message
Ben Collins (ben-collins) wrote :

Retargeting to breezy kernel. I've no reports of this occuring in dapper.

Revision history for this message
alzibub (alex-zeffertt) wrote : Re: [Bug 17881] usb flash memory hangs after copying few MB

Hi Ben, thanks for your reply. Could you clarify something for me?
Are you saying that the breezy kernel is being upgraded to 2.6.15, or
are you recommending that I take the 2.6.15 kernel from dapper?

TIA,

Alex

On 03/03/06, Ben Collins <email address hidden> wrote:
> Public bug report changed:
> https://launchpad.net/malone/bugs/17881
>
> Task: ubuntu linux-source-2.6.15
> Sourcepackagename: linux-source-2.6.15 => linux-source-2.6.12
>
> Comment:
> Retargeting to breezy kernel. I've no reports of this occuring in
> dapper.
>

Revision history for this message
Ben Collins (ben-collins) wrote :

On Fri, 2006-03-03 at 15:24 +0000, alzibub wrote:
> Public bug report changed:
> https://launchpad.net/malone/bugs/17881
>
> Comment:
> Hi Ben, thanks for your reply. Could you clarify something for me?
> Are you saying that the breezy kernel is being upgraded to 2.6.15, or
> are you recommending that I take the 2.6.15 kernel from dapper?

As I said, either upgrade to Dapper, or try one of the Dapper LiveCD's
(which doesn't require changing your installed system).

I just need to confirm whether the bug exists in dapper. If it does, I
will attempt to fix it.

--
Ubuntu - http://www.ubuntu.com/
Debian - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
SwissDisk - http://www.swissdisk.com/

Revision history for this message
alzibub (alex-zeffertt) wrote :

> I just need to confirm whether the bug exists in dapper. If it does, I
> will attempt to fix it.

Hi Ben, I've just retried writing to my usb pen drive using the dapper
live cd and I get exactly the same problem as I did with breezy.
(I've also checked /var/log/messages and I get exactly the same
entries appearing there.)

Alex

Revision history for this message
Ben Collins (ben-collins) wrote :

Please test against dapper final release.

Revision history for this message
alzibub (alex-zeffertt) wrote : Re: [Bug 17881] Re: usb flash memory hangs after copying few MB

The problem is still present in dapper 6.06.

I think the problem was introduced in the kernel between 2.4 and 2.6
as I don't see it on my linux-2.4 based Debian Sarge box.

Revision history for this message
Stefan Hinker (stefan-hinker) wrote :

I have the same, or at least a very similar problem on my dapper system.
The SD card is disconnected and reconnected spontaneously, with transfer
rates anywhere between 0 and 4 MB/sec. This does *not* happen when running
the same hardware with WinXP, where it's rock stable. So the hardware is not
at fault.

I've had it with dapper beta, and still have it with the current dapper, last
updated 2 days ago. I'll check on a dmesg/messages log tonight.
I'm happy to perform additional tests if this is of any help (if possible without
scrapping my system, it's my only one...)

Ben: If you need any testing or data, you can also contact me offline, if you so desire.

hth
stefan

Revision history for this message
Stefan Hinker (stefan-hinker) wrote : 2.6.15-25-k7 dmesg right after booting

This is the first of three attachments to document this problem.
This attachment is the output of dmesg right after system boot.

Revision history for this message
Stefan Hinker (stefan-hinker) wrote : 2.6.15-25-k7 dmesg during the problem reproduction

This is the second of three attachments.
This attachment is the output of dmesg with events during the reproduction
of the problem. The dmesg ringbuffer was cleared before the SD card was
first inserted.

Revision history for this message
Stefan Hinker (stefan-hinker) wrote : 2.6.15-25-k7 messages file including kernel stack trace

This is the third of three attachments.
This attachment shows the /var/log/messages file during two cycles of
reproducing the problem. User actions have been inserted as logger comments into the file. During the first cycle, the kernel wrote several stack
traces to syslog, and eventually froze, so I had to reset the system.

During the second cycle, the SD card was inserted several times. It was possible to read from it once, but all attemts to write failed. This behaviour
is not stable - sometimes writes go ok, sometimes not.

I hope this is of value.

stefan

Revision history for this message
Rob David (rob-david) wrote :

I am getting the same or very similar problem with dapper and kernel 2.6.15-26-686.

I have a Motorola E1070 mobile phone which can work as a usb mass storage device. When I connect it, everything seems to work, and I can read files from it OK. However, as soon as I try to write anything I consistently get messages like:

Aug 3 10:45:10 localhost kernel: [17235773.020000] sd 0:0:0:0: SCSI error: return code = 0x10070000
Aug 3 10:45:10 localhost kernel: [17235773.020000] end_request: I/O error, dev sda, sector 1472
Aug 3 10:45:10 localhost kernel: [17235773.020000] Buffer I/O error on device sda1, logical block 1235
Aug 3 10:45:10 localhost kernel: [17235773.020000] lost page write due to I/O error on sda1
Aug 3 10:45:15 localhost kernel: [17235777.884000] sd 0:0:0:0: SCSI error: return code = 0x10070000
Aug 3 10:45:15 localhost kernel: [17235777.884000] end_request: I/O error, dev sda, sector 1473
Aug 3 10:45:15 localhost kernel: [17235777.884000] Buffer I/O error on device sda1, logical block 1236
Aug 3 10:45:15 localhost kernel: [17235777.884000] lost page write due to I/O error on sda1
Aug 3 10:45:20 localhost kernel: [17235782.336000] sd 0:0:0:0: SCSI error: return code = 0x10070000
Aug 3 10:45:20 localhost kernel: [17235782.336000] end_request: I/O error, dev sda, sector 1474
Aug 3 10:45:20 localhost kernel: [17235782.336000] Buffer I/O error on device sda1, logical block 1237
Aug 3 10:45:20 localhost kernel: [17235782.336000] lost page write due to I/O error on sda1
Aug 3 10:45:24 localhost kernel: [17235786.772000] sd 0:0:0:0: SCSI error: return code = 0x10070000
Aug 3 10:45:24 localhost kernel: [17235786.772000] end_request: I/O error, dev sda, sector 1475
Aug 3 10:45:24 localhost kernel: [17235786.772000] Buffer I/O error on device sda1, logical block 1238
Aug 3 10:45:24 localhost kernel: [17235786.772000] lost page write due to I/O error on sda1

It doesn't seem to cause any kernel panics or make the system unstable. I can even remove the phone at this point and the kernel seems to tidy up safely, but without any data ever having been written to the device. The same phone works fine under Windows 2000.

I have several other usb mass storage devices (camera, pen drive etc) which work fine on the same dapper box.

I think the problem also affects the 2.6.17 kernel, because I have a Gentoo box with that kernel which behaves similarly.

Revision history for this message
Susan Cragin (susancragin) wrote :

It's the copy command, or the memory allocation, or something, since the same thing happens copying from CD/DVD.
I just tried copying from a CD and then a DVD, and the same thing happens in Eft. (I have all the latest updates including kernel as of August 10.)
Copying appears to get "stuck" copying files. one CAB file at 512.8 KB won't copy at all. But JPGs larger than that copied, albiet very, very slowly.
I have an AMD64 Acer Ferrari with 1GB RAM.

Revision history for this message
Susan Cragin (susancragin) wrote :

should have added to above... Linux kernel AMD 2.6.17.3.
x86-64.

Revision history for this message
Susan Cragin (susancragin) wrote :

more info posted at Ubuntu support request 1447.

Revision history for this message
towsonu2003 (towsonu2003) wrote :

<no info asked from reporter>

Changed in linux-source-2.6.12:
status: Needs Info → Confirmed
Revision history for this message
Alex Teo (alexteo21) wrote :

Hi,

I have seen this in Dapper 6.06.
My system is amd64 3800+

Same sympton. The device is detected properly.
When copying file, it just hang after a while. (It still shows progress but the time gets longer and longer)

Revision history for this message
Niels Kristian Bech Jensen (nkbjensen) wrote :

I've hit this bug with Edgy release (2.6.17-10-generic kernel) on a Toshiba Satellite Pro 460CDT laptop and an Apacer Handy Steno USB pendrive. Reading from the drive hangs after a while. Nothing in dmesg.

The drive works on my desktop running Dapper and also worked on the laptop running Slackware 10.2 (2.4.xx kernel).

One small difference between the two systems: USB is uhci on the desktop and ohci on the laptop.

Changed in linux-source-2.6.17:
status: Unconfirmed → Confirmed
Revision history for this message
Alex Teo (alexteo21) wrote :

What do I need to do to fix this?
I am a newbie in linux and kernel stuff. I do have development experience.

My mouse is also freezing intermittenly. Is this also the cause of my mouse problem?

Thanks,

Revision history for this message
alzibub (alex-zeffertt) wrote : Re: [Bug 17881] Re: usb flash memory hangs after copying few MB

On 06/11/06, Alex Teo <email address hidden> wrote:
> What do I need to do to fix this?
> I am a newbie in linux and kernel stuff. I do have development experience.
>

There is no fix at the moment. But you can:

1. Buy an alternate USB pendrive.

2. Use a linux-2.4.x based distro

> My mouse is also freezing intermittenly. Is this also the cause of my
> mouse problem?

Is it USB? If not, then I doubt this is related.

- my 0.02 GBP

>
> Thanks,
>
> --
> usb flash memory hangs after copying few MB
> https://launchpad.net/bugs/17881
>

Revision history for this message
Alex Teo (alexteo21) wrote :

Yes, I am having a USB optical mouse

Revision history for this message
wen (wendelinhw) wrote :

I get the same problem with xubuntu edgy eft and already saw it with xubuntu
dapper drake on my 8 years old laptop.l
Both usb and cdrom hang after copying some mb, both when i am copying from filemanager thunar to the desktop and when copying via cp.
When copying from cdrom i am able to copy a bigger amount of data than from usb before it hangs. As the connection to the cdrom is faster, i guess its more time depending problem and not the amount of data itself is causing the crash.

regards,
wen

Revision history for this message
wen (wendelinhw) wrote :

First:
I got the same problem when using scp to copy files from cdrom to harddisc.

Second:
After the failing attempt to copy the data, its not possible to browse the cdrom via thunar anymore. It seems to be seeking but obviously kind of lost the connection to the device. So i guess its not o problem of memory allocation.

Revision history for this message
wen (wendelinhw) wrote :

Still got the same problem after stopping hal by

sudo /etc/init.d/dbus stop

I added the usbstick to fstab and mounted manually. Copying still hangs after some mb.

Revision history for this message
thierry13 (t-durand) wrote :

Hi,

I had exactly the same problem when updating to edgy, I went back to dapper 6.06LTS where it works perfectly.

Revision history for this message
Stefan Hinker (stefan-hinker) wrote :

As time goes by....

It seems *my* problems were hardware related. I don't have any issues with an
external card reader, only the built-in one I used has problems. So this seems
to be defective hardware. Sorry for the confusion. Please be aware that this is only
related to my own postings and does not imply that others don't have further issues.

stefan

Revision history for this message
chokuchou (chokuchou-gmail-deactivatedaccount) wrote :

Unfortunately I have exactly the same problem since I upgraded to Edgy. I could go back to Dapper but I think that is ridiculous... An upgrade should be more stable than the previous version and I don't understand how this could happen! I would never go back to an old version of Ubuntu, if there are no other options left I will switch to another distro (Fedora has no problems copying large files).

I'm still having a few more problems with Edgy but I doubt their related.

It's nice to see that the 2.6.12 version of the problem has such a high priority, maybe the 2.6.17 version could also get a high priority!?

Revision history for this message
RMS-mit (robert-smit-alcatel-lucent) wrote :

I had similar issues with kubuntu 6.10 I rolled back to ubuntu 6.06 and found that my "innoDisk DU Card" now works fine.

But My newer larger EasyDisk still had a problem (be-it slightly different) it now refused to mount. Found that fdisk complained about the partition table being non standard. After repartitioning the pendrive and formating it back to FAT32 it now works fine in all machines (ubuntu, windows-XP and Mac-book OS-X 10.4).

Revision history for this message
arnox (arno-grbac) wrote :

Not sure if it will help, but I get this with kernel 2.6.17-10 when plugging in a USB cell phone. I also have tried different cell phones (Ericsson W600 and Nokia 6133), with same results:
the system may run for a little while (it varies from a few seconds to minutes), then the mouse stops responding and the entire system is frozen - it doesn't respond to remote pings, so I assume it's completely gone.

I too have a USB keyboard and a mouse, and both phones have internal storage - this is where the similarity with USB memory comes in.

The last few kernel log file entries are USB related:

usb%%d: unregister 'rndis_host' usb-0000:00:10.3-1, RNDIS device
unregister_netdevice: device usb%%/f155d800 never was registered
rndis_host: proble of 4-1:1.9 failed with error -110
usbcore: registered new driver rndis_host
.......and then we freeze!

Hope this helps

Revision history for this message
jimbo (jimmaroulis) wrote :

Hello everyone,

I agree with chokuchou . I discovered this problem just today after having installed Ubuntu Edgy Eft 6.10 a few weeks ago.
My kernel version is 2.6.17-11-generic
I tried transferring about 1 GB of files to my external USB hard drive and I get the same I/O error as the others. My hardware is just fine as is the integrity of the files themselves. The proposed solution was to install a 2.4.x kernel which I find quite silly since a 2.6.x kernel should be far better than an earlier kernel. Are the people at Ubuntu doing something about this as it's now the 11th of February 2007? In the meantime I'll just have to use Windows XP to perform this trivial operation.
Any help is appreciated.

Many thanks

Revision history for this message
zcat (zcat) wrote :

I'm not sure if I have the same problem, but it's quite similar and has happened on two different machines (both running Feisty), multiple USB ports, different logins, and with two completely different MP3 players.

I start to copy a significant amount of files, and after a short time I get all the symptoms of the device having been unplugged. This happens about one time in ten, perhaps more often if I start copying several folders in parallel.

I glanced in dmesg the first time it happened and nothing seemed out of the ordinary, it looked as if I had just unplugged the drive (at the time I assumed I had just bumped the cable).

Changed in linux-source-2.6.12:
assignee: ben-collins → brian-murray
status: Confirmed → Rejected
Changed in linux-source-2.6.17:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
Revision history for this message
GreatBunzinni (greatbunzinni) wrote :

I have an Acer Aspire 1524, which came with a PCMCIA flash card reader from Acer. The card reader takes eternities to automount and when I try to read from/write to it, the reading/writing becomes idle and system grinds to a halt and becomes unusable.

I'm running Kubuntu 7.04 with linux kernel 2.6.20.

Revision history for this message
elele (elele-deactivatedaccount) wrote :

Same problems here with Fiesty (AMD64), a Nokia 3110c cell phone, a Sony-Ericsson W300i phone and a Canon PowerShot G6 digital camera. The system just randomly hangs with nothing particularly interesting in system logs. On the SE phone this caused file system corruption and bricked the device after a system freeze while copying files to the phone flash memory. The strange thing is that other USB mass storage devices, like external hard drives, seem to work fine. It's just the flash memory based devices that cause these serious lockups.

I've seen this happen on Ubuntu Edgy (2.6.17-11), now on Feisty (2.6.20-16) and on even on Feisty with a custom 2.6.21.1 kernel. At least it's consistent... *sigh*

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

I seem to have a very similar problem (Feisty).
I try copying files over to my Sony-Ericsson W300i and it...
a.) Slows copying at some point
b.) Stops copying at some point
c.) Copies (Never with a lot of files)
d.) Copies but makes disk unmountable ("Writing Data to Device"). It eventually comes up with an error.

Some of the above might be the same thing with my patience varying...

I don't think it helps that this device has 2 "drives" on it. One for phone internal memory, and 1 for memory card.

On a.) dmesg prints out
[ 1434.553640] sdb: rw=0, want=1945592, limit=1945231
[ 1434.553925] attempt to access beyond end of device
[ 1434.553930] sdb: rw=0, want=1945593, limit=1945231
[ 1434.554227] attempt to access beyond end of device
(quite a few more times)

I'm planning to eventually try this on gutsy where they have new USB Flash drive stuff.

Changed in linux-source-2.6.12:
assignee: brian-murray → nobody
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

The bug still exists in feisty with some new additions.

Copy in Nautilus said it wrote 200 something files, it really wrote 22
according to my phone.
Occasionally files get mixed together, ~30 seconds of this song plus 30
seconds of 2 other songs.

On 6/12/07, Brian Murray <email address hidden> wrote:
>
> ** Changed in: linux-source-2.6.12 (Ubuntu)
> Assignee: Brian Murray => (unassigned)
>
> --
> usb flash memory hangs after copying few MB
> https://bugs.launchpad.net/bugs/17881
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
seb35690 (sebastien-reverdy) wrote :

I seem to have the same problem (Feisty).
 Copies but makes disk unmountable ("Writing Data to Device"). It eventually comes up with an error.

dmesg prints out some messages :
[ 4774.567675] usb 5-7: reset high speed USB device using ehci_hcd and address 3
a few times
[ 4940.351209] usb 5-7: device descriptor read/64, error -71
 4942.254493] usb 5-7: USB disconnect, address 3
[ 4942.257576] sd 3:0:0:0: SCSI error: return code = 0x00010000
[ 4942.257583] end_request: I/O error, dev sdc, sector 327375191
[ 4942.257614] Buffer I/O error on device sdc7, logical block 237295400

Revision history for this message
seb35690 (sebastien-reverdy) wrote :

Oups ! I think it's not the good bug for me, sorry...It's the bug 61235.

Revision history for this message
Sihabul Milah (eshabe) wrote :

Hi,
I have a similar problem (at USB2.0)
I'm a newbie at linux.

Here are my trials:
(use a folder contains 102 files / 61.1MB)

Normal:
write trials, hangs at 2nd trial.

cat 64 > /sys/block/sdb/device/max_sectors
write trials, hangs at 1st trial.

modprobe -r ehci_hcd
(force to work at USB1.1)
write trials: 3x, OK - slow
read trials: 3x, OK - slow

modprobe ehci_hcd
(reuse the module after removed)
write trials: 10x, OK - fast
read trials: 10x, OK - fast

Boot without the flash memory pluged
modprobe -r ehci_hcd
modprobe ehci_hcd
Plug the flash
write trials: 5x, OK - fast
read trials: 5x, OK - fast

Boot without the flash memory pluged
Plug the flash
write trials: hangs at 4th trial.

Is it module/driver loading problem?

Revision history for this message
TJ (tj) wrote :

Sihabul, thank you for your report. It helps in providing a reproducible test-case.

Can you let us have the make/model of the PC (including BIOS version), and the make/model of the flash-memory device?

Are you connecting the USb flash-memory device directly to a USB port on the PC, or into an external hub or card-reader. If either of the latter please also include the make/model of those so we can understand your configuration.

Also, please include the following additional information (pay attention to lspci's additional options), as required by the Ubuntu Kernel Team:

1. Please include the output of the command "uname -a" in your next response. It should be one, long line of text which includes the exact kernel version you're running, as well as the CPU architecture.
2. Please run the command "dmesg > dmesg.log" after a fresh boot and attach the resulting file "dmesg.log" to this bug report.
3. Please run the command "sudo lspci -vvnn > lspci-vvnn.log" and attach the resulting file "lspci-vvnn.log" to this bug report.

For your reference, the full description of procedures for kernel-related bug reports is available at http://wiki.ubuntu.com/KernelTeamBugPolicies. Thanks in advance!

In addition, can you restart the PC, run the test you mentioned:

Boot without the flash memory pluged
Plug the flash
write trials: hangs at 4th trial.

and attach the /var/log/kern.log file to this bug report/

Changed in linux-source-2.6.22:
assignee: nobody → intuitive-nipple
Revision history for this message
Sihabul Milah (eshabe) wrote :

Hello TJ,

Here is my machine:
MotherBoard: ECS P4M800
AMI BIOS v2.59
FlashDisk: Kingston DTI/1GB

The FlashDisk is connected to PC directly.

Revision history for this message
Sihabul Milah (eshabe) wrote :
Revision history for this message
Sihabul Milah (eshabe) wrote :
Revision history for this message
Sihabul Milah (eshabe) wrote :

version: Ubuntu 2.6.20-16.31-386
uname: Linux alisya-desktop 2.6.20-16-386 #2 Fri Aug 31 00:51:58 UTC 2007 i686 GNU/Linux

Revision history for this message
Martin Emrich (emme) wrote :

Hi!

I have the same problem here since I installed my new motherboard (AMD 690G Chipset). I copied data from my external HD, and after a few hundred megabytes, the cp process freezes in the "D"-state. Any process attemting to access the device freezes, too. Unplugging the device does not change it either, I can only shutdown the computer.

Other USB disks plugged in afterwards are not recognized either.

There are no error messages in dmesg. Attached is the output of "lspci -v". I am running linux 2.6.22-12-generic (gutsy, amd64).

Ciao

Martin

Revision history for this message
willisoften (will-copeland) wrote :

I have the same problem in gutsy (AMD64) with a WD Passport HDD drive. I can copy some information then the whole desktop freezes.

The machine seems to be running but completely unresponsive to mouse or keyboard input.

I can however shutdown with Alt +SysRq reisub - that's the only thing that works.

Can't even Ctrl + alt F3.

Will

Revision history for this message
David C (da-cas) wrote :

I appear to be suffering the same problem on my Feisty Fawn (Linux ubuntu 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686)

The problem happens if I attempt to copy a large tree from the flash drive.
I have tried this using Nautilus (and it fails after a while).
I have also been doing:
tar -C /media/disk -cf - david | tar xfB -

I have attached the output of HAL running in verbose more during the fault (look at the section between 17:07 and 17:09)

Is this a kernel problem or a HAL problem? I see it is marked as a kernel problem, but was wondering if HAL might be doing something.

Revision history for this message
David C (da-cas) wrote :

And output of lshal.

Revision history for this message
David C (da-cas) wrote :

Just been googling for other reports on this and have found a workaround that is good for me:
Remove the USB 2.0 support provided by ehci_hcd:

root@ubuntu:~# rmmod ehci_hcd

Then the copy works (but takes a long time, because USB is now 1.1).

Hope this helps others to track down the problem: I do not want to have to use USB 1.1 if I can help it.

Revision history for this message
willisoften (will-copeland) wrote :

Yes I noticed that I had no problems copying to hard disk mp3 player that uses USB 1.1 - however I've noticed that I have the same problem copying from a samba share.
(Using windows machine to mount the usb drive)

I really can't access any information the Linux machine is completely frozen. I can possibly ssh into it from a another machine - but it's not set up for that yet.

As it seems to be a combination of things not entirely related to USB 2.0 I've filed a seperate bug at 158024. Although in retrospect perhaps I shouldn't have.

Incidentally Alt +SysRq reisub isn't working all the time either.

W

Revision history for this message
David C (da-cas) wrote :

There are a number of issues related to USB flash drives discussed in #61235.
These suggest that you have to adjust the max_sectors parameter for your drive: the suggestion was to reduce from 240 to 128. There are other parameters discussed there that may also help.

On my copy test for my flash drive, 128 was still giving errors and I had to reduce max_sectors to only 32.
However, the copy time doesn't seem too bad.

I'm going to try and mark this thread as a duplicate of 61235.

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.