2004-01-14 09:15:28

by Andrea Pusceddu

[permalink] [raw]
Subject: [USB-STORAGE] Repeatable lost files problem

Hello,

I have a weird repeateable problem using a mp3 player (Medion PRO2 256 MB)
seen under linux as a usb mass storage, through usb-storage module.

Device: MP3 Player and USB storage device (256MB)

vendor ID 0x66f (Sigmatel Inc)
chipset ID : 0x8000

It is reported to work correctly with usb-storage on
http://www.qbik.ch/usb/devices/index.php

relevant modules: usb-storage, usb-ohci
Debian Woody (stable) with default kernel 2.4.18bf
hotplug or usbmgr (same problem with both)

This is how to reproduce the trouble:
1) plug in the device
2) mount -t auto /dev/sda /mnt/usbdrive
3) cp ./filecopiedfromlinux.foo /mnt/usbdrive
4) ls /mnt/usbdrive :
filecopiedfromwindows.foo
filecopiedfromlinux.foo
5) umount /mnt/usbdrive
6) unplug physically the device, i.e. disconnect it from usb port
7) from the Player LCD display i can actually see both files, and I can
even listen to them, if they are MP3 audio files. So the files ARE in the
usb drive! I do swear it :)

But if now the weirdness comes up: if I do as follows:

8) plug in the device again
9) mount again as in step 2)
10) ls /mnt/usbdrive :
filecopiedfromwindows.foo

The file copied from Linux has been deleted! What's weird, IMHO, is that
ONLY the file(s) copied from Linux are lost, regardless of file content and
size. File(s) copied by means of windows are not "volatile" , i.e. they
persist between the sessions! Astonishing, isn't it?

Some additional info:
a) If I skip step 6), thus I don't disconnect physically the device, then
the problem disappears.
b) If I perform steps the corresponding of steps 8, 9, 10 using windows,
the filecopiedfromlinux are lost as well.
I think there's something wrong with the chipset, even if its reported as
working.
c) I can read and copy and use all files in the usb drive, without any
problems. If don't remove the usb player, I don't experience any
corruption.
d) My Linux Box is rather old (AMD K6-II 400 MHz, 512 MB Ram), but it works
well and is stable.
e) Sometimes it's possible to recover files using some undelete utility.

I can post dmesg output if this can help, or give you any other information
you may need to focus the problem.

Sorry for the very long message, but I wanted to be as more precise as i
can.
Thank you for the time you all spend in developing Linux kernel, I think
that our poor world is a bit better also because of you.

--
Call me Ishmael


2004-01-14 19:56:31

by Matthew Dharm

[permalink] [raw]
Subject: Re: [USB-STORAGE] Repeatable lost files problem

Based on this data, I'm guessing that the player is attempting to perform
some sort of special test on the data. If the file doesn't conform, or if
the filesystem is 'different' in some way, it obliterates the offending
material.

Your information suggests that the file-transport and storage itself are
just fine. The material is only lost when the MP3 player's firmware runs
for a little while.

Matt

On Wed, Jan 14, 2004 at 10:13:20AM +0100, Andrea Pusceddu wrote:
> Hello,
>
> I have a weird repeateable problem using a mp3 player (Medion PRO2 256 MB)
> seen under linux as a usb mass storage, through usb-storage module.
>
> Device: MP3 Player and USB storage device (256MB)
>
> vendor ID 0x66f (Sigmatel Inc)
> chipset ID : 0x8000
>
> It is reported to work correctly with usb-storage on
> http://www.qbik.ch/usb/devices/index.php
>
> relevant modules: usb-storage, usb-ohci
> Debian Woody (stable) with default kernel 2.4.18bf
> hotplug or usbmgr (same problem with both)
>
> This is how to reproduce the trouble:
> 1) plug in the device
> 2) mount -t auto /dev/sda /mnt/usbdrive
> 3) cp ./filecopiedfromlinux.foo /mnt/usbdrive
> 4) ls /mnt/usbdrive :
> filecopiedfromwindows.foo
> filecopiedfromlinux.foo
> 5) umount /mnt/usbdrive
> 6) unplug physically the device, i.e. disconnect it from usb port
> 7) from the Player LCD display i can actually see both files, and I can
> even listen to them, if they are MP3 audio files. So the files ARE in the
> usb drive! I do swear it :)
>
> But if now the weirdness comes up: if I do as follows:
>
> 8) plug in the device again
> 9) mount again as in step 2)
> 10) ls /mnt/usbdrive :
> filecopiedfromwindows.foo
>
> The file copied from Linux has been deleted! What's weird, IMHO, is that
> ONLY the file(s) copied from Linux are lost, regardless of file content and
> size. File(s) copied by means of windows are not "volatile" , i.e. they
> persist between the sessions! Astonishing, isn't it?
>
> Some additional info:
> a) If I skip step 6), thus I don't disconnect physically the device, then
> the problem disappears.
> b) If I perform steps the corresponding of steps 8, 9, 10 using windows,
> the filecopiedfromlinux are lost as well.
> I think there's something wrong with the chipset, even if its reported as
> working.
> c) I can read and copy and use all files in the usb drive, without any
> problems. If don't remove the usb player, I don't experience any
> corruption.
> d) My Linux Box is rather old (AMD K6-II 400 MHz, 512 MB Ram), but it works
> well and is stable.
> e) Sometimes it's possible to recover files using some undelete utility.
>
> I can post dmesg output if this can help, or give you any other information
> you may need to focus the problem.
>
> Sorry for the very long message, but I wanted to be as more precise as i
> can.
> Thank you for the time you all spend in developing Linux kernel, I think
> that our poor world is a bit better also because of you.
>
> --
> Call me Ishmael
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
Matthew Dharm Home: [email protected]
Maintainer, Linux USB Mass Storage Driver

Okay, this isn't funny anymore! Let me down! I'll tell Bill on you!!
-- Microsoft Salesman
User Friendly, 4/1/1998


Attachments:
(No filename) (3.44 kB)
(No filename) (189.00 B)
Download all attachments

2004-01-15 11:33:48

by Andrea Pusceddu

[permalink] [raw]
Subject: Re: [USB-STORAGE] Repeatable lost files problem

[....]
> I'm guessing that the player is attempting to perform
> some sort of special test on the data. If the file doesn't conform, or if
> the filesystem is 'different' in some way, it obliterates the offending
> material.
[....]

Dear Matthew,

thank you for your reply. One thing I really can't understand is HOW can a file copied
from linux be different from the same file copied from Windows, once it has been
"wrote" into same the usb drive; it's really odd, isn't it? It seems kind of FUD to
discourage Linux users :)

If we were able to find out that difference it could be possible to "emulate" the way
windows flags the copied files (just guessing, I'm not a kernel hacker..)
If you believe that this odd behavior is worth a further investigation, I'm available for
your tests, I could run diagnostic tools, try out new drivers, and so on.

The MP3 player supports the firmware upgrading, but in the producer web site that
particular device is not listed.
It's annoying, honestly only Windows support was mentioned in the player handbook so
I knew I could meet problems with my Debian box, but once I saw the chipset was
supported, and I mounted in on /dev/sda, and I downloaded my data from it... :)

Do you think that it's worth to try out with the 2.6 Kernel, or there aren't any important
changes related to usb-storage that may help?

Thank you again for the great work you are doing with usb-storage, and for the time you
spent reading my messages.

Best Regards,
Andrea