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."

5 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. 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 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. 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
  4. 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.