Slashdot Mirror


EXT4 Data Corruption Bug Hits Linux Kernel

An anonymous reader writes "An EXT4 file-system data corruption issue has reached the stable Linux kernel. The latest Linux 3.4, 3.5, 3.6 stable kernels have an EXT4 file-system bug described as an apparent serious progressive ext4 data corruption bug. Kernel developers have found and bisected the kernel issue but are still working on a proper fix for the stable Linux kernel. The EXT4 file-system can experience data loss if the file-system is remounted (or the system rebooted) too often."

23 of 249 comments (clear)

  1. Re:Bisected? by Slayne · · Score: 5, Informative

    Nope - bisection is a common technique for tracking down the cause of a bug by doing a binary search through the code history.
    https://en.wikipedia.org/wiki/Code_Bisection

  2. Re:Bisected? by Gothmolly · · Score: 4, Funny

    No this means the kernel has bug-like tendencies from time to time, but is not exclusively buggy. For instance when it's in college, or if its at a bar, and has had a few drinks, well then it might be buggy, but normally at work and at home and to all its friends it acts stable.

    --
    I want to delete my account but Slashdot doesn't allow it.
  3. This is why I stick to Reiser by Anonymous Coward · · Score: 5, Funny

    I know he'd never do anything to harm me or my data.

  4. I don't see the problem then... by Zapotek · · Score: 5, Funny

    The EXT4 file-system can experience data loss if the file-system is remounted (or the system rebooted) too often.

    We're talking about Linux users here...move along.

  5. Really clever... by K.+S.+Kyosuke · · Score: 5, Funny

    The EXT4 file-system can experience data loss if the file-system is remounted (or the system rebooted) too often."

    They're trying to boost the average uptime of all installations by making people keep their machines turned on. It's just a continuation of the uptime war waged with the BSD folks!

    --
    Ezekiel 23:20
  6. Interesting bug, but don't get excited. by dacut · · Score: 5, Informative

    From Ted Ts'o's commentary, it's an optimization ("jbd2: don't write superblock when if its empty") gone awry:

    The reason why the problem happens rarely is that the effect of the buggy commit is that if the journal's starting block is zero, we fail to truncate the journal when we unmount the file system. This can happen if we mount and then unmount the file system fairly quickly, before the log has a chance to wrap.

    Basically, this optimization has the side effect of not updating the transaction log in this rare case. You can end up replaying old transactions after new ones, which will scramble metadata blocks. Given the rather unique conditions needed to hit this one, I'm not going to lose any sleep over any servers running without Ted's fix (though I'll certainly apply it once RedHat releases the patch).

    1. Re:Interesting bug, but don't get excited. by Tough+Love · · Score: 4, Informative

      It means you could get an incorrect replay after a crash and end up needing to do a fsck. Good thing Ext2/3/4 fsck is awesome. Of course, having no replay bug will be much better. Note: the bug was introduced this October 8th. You are not running this kernel on your server or workstation unless you are a dev, it hasn't filtered through to distros yet.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    2. Re:Interesting bug, but don't get excited. by Anonymous Coward · · Score: 5, Informative

      Ubuntu users are at risk.

      http://www.ubuntuupdates.org/package/core/quantal/main/proposed/linux-image-3.5.0-18-generic

      Look for " jbd2: don't write superblock when if its empty
              - LP: #1066176"

      If any Ubuntu users have proposed repo enabled and they've updated to 3.5.0-18, they're vulnerable.

    3. Re:Interesting bug, but don't get excited. by fatphil · · Score: 4, Informative

      $ git show eeecef0af5e
      commit eeecef0af5ea4efd763c9554cf2bd80fc4a0efd3
      Author: Eric Sandeen <sandeen@redhat.com>
      Date: Sat Aug 18 22:29:40 2012 -0400

              jbd2: don't write superblock when if its empty

      --
      Also FatPhil on SoylentNews, id 863
  7. Re:Bisected? by petermgreen · · Score: 4, Informative

    What they actually split in half is a sequence of changesets (also known as commits).

    The idea is you have a seqence of changesets that take you from the last known good revision to the first known bad revision. By splitting that sequence in half and determining if the revsion in the middle is good or bad you can in principle halve the number of revisions between last known good and first known bad until you find the revision that introduced the bug. Reality is messier because of nonlinear history, because some revisions may be "broken" such that it is not possible to determine if they are "good" or "bad" and because some bugs may be difficult to test for but still bisection is a useful tool for finding problem revisions among a long history relatively easill.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  8. Re:Reiserfs became 'murderfs'... by Anonymous Coward · · Score: 5, Funny

    So clearly the answer is General Tso's FS. Delicious, but you'll lose your data an hour later.

  9. Your Papers Please by Anonymous Coward · · Score: 5, Funny

    grammar nazi's

    grammar Nazis

  10. Summary is wrong by DrJimbo · · Score: 5, Informative

    The EXT4 file-system can experience data loss if the file-system is remounted (or the system rebooted) too often.

    This is wrong. The problem occurs when the fs is unmounted too *soon*. Twice in a row. The bug only appears if the journal buffer does not wrap. You only get catastrophic results if this happens twice in a row.

    --
    We don't see the world as it is, we see it as we are.
    -- Anais Nin
    1. Re:Summary is wrong by Anonymous Coward · · Score: 5, Interesting

      This appears to be untrue. My latest tests suggest that it happens if a single unclean umount happens while the fs is mounted in 3.6.3. (At least, I saw corruption in /var after a single boot, followed by a rescue boot into 3.6.1 and fsck: every filesystem that had journal replay invoked also had corruption.)

        -- N., original reporter, not much enjoying his fifteen minutes of fame since it comes with happy fun filesystem corruption attached: captcha is 'contrite', how appropriate

  11. Re:Reinventing the wheel by UnknownSoldier · · Score: 4, Interesting

    I have to agree with you. This is one of the best demos of ZFS around :)
    http://www.youtube.com/watch?v=QGIwg6ye1gE

    ZFS solves 3 problems by taking a wholistic approach:

    * Volume Management
    * File System
    * Data Integrity

    Instead of fragmenting the problem into 3 layers which only have limited access and knowledge by using a unified layer you have more meta-information available to make smarter decisions.

    Some interesting essays:

    https://blogs.oracle.com/bonwick/entry/raid_z
    https://blogs.oracle.com/bonwick/en_US/entry/rampant_layering_violation

  12. Re:Low impact by jedidiah · · Score: 5, Insightful

    > Windows has never had anything as serious as a file system corruption bug.

    That you know of...

    Since the Windows development process isn't open, there's no way for you to tell. You don't get to see Microsoft's development versions and you don't get to see Microsoft's bug database.

    --
    A Pirate and a Puritan look the same on a balance sheet.
  13. Re:Low impact by h4rr4r · · Score: 4, Informative

    http://answers.microsoft.com/en-us/windows/forum/windows_cp-files/bug-report-serious-filesystem-corruption-and-data/17f69e19-92ca-4e1e-b9d5-f78f1ac4e963

    Bugs happen. The difference here is that Linux development is done in the open so people find out about them.

  14. Re:Reinventing the wheel by UnknownSoldier · · Score: 4, Interesting

    > Blame SUN, they choose a license for ZFS to ensure it never had proper in kernel linux support.

    That's a myth / blatant lie.

    Fork Yeah! The Rise and Development of illumos
    http://www.youtube.com/watch?feature=player_detailpage&v=-zRN7XLCRhc#t=1460s

    Why You Need ZFS
    http://www.youtube.com/watch?v=6F9bscdqRpo
    @5:40 I just want to clarify you comment "It would be illegal to ship"
    @5:45 I think there is a perception issue that we need to tackle.
    @5:55 One point that I would like to make because I think said earlier that I think we have much more in common then that separates us.
    @5:58 One of the most important things we all have in common is we are all open source systems.
    @6:02 And we need to end this self inflicted madness of open source licensing compatibility.
    @6:12 I think that it is a boogey man and we letting it us hold us back.
    @6:19 You say it would be illegal to ship. I say no one has standing
    @6:24 The GPL was never ever designed to counter-act other open source licenses.
    @6:33 That is a complete rewrite of history to believe the GPL was designed to be at war with BSD or with Cuddle.
    @6:39 The GPL was at war with properiety softwware. And thank the GPL and Stallman open source won.
    @6:45 That is the whole point. Open source won.
    @6:49 We are pissing on our own victory parade by not allowing these technologies to flow between systems.

  15. Re:Low impact by the_other_chewey · · Score: 4, Insightful

    That isn't a file system bug, that is progress. Would you consider it a bug if a Linux system from 1998 caused corruption on an ext4 volume?

    Hell yeah.

    If it'd tell me it doesn't know the file system and has no idea what do do with it,
    that would be perfectly fine.

    But corrupting a file system just because it is unknown to/unsupported by the
    system trying to read it would be a huge bug.

  16. Re:Low impact by sk999 · · Score: 4, Informative

    Still, for all of the shit that Linux users talk about Windows, WINDOWS has NEVER had anything as serious as a FILE system CORRUPTION bug.

    Finally, someone talking sense ... oh wait.

    http://www.computerworld.com/s/article/9054178/Microsoft_s_Windows_Home_Server_corrupts_files

    "Microsoft's Windows Home Server CORRUPTS FILES"
    "'Don't edit' list includes photos, as well as Quicken and QuickBooks files, warns Microsoft; no word on patch"

    Never mind ...

  17. Re:Bisected? by Just+Some+Guy · · Score: 4, Informative

    The summary should say "bisected and found" not "found and bisected". Bisecting is a way of finding bugs.

    No. They found the bug, then bisected the commits between "last known working" and HEAD to discover what patch caused it.

    --
    Dewey, what part of this looks like authorities should be involved?
  18. Re:Low impact by sk999 · · Score: 4, Informative

    Nice try, but fail. That wasn't a bug in Windows, it was a bug in applications.

    Really? Not according to Microsoft.

    http://support.microsoft.com/kb/946676

    "A BUG has been discovered in the way that the initial release of Windows Home SERVER manages FILE transfer and balancing across multiple hard drives. In certain cases, depending on application use patterns, timing, and the workload that is placed on the Windows Home Server-based computer, certain FILES could become CORRUPTED."

    "... For distributing data across the different hard drives that are MANAGED by WINDOWS Home Server, the WINDOWS Home Server mini-filter driver REDIRECTS I/O ... A BUG has been discovered in the REDIRECTION mechanism which, in certain cases, depending on application use patterns, timing, and workload, may cause interactions between NTFS, the Memory Manager, and the Cache Manager to get out of sync. This causes CORRUPTED data to be written to FILES."

  19. Most of the early stories on the web are wrong.... by tytso · · Score: 5, Informative

    I have a Google+ post where I've posted my latest updates to this still-developing story:

    https://plus.google.com/117091380454742934025/posts/Wcc5tMiCgq7

    Also, I will note that before I send any pull request to Linus, I have run a very extensive set of file system regression tests, using the standard xfstests suite of tests (originally developed by SGI to test xfs, and now used by all of the major file system authors). So for example, my development laptop, which I am currently using to post this note, is currently running v3.6.3 with the ext4 patches which I have pushed to Linus for the 3.7 kernel. Why am I willing to do this? Specifically because I've run a very large set of automated regression tests on a very regular basis, and certainly before pushing the latest set of patches to Linus. So while it is no guarantee of 100% perfection, I and many other kernel developers *are* willing to eat our own dogfood.