Bug 347565 - Data corruption on exFAT USB sticks.
Summary: Data corruption on exFAT USB sticks.
Status: REPORTED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR critical
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-11 19:37 UTC by Turbo
Modified: 2020-08-08 20:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Turbo 2015-05-11 19:37:11 UTC
Kubuntu 15.04 seems to correctly mount and access exFAT memory sticks. You can see and use the data on it and, apparently, succesfully unmount and extract. But at the end you will always get a "dirty volume" as when you removing the stick sudenly.

Reproducible: Always

Steps to Reproduce:
1. Take a testing USB memory, format it with exFAT file system. Do it better on any Windows computer just to be sure.
2. Copy some data/folders on it.
3. Install exFAT from Muon first on Kubuntu 15.04 and restart. (if exFAT already installed, ignore this step).
3. Insert and mount in the stick on Kubuntu 15.05. Open it with Dolphin.
4. Open any folder on it, create/modify some text file.
5. Save and close the file, close Dolphin, securely eject the memory.
6. Insert it back on any Windows computer (Win7 or better).
7. Now you got a potentially corrupt data/file estructure.

Actual Results:  
The memory will complain about structure errors, as if bad ejected. If proceed and say "fix" you will always end up with lost/damaged *.CHK files in one or more FOUND.XXX folders.

Expected Results:  
No data corruption should happen.

It took me several weeks to figure this one out because exFAT support is absolutely fine in Kubuntu 14.04. At home we have two USB sticks formated with exFAT and working Ok for years. I use Kubuntu as "toolbox" and take it everywhere; since I migrated to 15.04 was getting corrupted file system in my memory but was blaming everything else until this weekend when methodically checked and fixed, including bad sectors (none, of course) making sure it was fine on another computers. Then, I inserted, opened and tested a simple text file and voila! Damaged again.

I had to file the report here in Dolphin because there is no option for exFAT, fuse or whatever, not sure if any other component/program could be the culprit. As usual, Kubuntu 15.04, Plasma 5.3, full updates.

Regards.
Comment 1 Frank Reininghaus 2015-05-12 17:51:04 UTC
First of all, thanks for the bug report!

(In reply to Turbo from comment #0)
> I had to file the report here in Dolphin because there is no option for
> exFAT, fuse or whatever, not sure if any other component/program could be
> the culprit. As usual, Kubuntu 15.04, Plasma 5.3, full updates.

Data loss bugs are very serious and should be fixed ASAP, but one must first find out which application or library is responsible. It is definitely not Dolphin. Dolphin never writes to the text files that you modify, nor does it handle the mounting and unmounting of USB devices.

 (In reply to Turbo from comment #0)
> 3. Install exFAT from Muon first on Kubuntu 15.04 and restart. (if exFAT
> already installed, ignore this step).

If it only happens with exFAT devices, then I would suggest that you report this issue to whoever provides this 'exFAT' package that you install from the package manager. It's not provided by KDE if I'm not mistaken, so we cannot reassign your report to another product here at bugs.kde.org. If you are unsure, please report it to Kubuntu directly (and add a link to your report here).

I'll close this report as DOWNSTREAM because the problem is most likely caused by the package that provides exFAT support or something else that is outside of KDE's control, so we cannot do anything about it here at bugs.kde.org. Sorry about that!

If you get any further information from the Kubuntu people about the cause of the bug and a possible fix, feel free to add a comment here.
Comment 2 Turbo 2015-05-13 13:41:16 UTC
Thank you.

I would be happy if you could give me more ideas/test etc I can use in order to gather more info about this problem. =)

Regards.

PD: Made some more test and not always fail :-s
Comment 3 Frank Reininghaus 2015-05-14 15:09:28 UTC
I'm afraid I cannot give you more advice on what you could do in order to identify the problem because I'm not really familiar with this kind of issue.

You might want to ask about this problem in a forum of your distribution. In contrast to bug reports, forums are read by many people, so you are more likely to get a fast and useful answer there.
Comment 4 Turbo 2015-06-26 14:26:08 UTC
Hi again.

I reported the case on fuse-exfat's site more than a month ago with no answer at all.

Yet, exFAT 1.0.1-2 package (the theorical culprit) is available from at least 2014 so this kind of problem should be more frequent, right ?. So, as in the last two weeks I developed an increased interest on Xfce, decided to give it a try and installed Xubuntu 15.04; so far, quite pleased.

One of the first things I did was install exFAT and test the very same USB stick by creating dummy text files on it and then editing another(s) as I do every day. The results? Not a single error or damage to the file system so far. I will keep testing Xubuntu and reporting my findings here but my bets go against Plasma 5 now.

Regards.
Comment 5 Frank Reininghaus 2015-06-26 15:24:45 UTC
Thanks for the feedback. It could be that the cause of your problem is in KDE, but 'dolphin' is most likely the wrong product because Dolphin does not deal with low-level file system details at all. We can reopen the report, but I really don't know what product to assign it to. One of the possibilities is that Solid does not "remove" the device properly. Does the problem only happen if you "remove" the device from Dolphin (which still uses the kdelibs 4.x-based Solid version) or also if you use Plasma's device notifier (which uses the KF5 version of Solid)?
Comment 6 Turbo 2015-06-26 15:53:30 UTC
Most part of the time I remove USB sticks with the icon next to the clock  (device notifier).

Maybe is time to create a "subdivision" in bugs.kde where people can report this kind of problems. As I said in the original post, Dolphin was the closest thing I could think of in order to report the bug.
Comment 7 Frank Reininghaus 2015-06-26 16:11:07 UTC
(In reply to Turbo from comment #6)
> Most part of the time I remove USB sticks with the icon next to the clock 
> (device notifier).

Ok, thanks. I'll then reassign to the KF5 version of Solid and hope that the Solid people have an idea if removing the device was not done properly, or what else the cause of the problem might be.

> Maybe is time to create a "subdivision" in bugs.kde where people can report
> this kind of problems. As I said in the original post, Dolphin was the
> closest thing I could think of in order to report the bug.

You can always report bugs for the generic product 'kde' at bugs.kde.org if you don't know what the correct product is.
Comment 8 Turbo 2015-07-21 20:04:59 UTC
Any news on this one ?

Thank you.
Comment 9 Turbo 2015-08-26 14:30:51 UTC
Hi.

I just found the new Plasma 5.4 in KDE's website. By any chance this was looked/fixed ??.

Thank you.
Comment 10 Claudius Ellsel 2020-08-08 20:29:49 UTC
Any updates? This is a critical bug open since five years now. Is this still happening and is this the correct assigned component?