Software bugs that cause real-world harm
pointersgonewild.com
pointersgonewild.com
So I do my research, and it turns out we were sending weights including the metal of the container itself from the one system, but interpreting them as net weights, so excluding container weight itself. So we were off by about 3000kg per container, which is bad enough if the container is 25000kg total, but even worse when transporting empties, where we were off by 100%.
Thank goodness it is drilled into captains that there are strict limits when it comes to stability, and I have never met a captain who will depart if they are not absolutely positive about the stability of their ship, but man I have spent a good few nights lying awake thinking about what could have happened.
I thought I was just working on some boring logistics software at the time, where the worst that could happen was losing a container for a day or so. It was a rude awakening.
Guess you have not dealt with air freight pilots in the third world or bush country?
My opinion is that ruins everything. Just like those american comedies where the virtual audience laughs like goats.
Most people think of it as camaraderie, like I'm nudging you into the joke with me
A lesson learned in 17th century Sweden.
They had to rip it all out.
Sorry, I forgot the name of that liner.
"In October 1913, Imperator returned to the Vulkan shipyard to facilitate drastic work to improve handling and stability, as it had been discovered that his center of gravity was too high (see metacentric height). To correct the problem, the marble bathroom suites in first class were removed and heavy furniture was replaced with lightweight wicker cane. The ship's funnels were reduced in height by 9.8 ft (3 m). Finally, 2,000 tons of cement was poured into the ship's double bottom as ballast. This work cost £200,000, which had to be borne by the shipyard as part of their five-year warranty to the shipowners."
Seems more like a very toxic culture of shifting blame led to those suicides, with the bugs just being a catalyst.
Some of the stuff that came to light in that scandal was so extreme, that it's clear the leadership was a bit deranged. Crazy people produce crazy results.
My story is, I found a bug in some new equipment that would've broken 911 calls. While other engineers were just trying to reboot random equipment to make the problem go away, I insisted we pause to figure it out. Turns out, due to a couple of bugs, the new network equipment could only handle a couple of 911 calls before failing.
This was for a national cellular network... so 911 was kind of important.
For example, use of facial recognition tech in policing. TV and movies give the impression that a satellite can identify the perp with 99.4% accuracy if you yell "enhance" enough times. Meanwhile, in reality we're happy when our classifier can tell a "3" from a "B" in a real image.
[1] https://www.nspe.org/resources/ethics/ethics-resources/board...
I suspect the main requirement was actually fulfilled by a ~week or two in the intro course, where we talked about Therac-25 and maybe another disaster or two.
It's a 6-week course. Each week, students respond to a prompt about an aspect of engineering ethics. The main task is to link real life examples to concepts from a professional code of ethics (we use the NSPE code[1]). NSPE also has anonymized and searchable "case studies"[2] with examples of how to apply this approach of "summarize the case and find the relevant parts of the Code of Ethics which apply here".
In a typical course, I ask them to use real-life examples such as these:
- Snowden leaks (privacy and consent of the governed)
- Henrietta Lacks (ethics in biotechnology and patient rights)
- Roger Boisjoly (whistleblowing)
- Volkswagen emissions scandal (environmental consequences)
After 4-5 of these drills, they research a case on their own and present about it for a group project. Class discussions dive into questions like "what would you do differently in this situation?" or "what if it was your family?" and "how would the consequences have been different if X instead of Y?"I try to emphasize that most situations don't have a single obvious ethically correct choice. It's more important for students to learn that codes of ethics exist, and that they can treat them as a decision-making framework.
[1] https://www.nspe.org/resources/ethics/code-ethics
[2] https://www.nspe.org/resources/ethics/ethics-resources/board...
I'll be blunt. This is the wrong lesson.
The correct lesson is:
Assume the software will do the worst thing possible. How will you prevent that from causing a catastrophe? I.e. make the Therac-25 physically incapable of generating an excessive dose.
This is how airplanes are made safe. Not by imagining you can create perfect hardware or software, but by assuming any part can fail, and how does the airplane continue to fly safely?
When I absolutely have to get up on time, I set two alarm clocks. When traveling, I'll set my phone, and also arrange for a wakeup call.
I learned about having an independent backup from working at Boeing engineering.
That's certainly a valuable lesson when there's hardware and software involved, and the consequences of the software screwing up are potentially lethal.
But what about the case of the home depot shopping cart, or the iPhone alarm? In those cases there's only software. "Assume the software will do worst thing possible" doesn't make sense.
Boeing disagrees with you.
However, there was a backup:
1. restore trim to normal with the thumb switches
2. turn off the stab trim system.
This procedure was followed by the first MCAS incident, and the airplane continued and landed safely.
The second incident, the LA crew restored normal trim 25 times, but never turned off the stab trim system and crashed.
After that crash, Boeing issued an Emergency Airworthiness Directive, which said to (1) restore trim with the thumb switches and (2) turn off the stab trim system.
The third incident, the EA crew turned off the trim system in a steep dive, and crashed.
That said, MCAS still should have looked at the 2nd sensor.
There's nearly 38 years of articles waiting for you to peruse, all lovingly curated by Peter Neumann.
> Long story short: a software bug caused the machine to occasionally give radiation doses that were sometimes hundreds of times greater than normal
Oh my god.
I have 15+ years working with "mission critical (software) infrastructure" and thought my job was important/hard because I played shepherd for production database fleets. Certain kinds of mistakes could bankrupt the business, so I had to make systems resilient to human errors.
Today, I run a 3D printer software startup. Thinking deeply about the safety mechanisms I need to control machines running at 250-300°C.
Precision errors when shooting radiation at a person is a whole different level. Wow.
Turns out the software had run fine on the -6 -20 because of the mechanical interlocks which prevented it from critically fucking up, but there was no reporting built into the software interlocks, so no way to know when they'd triggered. And that was before additional modifications were added for the -25.
I somehow have a few degrees of fear towards machines that could emit harmful level of ionizing radiation, and I can be nervous if the machine is operating on me (say doing X-Ray at the dentist).
Plus, I also have some anxiety when handling concurrent programming, which according to the Wikipedia is what caused the error in Therac-25.
So I guess I got double anxieties on that story.
cost/benefit analysis is the heart of engineering, and that applies to redundant safety and error detection hardware as well
So far, firmware crashing hasn't been an issue. I'm supporting open source firmwares though (Marlin, Klipper, and soon RepRap/Duet) so they're VERY battle-tested. Maybe this is an issue for proprietary closed-source firmware?
But I think you're not really considering the problem space from all the appropriate angles.
Ex: The main reasons you avoid putting encoders on a 3d printer...
1. Weight - Hands down the biggest in most cases (excluding CoreXY setups). Each of those CUI encoders is about 16 grams. Total moving weight matters a lot in printer design. Go too high and you have to bulk up every other part of the machine to account for it and reduce shake/wobble and ensure you can maintain the correct accel. Or you have to print much slower, which makes the machine less capable (and valuable). It also adds wear and tear and increases friction.
2. Safety - They aren't worth very much in terms of safety. You can detect a lot of bad things by just setting sane current limits in your motor controllers. Combined with the thermal runaway protection available in most firmware... that covers most of the same things you can detect with encoders.
3. Value - Steppers are already incredibly precise. There is limited value in adding the extra encoder feedback into the system. Most of the cases where it matters are already detectable (and without any need for OpenCV...).
So encoders are nifty - but this isn't really the best case for using them. No big win and lots of downsides (not the least of which is the extra $150 for adding them - which is 50% of the total cost of my first printer).
The delivery notifications right at the end of the delivery slot happened because the driver has an unrealistic schedule, and to hit their metrics, they will mark deliveries as "delivered" rather than missing an assigned delivery slot.
And that the expensive two-man-handling and delivery to the apartment service got "lost" between seller and subcontractor is more likely cost optimization and banking on most customers not complaining hard enough to actually force them to provide the paid-for service. "Software bug" being a convenient excuse the subcontractor can give to the rightfully enraged customer.
The reason I tend to think it's a software bug is that it seems that the system to dispatch deliveries is automated. The subcontractors get their orders from some kind of computerized system, it seems. That system seems to systematically fail to specify when they are to carry items indoors/upstairs. Whether that's due to negligence or intentional malfeasance, don't know.
What I do know from experience is that there are numerous bugs on their website, besides the "unknown error" problem I've listed. It just seems like really shittily built software... So I would tend to think there's an issue with really poor software engineering practices at that company.
Just know some of us are fighting this.
The big difference with software engineering that other engineering disciplines fail at is asking the question "Is it worth the risk?" and then answering it well.
For instance, historically and presently, bridge builders accept a much higher risk of killing someone than software engineers.
Given the risk that most bridge engineers take, most software engineers would instead just do something else.
Formal verification of software exists but can only really be trusted if running on hardware with some multiple redundancy and formal verification of its own.
This all happened over about 10-20 seconds after the injection. Blood moves quickly. Start the scan too early and you miss everything, too late and you get veins rather than arteries.
In a point release update with no mention in the release notes they changed the behaviour of the scanner - it then started the scan on clicking down in the button, not on lifting off.
A time critical scan on a patient due for theatre was messed up by me. Their renal function was poor and the scan couldn’t be repeated for a few days.
Every single antivirus program is more like malware than actual helpful software, because malware is in fact a spook and best antimalware we currently have is a functioning human brain.
It's really sad that pharmaceuticals, akin to antimalware companies are allowed to get away with any of this.
When brain doesn't work, such punyware like antivirus does nothing. Study done in around 2007 found that 35% of IRS workers will fall victim to social engineering... Ending up directly giving up their password, imagine the fun you can do if you have a password like that and you needed to run no malicious code to steal such information.
On the gripping hand, "silence.mp3" has been the solution for the author's "mom problem" for a good 20 years too. I hope they don't mean to imply you can't assign individual ringtones to contacts on stock Android? Even the K800i I had as a teenager supported that.
On the yet another hand (we're moving fast into octopod territory here), for a moment here I was wondering what the author was smoking with the "ringtone & notifications" complaint. I don't remember seeing an Android phone that did not have separate volume slider for each. Then I realized, I never actually owned a stock Android phone. Still, to support the author's point against Google specifically, Samsung managed to not have this problem for at least 10 years now.
My solution to avoid this was to play "silence.mp3" in a repeat loop in another app, and then my music app would play over that and there were no pops when I started a song. IDK if the pop problem has been fixed, or whether it was a software or hardware issue.
This is why I included a screenshot of the volume sliders my Google Pixel displays. Samsung doesn't use stock android OS, and some Samsung users tend to assume every android phone works the same.
You can do that.
The rage I feel when software that I use breaks, I take that rage and channel it into customer empathy. If my stuff causes someone to get annoyed, or lose a lot of time, or both, that really sucks and it needs to be fixed. I wish we could do more of that in this industry.
I got bit by that iPhone alarm bug a couple times. Couldn't believe something like that would slip into production and stay there for as long as it did.
I for one plan to operate a metric shop in the US. Using imperial outside of supplier interface will be a formal warning. Will see how that goes...
A torpedo system was designed not to hit the submarine that fired it. It would detonate if it was aiming itself back.
So, testing came along, the torpedoes armed and… the sub turned itself around.
Bang.
FWIW, Android does have that feature - at least for sure the Pixel Launcher (that the author uses) does: You can set some contacts as "Favourites" and have it configured that Favourites get to bypass Do Not Distrurb.
Good blog nonetheless!
> I still have the other problem that my mom could decide to randomly call me in the daytime as well, and unfortunately I rarely want to take her phone calls. However, I also don’t want her to end up homeless or in jail (which has happened before, but that’s a story for another time), and so I don’t want to block her and completely lose the ability to receive her calls.
So...does she want her mom's phone calls to get through, or doesn't she?
1) Instead of relying on a phone alarm to wake you up, use a device designed for that purpose, or request a wake-up call (on a landline, if you have one).
2) Overcome the conflict between having a phone and not wanting to answer it.
3) When unusual and specific instructions are required, make sure you speak with a person to confirm them.
I'm not sure that I agree with your point (1): a modern smartphone is a device designed for that purpose, among other things, and it is virtuous to use a multi-purpose device for this instead of building, transporting, and disposing of a dozen bespoke devices for each such purpose.
But reducing the complex interpersonal relationship between the author and her mom to just "overcome the conflict" is a really low-bar take. It feels callous to suggest that it would be so easy, or to assume that she's not trying to do this, or even that this is the right path forward for her. Technology should serve us and adapt to the diversity of our needs, as we change as people and those needs change with us.
I’ve often thought that our ultimate measure of a “person” is the ability to accept liability.
Anecdata and all but when did you last try ordering food via telephone?
Our "error rate" in wrong or forgotten delivery items has gone down by SO MUCH since we order online instead of giving instructions via phone. And no, it's not forgetting to say something, it's always been one person reading from a written list with the others listening in and double-checking (talking about bi-weekly board game night, they usually don't mess up if your order is 2 pizzas)
Are there not for everyone? On every Android phone I've had in recent memory I've had his feature. I'm certain I have it on my current phone because I just looked. In fact, they're called exactly what the author refers to them as.
Do Not Disturb, at the time of Android 9, did support controlling when the phone rings.
>Bedtime mode is quite useful, but I still have the other problem that my mom could decide to randomly call me in the daytime as well, and unfortunately I rarely want to take her phone calls. However, I also don’t want her to end up homeless or in jail (which has happened before, but that’s a story for another time), and so I don’t want to block her and completely lose the ability to receive her calls. This results in me having to almost always have my phone set to “do not disturb”, so that I don’t have to be disturbed at random times by unwanted phone calls
Could he not have used a custom ringtone for his mother?
For example Google home devices that I have, such as the nest displays and nest minis are absolute crap. At first they worked fine, but bad antenna design means that their wifi connection is absolutely terrible. The nest displays after operating for some time just turn into laggy messes.
Both my Macbook and my Windows machine (gaming) have random issues that pop up now and then. Firefox has a longstanding bug where using location causes wifi SSID scans to be spammed endlessly resulting in periodic 10s lag spikes for all networking on the entire machine (& I'm sure Chrome has similarly bad bugs), fixed by doing a Firefox "refresh" where it keeps data but reinstalls itself.
Pretty much all software lacks the options we want, in the places we want them to be and requirements can differ completely from person to person. It's a really tough problem to solve to be honest. Sure bugs can be fixed, but some bugs only impact 0.5% of users and some "bugs" are just bad UI/UX and are bugs to some people but not others.
And this is kind of an example of why it will be impossible to mitigate Climate Change.
When I was young, clocks did not requite any power from the grid. It wound them, set the alarm and you heard it. Now we have faucets, toilets that use power to turn on/off and flush. Almost everything that was manual (mechanical) is now powered. That power needs to come from somewhere. In these examples, there is no real reason to have faucets, toilets and alarm clocks connected to the grid.
Yes, I know in the case of the Cell Phone Alarm, it is probably a wash, but a mechanical clock in your house is probably a good thing to have.
Not sure the powered alarms would have done any better, but maybe after 10 minutes of ringing it might have woken me up.
There are much better and more reliable options. Solar powered watches that can run months without recharging, some digital watches run a decade with a single battery. A mechanical watch, on the other hand, has to be wound regularly and is usually far less accurate.
I like automatic mechanical watches but I don't think they can compete in any technical aspect, that's not the reason one would use them nowadays.
I find it very interesting (genuinely!) that your reaction to the linked article was to conclude (I think?) that it will be impossible to mitigate climate change.
Is your position, broadly stated, something like "because these days many more things require electricity than at some point in the past, our demand for electricity will be too high, and this will prevent us from mitigating climate change"?
In a way, but I am pointing out how many new things now require electricity/power where in the past they did not. There are many items that were manual, another example(s) are kitchen items, like powered can openers, knife sharpeners, food processors, etc. Moving back to manual items for these is like getting low hanging fruit. Will help a bit when matched against the number of people using them.
For climate change we need to change our habits, but many people cannot even walk/bike to the store that is a half a mile (~1km) away, instead they drive.
Based upon that alone, unless we are forced to change, we never will until cities are under water.
I think one way to force a change is to get gas prices high. But even doing that, with high rents in the cities, many people cannot afford to live in a walkable area. So in essence, our children, grandchildren are pretty much screwed.
But at least there are some easy changes people can make.
These devices are supposed to be extremely pervasive in the future, hence we need to do better to ensure their safety.
https://www.nytimes.com/2023/05/26/science/moon-crash-japan-...
You are talking about the cost of quality. Software quality comes at a cost. It's up to the business to determine how much it will spend on quality. If we had a zero bug policy in non safety critical applications the cost of goods would be too high.
I only take calls from my mother when I feel up to it. The reason for that is that she has no concept of boundaries. Her mental illness prevents her from grasping that concept. Her default behavior tends towards what a normal person would call harassment. If you can't relate or understand a situation like that, it might just be because you've had a relatively safe, coddled, privileged life.
wtf