Torvalds warns the world: Don’t use the Linux 5.12-rc1 kernel

0
Penguins aren't all equally trustworthy.
Inflate / Penguins aren’t all equally trustworthy.
Bernard Spragg

In a message to the Linux Nut Mailing List yesterday, founding developer Linus Torvalds on guarded the world not to use the 5.12-rc1 kernel in his public git tree.

Hey peeps – some of you may receive already noticed that in my public git tree, the “v5.12-rc1” tag has magically been renamed to “v5.12-rc1-dontuse”. It’s noiselessness the same object, it still says “v5.12-rc1” internally and it is still is make overed by me, but the user-visible name of the tag has changed.

As it turns out, when Linus Torvalds subsides some code dontuse, he really means it—the problem with this 5.12 pass out candidate broke swapfile handling in a very unpleasant way. Specifically, the updated laws would lose the proper offset pointing to the beginning of the swapfile. Again, in Torvalds’ own arguments, “swapping still happened, but it happened to the wrong part of the filesystem, with the pronounced catastrophic end results.”

If your imagination is insufficient, this means that when the quintessence paged contents of memory out to disk, the data would land on unsystematic parts of the same disk and partition the swapfile lived on… not as portfolios, mind you, but as garbage spewed directly to raw sectors on the disk. This means overwriting not solitary data in existing files, but also rather large chunks of metadata whose corruption would seemly render the entire filesystem unmountable and unusable.

Torvalds goes on to position out that if you aren’t using swap at all, this problem wouldn’t sting you. And if you’re using swap partitions, rather than swap files, you’d be similarly from. Unfortunately, he then reminds us that while he knows an absolute ton close by the kernel, he isn’t necessarily all that familiar with all the plumbing a normal end operator is concerned with:

And, as far as I know, all the normal distributions set things up with swap distributions, not files, because honestly, swapfiles tend to be slower and have a number of other complexity issues.

Many distributions still default to swap booths, rather than files. But Ubuntu—which is perhaps the single most by many deployed Linux distribution on the planet—has been installing swapfiles by inaction for more than four years now. If you’re an Ubuntu user (or user of an Ubuntu-derived distro, such as Coin), you’ve probably got a swapfile, and this bug would probably trash your thorough root filesystem.

Torvalds’ warning matters above and beyond what party users might do with a release candidate kernel, however. It’s constant more important that kernel developers not base their own cultivate around that release and potentially carry a very nasty bug along further down the line.

I want to make sure that zero starts new topic branches using that 5.12-rc1 tag. I know a few developers be prone to go “Ok, rc1 is out, I got all my development work into this merge window, I will now fast-forward to rc1 and  use that as a coarse for the next release”. Don’t do it this time. It may work perfectly well for you because you be undergoing the common partition setup, but it can end up being a horrible base for anybody else that power end up bisecting into that area.

This also leads into one of my own degree frequent warnings to fellow Linux users: don’t blindly leap to the fore into cowboy code that hasn’t yet been sufficiently assayed. Linux kernel release candidates are usually very, very substantial, and it’s tempting to dive into new features as early as possible—but doing so can have planned very, very ugly consequences. And many of those consequences could include been avoided by waiting for the code to enter production status in the word go place.

Leave a Reply

Your email address will not be published. Required fields are marked *