-   Linux - Hardware (
-   -   copying/moving stalls when moving a lot of data to a usb stick (

=X= 07-27-2004 05:35 AM

copying/moving stalls when moving a lot of data to a usb stick
I have a 256 SanDisk Cruzer Mini USB stick. It works as expected if you only use it for a certain ammount of data, like a few megabytes. However when you try to fill it with data, he always stalls. This means that he stops putting data on it or moving data from it. When I kill the cp/mv command and try again, nothing happens. Only remounting seems to work, but usually I takes another remount until the stick is finally filled. It can't be the stick itself since I've used this on windows boxes as well and it always worked there...

Is this a known issue or am I the only one?

My kernel is 2.6.7 vanilla and my distro Arch Linux.

b0uncer 07-27-2004 06:00 AM

hmm...I have too a Cruzer Mini, just the same as you do, and use Arch linux. I haven't seen this problem, but on the other hand I haven't tried to move that big files...I'm going to try that and tell what I get :)

also, my kernel is 2.6.6 at the moment..I'll post here after I've experimented. just that I got to find some nice file like 250 megabytes :)

=X= 07-27-2004 06:15 AM

b0uncer: actually it's not 1 big file but a lot of smaller files from 1-5 mb (like images, music,...)

I'm using usb2 btw, in case this is not usb1 related

my dmesg output is:

usb 1-5: new high speed USB device using address 2
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Generic  Model: STORAGE DEVICE    Rev: 1033
  Type:  Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
 /dev/scsi/host0/bus0/target0/lun0: p1
Attached scsi removable 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 Mass Storage device found at 2
usb 1-5: reset high speed USB device using address 2
usb 1-5: reset high speed USB device using address 2
usb 1-5: USB disconnect, address 2

b0uncer 07-27-2004 06:18 AM

took a while to pack some files into a larger package..anyway, here are the results: I tried putting on the usb-stick a file the size of 202,5MB, and copying it caused no problems - everything went fine, I tried umounting and remounting after that and saw that it was a success.

I might do some more tests with moving files and copying them off of the stick, but for me it looks like my stick and system work..

EDIT: another "problem" was found...heh, looks like after copying to stick and then removing the data wouldn't free up the space. doing df after copying data and removing it (even umounting/remounting) shows me that 95% of the space is still in use in the stick.. :P altough it should be empty. I guess this is just some childish error, the new free space isn't calculated correctly or something...gotta think about this. haven't happened before :)

EDIT2: yes I use usb2 too. sorry I got the picture it was a big file...hey, but that's not a problem..I'll just try copying over many smaller files :) post here later when I've tried it..

=X= 07-27-2004 06:27 AM

I just tried another usb stick (same model though), and now it stalled at 67% (also moving music files to it), and I couldn't umount it for a couple of minutes, even though the copy process was stalled, the device was still busy it seemed

So this really excludes hardware problems

EDIT: after removing (which doesn't have any problems) that 67% files, I don't have the problem you have, the files don't take up any space anymore

b0uncer 07-27-2004 06:38 AM

ok, here's some more results.

I tried moving as much music, image and video files (mp3, ogg, jpg, mpg, sizes about 1-6MB) to the stick I could, and it produced no problems. no stalls, and I was able to umount/remount normally after the process..also, removing works now :) the problem was, the first time I did this I removed the files via gnome's GUI tools and they dumped them into a trashcan, and the stick's space was freed only after I emptied the trashcan. I retried this in console, and no problems.

so, seems like my Cruzer works..could it be kernel or some other config, then? I mean, I have older kernel than you do...but my Arch is up-to-date.

if you want me to post here some proc-info or anything else about my Cruzer, just ask..too bad if your Cruzer stalls :/

=X= 07-27-2004 10:16 AM

well if it works for you, and if multiple usb sticks give this problem on my box, then there must be something wrong with my configuration

usb stuff compiled into the kernel: (with cat configfile | grep "^CONFIG_USB")


all the rest is commented out

I have libusb installed, but not usbutils or hotplug

b0uncer 07-28-2004 06:00 AM kernel config has the same options checked as you do (plus some more)..and I have libusb and usbutils installed (but not hotplug).

btw, do you get any errors when your usb-stick stalls? in dmesg or /var/log/errors or /var/log/kernel or something..?

xirus 07-28-2004 06:52 AM

I've done some more tests, and this is what happens:
1) after the cp/mv command, he executes that and puts a certain ammount of data (+- 100mb) on the stick (or moving it from the stick to my disk)
2) he stalls and doesn't do a thing for a few minutes
3) he continues putting data on the disk (again about 100mb)
4) stalls again for a few minutes
5) copies the remaining data on the disk (it's a 256mb disk so if it was a 512 I think it would have stalled a couple of times again)

So if I'm patient enough, it does work, not at usb2 speeds though :(
Somehow after a certain ammount of data he gets tired and takes a lunchbreak or something

/var/log/errors had nothing important to tell, but I've found this in /var/log/kernel

Jul 28 12:12:45 a2800 kernel: USB Mass Storage device found at 2
Jul 28 12:15:41 a2800 kernel: usb 1-5: reset high speed USB device using address 2
Jul 28 12:17:15 a2800 kernel: usb 1-5: reset high speed USB device using address 2
Jul 28 12:19:10 a2800 kernel: usb 1-5: reset high speed USB device using address 2
Jul 28 12:22:50 a2800 kernel: usb 1-5: reset high speed USB device using address 2
Jul 28 12:29:50 a2800 kernel: usb 1-5: USB disconnect, address 2

Minutes 15, 17, 19 and 22 are the most interesting of course... The same lines can be found in yesterday's log (only I always disconnected the stick after the first stall then) Google doesn't know these errors :/

When I have issued a cp/mv command, and try to stop that with ctrl+c, it takes a very long time before he actually kills that command

edit: sorry for the nick change, it's still me though :) - that ugly one is an old relic that I can't even type under linux ;)

xirus 07-29-2004 07:59 AM

woohoo, the mistery has been solved!

I tried my stick on another usb port on my system (in the back, I always tested it using the one on the front of my case) and it went fine - multiple times

something must be wrong with those front usb ports :scratch:

thanks for your help b0uncer, it helped me exclude software problems and since it couldn't have been the stick, it had to be the usb port

b0uncer 07-30-2004 06:29 AM

yeah..sorry I couldn't be of bigger help :) but good it worked. I wonder, though, what might be wrong with the front usb ports..mine work well. if you have multiple front ports (2 for example, like I do), try the other one(s) too..if all the front ports do not work well, then it might have something to do with wires or the plugs (just a guess).

also, I've read some time ago an article in the net that told that there have been some usb-related issues with some motherboards, and that these problems could be overcome by doing some hacking..but I guess it's not your problem since the back-side usb-ports work.

All times are GMT -5. The time now is 03:07 AM.