Jump to content

Linux 5.1 kernel hit by SSD TRIM bug which causes massive data loss

Chunchunmaru_

A lot of Samsung SSDs were already blacklisted for TRIM functions way before 5.1, it doesn't surprise me there are issues when it is ran.

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

Using LVM Check, dm-crypt Check, Samsung SSD check, Kernel 5.1 nope, running 4.9. Thanks for the heads up, could of been affected by this if I decided to update to a more recent kernel. 

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, 2FA said:

A lot of Samsung SSDs were already blacklisted for TRIM functions way before 5.1, it doesn't surprise me there are issues when it is ran.

A dude in there tried a kernel bisect and found the responsible commit for him, so I guess this has also something to do with that kernel version
 

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, Chunchunmaru_ said:

But I don't know if on manjaro is any different, if I don't remember wrong pacman doesn't enable services automatically

It should be the same on any systemd distro where fstrim is enabled, be it automatically or manually - since it's a kernel module I would assume the service unit is always the same.

10 minutes ago, GoodBytes said:

Heh, yes.

 

I was referring to the comment that goes around here at about every reports done here of some bug discovered on Windows which always states on how it doesn't have a QA team (even though they do), and how "they will switch to Linux!" as that OS is absolutely perfect and has no issues.  I just flipped the statement, as the joke.

 

The point I was conveying with the silly joke is that:

Software like an OS  is very complex these days, and testing everything, with all the different possible configurations is virtually impossible (unless you never want it to ever be released as there is always something to fix, including fixes that broke other things which may require a massive architectural change to actually fix the other thing which can break other things).  In addition, until humans has anything to do with development or testing, things will always slip through cracks. Heck, you buy a newly build home and I can guaranty you it will have bugs (well, in this case, issues). 

While all of that is true, Microsoft demands money for their product - the Linux foundation does not. Everyone can make mistakes, but you'd expect a megacorp to be more careful with things they push to paying customers. It's not a coincidence that the Red Hat team spotted this - they do have a competent QA team so their paying customers can rely on their software. Another cool thing is that you don't always need to wait for MS to get their act together and push a patch - since the software is open source you can have user made patches and workarounds. With Windows you just have to cross your fingers and hope the next update isn't too bad.

 

Also I would say this issue is relatively minor considering (so far) it only seems to affect a very specific configuration, but that's beside the point.

21 minutes ago, Chunchunmaru_ said:

Anyway even if some kernels like the 5.1 is considered "stable" by the kernel developers, it's not for most distributions except the one mentioned before (arch)

Well it is considered "stable" by everyone, it's just not an LTS release. An unstable version would be an RC. I don't think Arch is the only distro that ships 5.1, you can probably get it on Fedora rawhide, OpenSUSE tumbleweed and stuff like Gentoo - maybe even Debian Sid (which is only "unstable" when compared to regular Debian).

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, Sauron said:

While all of that is true, Microsoft demands money for their product - the Linux foundation does not.

Yes they do. First of all major Linux distro have paid support services, and the Linux foundation campaigns for money, forcing 50$ donations minimum to become a "supporter" if you are an individual, and an undisclosed donations if you are a corporate which make you fall in a variety of groups from 'Platinum' down to 'Associates'. It has a full board of directors, and a number of groups, including leaderships and Technical Advisory. Funny thing is that Linus Torvalds isn't in any of them. His name is only listed for the trademark owner of "Linux".

 

So no, they demand and campaigns for money. 

 

 

 

Quote

Everyone can make mistakes, but you'd expect a megacorp to be more careful with things they push to paying customers. It's not a coincidence that the Red Hat team spotted this - they do have a competent QA team so their paying customers can rely on their software. Another cool thing is that you don't always need to wait for MS to get their act together and push a patch - since the software is open source you can have user made patches and workarounds. With Windows you just have to cross your fingers and hope the next update isn't too bad.

I would expect that open source code, being open, with so many eyes, and people working with the code, compiling on their systems, and testing it, would find it even before it hit QA team. A mega corp has deadline to meet, an open source project doesn't. And a constant issue with open source projects, especially with the less popular ones but still has many users, is that many times when a project is out of beta (which usually have very little support at this stage) and hits "stable" release, it is really beta stage, as it is the only way to get people who uses the library or software/tool to go in the code and start fixing things.

 

Quote

Also I would say this issue is relatively minor considering (so far) it only seems to affect a very specific configuration, but that's beside the point.

Well the very same with Windows. But hey, click bait article are click bait.

 

Quote

Well it is considered "stable" by everyone, it's just not an LTS release. An unstable version would be an RC. I don't think Arch is the only distro that ships 5.1, you can probably get it on Fedora rawhide, OpenSUSE tumbleweed and stuff like Gentoo - maybe even Debian Sid (which is only "unstable" when compared to regular Debian).

Sure, and well Windows has a LTS version also available.

 

Anyway, it was a joke I was making.

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, Sauron said:

It should be the same on any systemd distro where fstrim is enabled, be it automatically or manually - since it's a kernel module I would assume the service unit is always the same.

While all of that is true, Microsoft demands money for their product - the Linux foundation does not. Everyone can make mistakes, but you'd expect a megacorp to be more careful with things they push to paying customers. It's not a coincidence that the Red Hat team spotted this - they do have a competent QA team so their paying customers can rely on their software. Another cool thing is that you don't always need to wait for MS to get their act together and push a patch - since the software is open source you can have user made patches and workarounds. With Windows you just have to cross your fingers and hope the next update isn't too bad.

 

Also I would say this issue is relatively minor considering (so far) it only seems to affect a very specific configuration, but that's beside the point.

Well it is considered "stable" by everyone, it's just not an LTS release. An unstable version would be an RC. I don't think Arch is the only distro that ships 5.1, you can probably get it on Fedora rawhide, OpenSUSE tumbleweed and stuff like Gentoo - maybe even Debian Sid (which is only "unstable" when compared to regular Debian).

So far I remember trims do not run under a driver but anyway the fstrim service just runs the fstrim command itself triggered by a timer, I just don't know if: pacman packages can enable services at all and since I do not know also absolutely nothing about systemd strange practices rather than removing a symlink and remove exec privileges, like I was used to in the past so I'm a bit clueless on that...
The package looks identical to the ubuntu one so I think it's enabled by default, but what if someone upgrades that package when you have previously disabled that service? If it just re-enables itself that would be problematic in this case, apt acknowledges that (I was almost sure about it) but pacman is rather plain and simple

Btw it was not a coincidence also because the "mistake" was taken by a red hat employee himself which was also the maintainer itself, so pretty reasonable...
Also, I'm not a programmer so I don't like criticizer other people work, but I can't really tell how something like that could even happen? That could be the worst case scenario

 

Back to another story, since manjaro let's you easily create an lvm encrypted installs but also have a slightly different release cycles, this could be both a nightmare and a benefit as they update kernel a bit later there, so some people could be saved here

Also yes, the specific issue happens only when you use a specific function on a specific kernel version, but it's still one of the main linux kernel modules and not a simple driver for a device

I'm also sure Gentoo uses pretty old kernel releases by default, as for fedora who knows? I'm just sure Ubuntu 19.04 is on 5.0

EDIT: yeah by default it uses 4.19 without masks

 

but anyway something I noticed is every distro has its own concept of stability

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, GoodBytes said:

I would expect that open source code, being open, with so many eyes, and people working with the code, compiling on their systems, and testing it, would find it even before it hit QA team. A mega corp has deadline to meet, an open source project doesn't. And a constant issue with open source projects, especially with the less popular ones but still has many users, is that many times when a project is out of beta (which usually have very little support at this stage) and hits "stable" release, it is really beta stage, as it is the only way to get people who uses the library or software/tool to go in the code and start fixing things.

 

Well the very same with Windows. But hey, click bait article are click bait.

 

 

 

About the click bait title it was just more like I didn't want to get the title too long to read...

 

as for deadlines, there could be dedicated workers as well being paid for developing with open source software, just because someone else can do a commit or fix some bugs doesn't mean it's a total chaos, there are some cases like Ubuntu where it has a fixed release month, a feature freeze, etc... Same goes for Debian, but also for programs like X.org where since Wayland development started, they only release security updates for now. (They do have upcoming features in the source code but officially there is no release rather than git builds)

Pretty depends on the project though, especially if that is someone who a random student made

Link to comment
Share on other sites

Link to post
Share on other sites

As an End User all these software screwups are making me almost pray for a massive EMP to make us go back to pre-computer days.

 

Given Redhat was the instigator of Systemd they should be made to have fixed it.

 

I was reading about Lumina Desktop (from BSD community) the other day thought it sounded all good, till i read an interview with Kevin Moore, stating that a misbehaving app could basically kill it.

my interpretation to that was Windows BSOD,now available on BSD or Linux that use it

current main system: as of 1st Jan 2023

motherboard : Gigabyte B450M DS3H V2

CPU: Ryzen 5 3600

ram : 16Gig Corsair Vengeance 3600mhz

OS :multi-boot

Video Card : RX 550 4 GIG

Monitor: BENQ 21 inch

 

Link to comment
Share on other sites

Link to post
Share on other sites

Yikes. 

| Ryzen 7 7800X3D | AM5 B650 Aorus Elite AX | G.Skill Trident Z5 Neo RGB DDR5 32GB 6000MHz C30 | Sapphire PULSE Radeon RX 7900 XTX | Samsung 990 PRO 1TB with heatsink | Arctic Liquid Freezer II 360 | Seasonic Focus GX-850 | Lian Li Lanccool III | Mousepad: Skypad 3.0 XL / Zowie GTF-X | Mouse: Zowie S1-C | Keyboard: Ducky One 3 TKL (Cherry MX-Speed-Silver)Beyerdynamic MMX 300 (2nd Gen) | Acer XV272U | OS: Windows 11 |

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, GoodBytes said:

Funny thing is that Linus Trevor isn't in any of them.

Linus Trevor?

 

That's going to give "Nvidia, fuck you" a whole new meaning ...

 

2062075078_LinusTrevorTorvaldsPhilips.jpg.87df1ed33021d98cc44a80b20a8c4bfd.jpg

 

Look, there's Linus Torvalds and there's Trevor Philips.  One is a completely out-of-control lunatic, the other is a video game character. 

Link to comment
Share on other sites

Link to post
Share on other sites

I just want a good Tablet i hate fucking intel +nvidia laptop + windows+linux all trash.

Until a proper made light OS for mobile laptops is created and until AMD Zen2+Navi mobile laptops come to market i dont want anything to do with any of this.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Well I guess I'm glad the kernels newer than 4.20 don't boot then kinda? Don't have a Sammy SSD though so I should have been fine anyway

I spent $2500 on building my PC and all i do with it is play no games atm & watch anime at 1080p(finally) watch YT and write essays...  nothing, it just sits there collecting dust...

Builds:

The Toaster Project! Northern Bee!

 

The original LAN PC build log! (Old, dead and replaced by The Toaster Project & 5.0)

Spoiler

"Here is some advice that might have gotten lost somewhere along the way in your life. 

 

#1. Treat others as you would like to be treated.

#2. It's best to keep your mouth shut; and appear to be stupid, rather than open it and remove all doubt.

#3. There is nothing "wrong" with being wrong. Learning from a mistake can be more valuable than not making one in the first place.

 

Follow these simple rules in life, and I promise you, things magically get easier. " - MageTank 31-10-2016

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, GoodBytes said:

Sure, and well Windows has a LTS version also available.

Only for corporations, on the other hand on linux its freely available to anyone. To top it off on linux there are no forced updates so you can simply wait for the fix(or hide the kernel update temporarily).

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, seoz said:

> be me
> want to try Linux
> try Lubuntu, refused to boot and kept causing hardware errors
> try Manjaro for experimental reasons, booted into installer but again kept causing hardware errors
> "Well shucks, what could be causing these?"
> try underclocking to 4.5GHz 1.25V
> Lubuntu boots
> "I don't like this after all"
> try Ubuntu 19.04
> now we're here

Yeah, Lubuntu sucks. I used it on a laptop. I had Leafpad, Lubuntu's default text editor, erase file content instead of saving it. Now yet another Linux data loss bug.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, selecadm said:

Yeah, Lubuntu sucks. I used it on a laptop. I had Leafpad, Lubuntu's default text editor, erase file content instead of saving it. Now yet another Linux data loss bug.

I used Lubuntu for like, two or three days and I really was not a fan of how much reliance was on the terminal to do tasks.

I was advised that it was meant to be a Linux distro that was made for barebones lightweight systems in mind, hence the lack of a proper user-friendly interface, which is why I then went to regular Ubuntu, immediately loved it because it had a regular user interface that I moulded with.

 

Again, very glad I've chosen Ubuntu, wouldn't have wanted to explore a Linux distro and find out that a certain distro has a data loss bug a few weeks after getting to know Linux.

mechanical keyboard switches aficionado & hi-fi audio enthusiast

switch reviews  how i lube mx-style keyboard switches

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, GoodBytes said:

Yes they do. First of all major Linux distro have paid support services, and the Linux foundation campaigns for money, forcing 50$ donations minimum to become a "supporter" if you are an individual, and an undisclosed donations if you are a corporate which make you fall in a variety of groups from 'Platinum' down to 'Associates'. It has a full board of directors, and a number of groups, including leaderships and Technical Advisory. Funny thing is that Linus Trevor isn't in any of them. His name is only listed for the trademark owner of "Linux".

Enterprise users who actually pay for this are unlikely to get a new kernel so soon after its release. Everyone else can get it for free. I'm sorry, it's not even comparable to asking 100$ for a copy of Windows "home". Who is or isn't considered a "supporter" of the Linux foundation is completely irrelevant in this context.

10 hours ago, GoodBytes said:

I would expect that open source code, being open, with so many eyes, and people working with the code, compiling on their systems, and testing it, would find it even before it hit QA team.

They did, it was only confirmed to be a kernel bug by RH.

10 hours ago, GoodBytes said:

And a constant issue with open source projects, especially with the less popular ones but still has many users, is that many times when a project is out of beta (which usually have very little support at this stage) and hits "stable" release, it is really beta stage, as it is the only way to get people who uses the library or software/tool to go in the code and start fixing things.

Linux is hardly a "less popular" open source project. In fact I'm pretty sure it's the single biggest foss endeavor.

 

Also again, if you get a product for free I think the contributors deserve more of a break. If the product is sold to some people, let those people complain to the firm that sold it to them. Besides, we know very well that paid products are by no means guaranteed to be beyond beta stage on release.

10 hours ago, GoodBytes said:

Well the very same with Windows. But hey, click bait article are click bait.

Nah, there have been far more serious issues on Windows that affected a lot more users. The bug with 1809 didn't require any special configuration, it was just a coin toss on whether you would lose all your data or not. I get that yours was meant as a joke but I think you're taking a jab at the wrong thing.

 

To be clear, Linux systems obviously have bugs and it's perfectly reasonable to urge the developers to fix critical issues (which usually happens in less than a day after they are reported) - I don't think there's a double standard here as you were suggesting. Nobody is trying to downplay this, it's obviously an issue and it should be fixed as soon as possible.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

What's with that LUKS+dm_crypt thing being a factor? Is that like something one has on by default or is it something people install/enable explicitly?

Link to comment
Share on other sites

Link to post
Share on other sites

Consoles are looking better ever day

🌲🌲🌲

 

 

 

◒ ◒ 

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, Chunchunmaru_ said:

Also, I'm not a programmer so I don't like criticizer other people work, but I can't really tell how something like that could even happen? That could be the worst case scenario

Sometimes it's hard to thoroughly test stuff like this, all it takes is the developers not using samsung drives in this case - which is why having thousands of volunteers testing this stuff is invaluable.

9 hours ago, cretsiah said:

As an End User all these software screwups are making me almost pray for a massive EMP to make us go back to pre-computer days.

That's a bit drastic... wouldn't that cause certain data loss instead of a small chance of it?

9 hours ago, cretsiah said:

Given Redhat was the instigator of Systemd they should be made to have fixed it.

This has *nothing* to do with systemd, it just so happens that on systemd distros the bugged kernel module is triggered through a systemd service.

 

Also RH are the ones fixing this (they probably already have).

9 hours ago, cretsiah said:

I was reading about Lumina Desktop (from BSD community) the other day thought it sounded all good, till i read an interview with Kevin Moore, stating that a misbehaving app could basically kill it.

my interpretation to that was Windows BSOD,now available on BSD or Linux that use it

How does this have anything to do with the topic at hand?

 

A BSOD is a kernel panic, every operating system can have those. They just tend to be more rare outside of windows, though windows has gotten better through the years.

 

By the way, it's Ken Moore and the interview you read is talking about a security feature

Quote

Going along with the session management changes, we have compressed the entire desktop into a single, multi-threaded binary. This means that if any rogue script or tool starts trying to muck about with the memory used by the desktop (probably even more relevant now than when we started working on this), the entire desktop session will close/crash rather than allowing targeted application crashes to bypass the session security mechanisms. By the same token, this also prevents “man-in-the-middle” type of attacks because the desktop does not use any sort of external messaging system to communicate (looking at you `dbus`). This also gives a large performance boost to Lumina Desktop

If you think this is a bad thing then you have no understanding of what is being discussed.

6 minutes ago, RejZoR said:

What's with that LUKS+dm_crypt thing being a factor? Is that like something one has on by default or is it something people install/enable explicitly?

It's drive cryptography, it's not default on most distributions (though some let you choose it during the installation). It's kind of like bitlocker on windows.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, Arika S said:

Consoles are looking better ever day

*Runs linux on her PS3*

Yeah...They are

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, Captain Chaos said:

Linus Trevor?

 

That's going to give "Nvidia, fuck you" a whole new meaning ...

 

Look, there's Linus Torvalds and there's Trevor Philips.  One is a completely out-of-control lunatic, the other is a video game character. 

LOL! Torvalds.

Close enough :D

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, jagdtigger said:

Only for corporations, on the other hand on linux its freely available to anyone. To top it off on linux there are no forced updates so you can simply wait for the fix(or hide the kernel update temporarily).

Same for Linux. If you want support for LTS from the big distros, they are charging you enterprises pricing.

There is no reduce price if you are an individual.

 

You can delay updates on Windows as well.

And if you used Ubuntu 19 the updates feels forced. You have to go seriously out of your way to disable that, which you, hopefully, don't forget to turn it back on later.

 

Also playing the waiting game for a "bug free" release is never ending. The simple fact of having new versions, means that they are bugs fixes. So you'll never end waiting. It comes down to what is "good enough", and "what doesn't affect you or the least or you can live with"

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×