Language Selection

English French German Italian Portuguese Spanish

A warning about 5.12-rc1

Filed under
Linux

  • A warning about 5.12-rc1
    Hey peeps - some of you may have already noticed that in my public git
    tree, the "v5.12-rc1" tag has magically been renamed to
    "v5.12-rc1-dontuse". It's still the same object, it still says
    "v5.12-rc1" internally, and it is still is signed by me, but the
    user-visible name of the tag has changed.
    
    
    
    
    The reason is fairly straightforward: this merge window, we had a very
    innocuous code cleanup and simplification that raised no red flags at
    all, but had a subtle and very nasty bug in it: swap files stopped
    working right.  And they stopped working in a particularly bad way:
    the offset of the start of the swap file was lost.
    
    
    
    
    Swapping still happened, but it happened to the wrong part of the
    filesystem, with the obvious catastrophic end results.
    
    
    
    
    Now, the good news is even if you do use swap (and hey, that's nowhere
    near as common as it used to be), most people don't use a swap *file*,
    but a separate swap *partition*. And the bug in question really only
    happens for when you have a regular filesystem, and put a file on it
    as a swap.
    
    
    
    
    And, as far as I know, all the normal distributions set things up with
    swap partitions, not files, because honestly, swapfiles tend to be
    slower and have various other complexity issues.
    
    
    
    
    The bad news is that the reason we support swapfiles in the first
    place is that they do end up having some flexibility advantages, and
    so some people do use them for that reason. If so, do not use rc1.
    Thus the renaming of the tag.
    
    
    
    
    Yes, this is very unfortunate, but it really wasn't a very obvious
    bug, and it didn't even show up in normal testing, exactly because
    swapfiles just aren't normal. So I'm not blaming the developers in
    question, and it also wasn't due to the odd timing of the merge
    window, it was just simply an unusually nasty bug that did get caught
    and is fixed in the current tree.
    
    
    
    
    But I want everybody to be aware of because _if_ it bites you, it
    bites you hard, and you can end up with a filesystem that is
    essentially overwritten by random swap data. This is what we in the
    industry call "double ungood".
    
    
    
    
    Now, there's a couple of additional reasons for me writing this note
    other than just "don't run 5.12-rc1 if you use a swapfile". Because
    it's more than just "ok, we all know the merge window is when all the
    new scary code gets merged, and rc1 can be a bit scary and not work
    for everybody". Yes, rc1 tends to be buggier than later rc's, we are
    all used to that, but honestly, most of the time the bugs are much
    smaller annoyances than this time.
    
    
    
    
    And in fact, most of our rc1 releases have been so solid over the
    years that people may have forgotten that "yeah, this is all the new
    code that can have nasty bugs in it".
    
    
    
    
    One additional reason for this note is that I want to not just warn
    people to not run this if you have a swapfile - even if you are
    personally not impacted (like I am, and probably most people are -
    swap partitions all around) - I want to make sure that nobody starts
    new topic branches using that 5.12-rc1 tag. I know a few developers
    tend 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 base
    for the next release". Don't do it this time. It may work perfectly
    well for you because you have the common partition setup, but it can
    end up being a horrible base for anybody else that might end up
    bisecting into that area.
    
    
    
    
    And the *final* reason I want to just note this is a purely git
    process one: if you already pulled my git tree, you will have that
    "v5.12-rc1" tag, and the fact that it no longer exists in my public
    tree under that name changes nothing at all for you. Git is
    distributed, and me removing that tag and replacing it with another
    name doesn't magically remove it from other copies unless you have
    special mirroring code.
    
    
    
    
    So if you have a kernel git tree (and I'm here assuming "origin"
    points to my trees), and you do
    
    
    
    
         git fetch --tags origin
    
    
    
    
    you _will_ now see the new "v5.12-rc1-dontuse" tag. But git won't
    remove the old v5.12-rc1 tag, because while git will see that it is
    not upstream, git will just assume that that simply means that it's
    your own local tag. Tags, unlike branch names, are a global namespace
    in git.
    
    
    
    
    So you should additionally do a "git tag -d v5.12-rc1" to actually get
    rid of the original tag name.
    
    
    
    
    Of course, having the old tag doesn't really do anything bad, so this
    git process thing is entirely up to you. As long as you don't _use_
    v5.12-rc1 for anything, having the tag around won't really matter, and
    having both 'v5.12-rc1' _and_ 'v5.12-rc1-dontuse' doesn't hurt
    anything either, and seeing both is hopefully already sufficient
    warning of "let's not use that then".
    
    
    
    
    Sorry for this mess,
                 Linus
    
    
    
    
    
  • A warning about 5.12-rc1

    Linus Torvalds has sent out a note telling people not to install the recent 5.12-rc1 development kernel; this is especially true for anybody running with swap files. "But I want everybody to be aware of because _if_ it bites you, it bites you hard, and you can end up with a filesystem that is essentially overwritten by random swap data. This is what we in the industry call 'double ungood'." Additionally, he is asking maintainers to not start branches from 5.12-rc1 to avoid future situations where people land in the buggy code while bisecting problems.

  •  

  • Linux 5.12-rc2 Likely Coming Early Due To That Nasty File-System Corruption Bug

    Linus Torvalds has now warned developers over using Linux 5.12-rc1 as a basis for their future branches and is looking to release 5.12-rc2 ahead of schedule as a result of that problematic file-system corruption bug stemming from a swap file bug. 

Don't Try Or Use Linux 5.12-rc1

  • Don't Try Or Use Linux 5.12-rc1

    Linus Torvalds has renamed Linux 5.12-rc1 to 5.12-rc1-dontuse in git and the release has been pulled from kernel.org due to an extremely unfortunate bug related to swap files, not swap partitions, that could cause random files to be overwritten with garbage data. You may want to revert to a previous kernel if you've already upgraded to Linux 5.12 rc1.

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

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

    As it turns out, when Linus Torvalds flags some code dontuse, he really means it—the problem with this 5.12 release candidate broke swapfile handling in a very unpleasant way. Specifically, the updated code would lose the proper offset pointing to the beginning of the swapfile. Again, in Torvalds' own words, "swapping still happened, but it happened to the wrong part of the filesystem, with the obvious catastrophic end results."

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

    [...]

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

Torvalds Warns the World: Don't Use the Linux 5.12-rc1 Kernel

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.