News for hackers. Stuff that matters.
Re:Single random bit flip causes error in certificate transp... by aseipp on Sunday July 04, 2021 @10:01AM (#27729687)
This is just learned helplessness because Intel were stingy as shit for over a decade and wanted to segregate their product lines. Error correction is literally prevalent in every single part of every PHY layer in a modern stack, it is an absolute must, and the lack of error correction in RAM is, without question, a ridiculous gap that should have never been allowed in the first place in any modern machine, especially given that density and bandwidth keeps increasing and will continue to do so.

When you are designing these systems, you have two options: you either use error correcting codes and increase channel bandwidth to compensate for them (as a result of injected noise, which is unavoidable), or you lower the transfer rate so much as to be infeasible to use, while also avoiding as much noise as you can. Guess what's happening to RAM? It isn't getting slower or less dense. The error rate is only going to increase. The people designing this stuff aren't idiots. That's why literally every other layer of your system builds in error correction. Software people do not understand this because they prefer to believe in magic due to the fact all of these abstractions result in stable systems, I guess.

All of the talk of hardware flip flops and all that shit is an irrelevant deflection. Doesn't matter. It's just water carrying and post-hoc justification because, again, Intel decided that consumers didn't actually need it a decade ago, and everyone followed suit. They've been proven wrong repeatedly.

Complex systems are built to resist failure. They wouldn't work otherwise. By definition, if a failure occurs, it's because it passed multiple safeguards that were already in place. Basic systems theory. Let's actually try building more safeguards instead of rationalizing their absence.

Re:Single random bit flip causes error in certificate transp... by goodpoint on Sunday July 04, 2021 @12:14PM (#27730728)
> By definition, if a failure occurs, it's because it passed multiple safeguards that were already in place.

Having worked on a good bunch of critical system, there aren't multiple safeguards in most hardware.

E.g. a multiplication error in a core will not be detected by an external device. Or a bit flip when reading cache, or from a storage device.

Very often the only real safeguard is to do the whole computation twice on two different hosts. I would rather have many low-reliability hosts and do computation twice than few high-reliability and very expensive host.

Unfortunately the software side is really lagging behind when it comes to reproducible computing. Reproducible builds are a good step in that direction and it took many decades to get there.

Re:Single random bit flip causes error in certificate transp... by aseipp on Sunday July 04, 2021 @01:19PM (#27731163)
Safeguards do not just exist at the level of technology but also politics, social structures, policies, design decisions, human interactions, and so on and so forth. "Criticality" in particular is something defined by humans, not a vacuum, and humans are components of all complex systems, as much as any multiplier or hardware unit is. The fact a multiplier can return an error is exactly in line with this: it can only happen after an array of other things allow it to, some of them not computational or computerized at all. And not every failure will also result in catastrophe as it did here. More generally such failures cannot be eliminated, because latent failures exist everywhere even when you have TMR or whatever it is people do these days. Thinking there is any "only real safeguard" like quorums or TMR is exactly part of the problem with this line of thought.

The quote I made is actually very specifically is in reference to this paper, in particular point 2, which is mandatory reading for any systems engineer, IMO, though perhaps the word "safeguard" is too strong for the taste of some here. But focusing on definitions of words is besides the point and falls into the same traps this paper mentions: https://how.complexsystems.fail/

Back to the original point: is ECC the single solution to this catastrophe? No, probably not. Systems are constantly changing and failure is impossible to eliminate. Design decisions and a number of other decisions could have mitigated it and caused this failure to not be catastrophic. Another thing might also cause it to topple. But let's not pretend like we don't know what we're dealing with, either, when we've already built these tools and know they work. We've studied ECC plenty! You don't need to carry water for a corporation trying to keep its purse filled to the brim (by cutting costs) to proclaim that failure is inevitable and most things chug on, regardless. We already know that much.

Re:Single random bit flip causes error in certificate transp... by twistedpair on Monday July 05, 2021 @08:57AM (#27737463)
Failing to account for bit flips and HW failure is too common in web/service coding. Lookup how Google dropped a massive Big Table instance in prod, and traced it back to a cosmic ray bit flip that made a WRITE instruction into a DROP TABLE instruction.

I laugh when I compare my day to day coding to that of an avionics programmer in the aero industry.

Re:Single random bit flip causes error in certificate transp... by goodpoint on Monday July 05, 2021 @10:08AM (#27738155)
The "web" coding words falls for things like leftpad, imagine talking about bit flips.

It's sad how immature the software industry can be. It's been around for "only" 60/70 years after all.

Re:Single random bit flip causes error in certificate transp... by xpasky on Monday July 05, 2021 @09:24AM (#27737722)
I couldn't find it. Do you have a reference?
Re:Single random bit flip causes error in certificate transp... by twistedpair on Tuesday July 06, 2021 @05:33PM (#27754598)
There are some examples here [1]. Dig as I may, I cannot locate the original Google source I read about this ~3y ago.

1. https://www.usenix.org/system/files/conference/atc12/atc12-f...

Re:Single random bit flip causes error in certificate transp... by xvector on Sunday July 04, 2021 @12:33PM (#27730873)
> Very often the only real safeguard is to do the whole computation twice on two different hosts.

Three different hosts, for quorum, right?

Re:Single random bit flip causes error in certificate transp... by ajross on Sunday July 04, 2021 @12:50PM (#27730978)
Depends on the system. In this case it seems like retries are possible after a failure, so two is sufficient to detect bad data. You need three in real time situations where you don't have the capability to go back and figure it out.
Re:Single random bit flip causes error in certificate transp... by goodpoint on Sunday July 04, 2021 @01:03PM (#27731071)
Spot on. Very often doing an occasional (very rare) retry is acceptable.

Sometimes doing the same processing twice can be also a way to implement safe(r) rolling updates.

Re:Single random bit flip causes error in certificate transp... by sanctified384 on Sunday July 04, 2021 @12:52PM (#27730988)
Two hosts is efficient. Do it twice on two different hosts and then compare the results. If there is a mismatch, throw it away and redo it again on 2 hosts. A total of 4 computations are needed. But only if the difference really was due to bit flips, the chance of which are exceedingly rare. In all the rest of the cases, you get away with two instead of three computations.
Re:Single random bit flip causes error in certificate transp... by Shikadi on Sunday July 04, 2021 @04:30PM (#27732371)
People who tout this don't understand the probability of bit flips. It's measured in failures per _billion_ hours of operation. This matters a ton in an environment with thousands of memory modules (data centers and super computers) but you're lucky to experience a single ram bit flip more than once or twice in your entire life

Edit: there's some new (to me) information from real world results, interesting read. https://www.zdnet.com/article/dram-error-rates-nightmare-on-...

Looks like things are worse than I thought (but still better than most people seem to think). Interesting to note that the motherboard used affects error rate, and it seems that part of it is a luck of the draw situation where some dimms have more errors than others despite being the same manufacturer

Re:Single random bit flip causes error in certificate transp... by kevin_thibedeau on Sunday July 04, 2021 @06:34PM (#27733170)
Bit flips are guaranteed to happen in digital systems. No matter how low the probability is, it will never be zero. You can't go around thinking you're going to dodge a bullet because its unlikely. If it weren't for the pervasive use of error detection in common I/O protocols you would be subjected to these errors much more frequently.
Re:Single random bit flip causes error in certificate transp... by Shikadi on Sunday July 04, 2021 @08:55PM (#27733840)
We're talking specifically about ECC ram, which solves the specific problem caused by cosmic rays (and apparently bad motherboard design). IO protocol error correction is a totally different problem.
Re:Single random bit flip causes error in certificate transp... by DevKoala on Sunday July 04, 2021 @04:46PM (#27732488)
I was going to comment, but you edited your post. Yes, it is worse than we usually think on the software side.
Re:Single random bit flip causes error in certificate transp... by Shikadi on Sunday July 04, 2021 @05:01PM (#27732584)
I still think it made sense up until now to not bother with it on consumer hardware, and even at this point. The probability of your phone having a software glitch needing a reboot is way higher. Now that it's practically a free upgrade? Should be included by default. But I still don't think it's nearly as nefarious as people make it out to be that it has been this way for so long
Re:Single random bit flip causes error in certificate transp... by DevKoala on Sunday July 04, 2021 @06:17PM (#27733080)
I don’t think they are an issue in a phone, but in a system like a blockchain that goes through so much effort to achieve consistency, the severity of the error is magnified hence the lesser tolerance for the error rate.
Re:Single random bit flip causes error in certificate transp... by mtkd on Sunday July 04, 2021 @10:33AM (#27729898)
'stingy as shit' or maximising short-term shareholder value -- the hardware is possibly not the only broken model here
Re:Single random bit flip causes error in certificate transp... by aseipp on Sunday July 04, 2021 @11:11AM (#27730231)
You're probably right that I'm giving them a bit too much credit on that note. Ceterum censeo, and so on.