Live data from Hacker News

My insulin pump controller has a bug

twitter.com

41–50 of 172 posts

Re: My insulin pump controller has a bug

#41
post #28

Earlier quoted context omitted.

10x ? 21 instead of .21 is 100x This is basically Russian roulette with insulin with even worse odds.

But does the device contain that much insulin?

Yes, actually much worse.

The Omnipod 5 uses pods that the user fills with their insulin, the minimum fill amount is 85 units, the maximum is 200 units (i.e. 0.85ml minimum, up to 2mL of U100 insulin).

Re: My insulin pump controller has a bug

#42
post #36

I know the department of defense used to use Ada because it was a “safety critical” language. I feel like when it comes to this devices there should be more stringent guidelines around coding practices. Is that not the case?

Why? Safety Critical Software engineers are expensive. If you write a webstack with Node.js and React to run the insulin pump you can hire web developers. They are much cheaper. And who would be able to tell the difference? Boomer lawyers and judges working on the lawsuit targeted against us won't understand.

Having worked on safety critical software, yes, lawyers understand very well.

Re: My insulin pump controller has a bug

#43
post #33

A clearer description of the bug is here: https://twitter.com/Tims_Pants/status/1730515134731182490 It's wild that this sort of bug got through testing. As a diabetic it feels like our insulin pump software is very conservative and lacking in features especially compared to what some of the "closed loop" things would like to do. That seems reasonable if the manufacturers are having to do lots of safety testing. But i…

The part that makes this even more dangerous than this description might indicate is that it appears to be somewhat random. So most of the time entering a value as e.g. ".5" would work, but sometimes it would not. This is probably more dangerous than if it would always fail to do that, as the first few times you use it you likely pay much more attention to the confirmation dialog than later when you're used to it.

Re: My insulin pump controller has a bug

#45

I know the department of defense used to use Ada because it was a “safety critical” language. I feel like when it comes to this devices there should be more stringent guidelines around coding practices. Is that not the case?

I would have assumed that medical devices would have strict guidelines and heavy testing. A bit worrying if it's just suppliers discretion.

Re: My insulin pump controller has a bug

#46

I can't comprehend how that kind of bug even happens. Not that insulin pumps should have any bugs, but it doesn't even sound like an integer overflow or use after free which is "understandable". Are they doing some kind of scuffed string parsing?

With low level devices, I have been amazed at how many hackish things are done by people who don't have sufficient experience developing such things. I would not be surprised to find out that they are parsing or storing the value without the leading decimal, and depending on code in some other place to prepend the leading decimal, and there be a corner case or something that misses this, and no safety checks or even sanity checks.

Re: My insulin pump controller has a bug

#47
post #36

I know the department of defense used to use Ada because it was a “safety critical” language. I feel like when it comes to this devices there should be more stringent guidelines around coding practices. Is that not the case?

Why? Safety Critical Software engineers are expensive. If you write a webstack with Node.js and React to run the insulin pump you can hire web developers. They are much cheaper. And who would be able to tell the difference? Boomer lawyers and judges working on the lawsuit targeted against us won't understand.

Actually, critical software engineers often get less than half the TC of a full stack and still much less than a front end.

Re: My insulin pump controller has a bug

#48
post #24

Earlier quoted context omitted.

They probably wrote the controller in JavaScript

At my first job out of college, we were hired to create a point-of-sale system. We wrote it in Javascript, being unaware of how Javascript treats numbers. (Like a rented mule.) After the first few days, the client reached out and told us that the end-of-day numbers were sometimes off by a few cents - tax totals, things like that. After a few weeks, they'd be off by significantly more. Easily the most embarrassing inc…

We had a similar issue with random four-letter codes. The simplest and easiest solution was to remove vowels from the pool of candidates. Consonant only codes are much harder to generate real words.

Re: My insulin pump controller has a bug

#49
post #21

I know the department of defense used to use Ada because it was a “safety critical” language. I feel like when it comes to this devices there should be more stringent guidelines around coding practices. Is that not the case?

There are: ISO 13485 and 62304. And different levels of design and testing for different classes of medical device. For example, I worked on a new ventilator at the start of the pandemic ( https://www.cambridgeconsultants.com/press-releases/building... ). As a medical device that was "in the loop" of keeping the patient alive, some of the strictest restrictions applied. There were 2 MCUs - one doing the control work,…

As someone working on Class III medical devices, it is true that the FDA does not check if your design is "safe", only that the documentation and process seems to have been followed, but on the other hand you are also required to monitor your install base and report any hazardous event, and in case no adequate remediation/plan to your adverse events, they have the real power to stop the commercialization of the product.

But I agree this is coming a bit late in the process if people have already been harmed.

Re: My insulin pump controller has a bug

#50

I'm not familiar with insulin dosing, but I'm guessing a sharp 10x jump should warrant my app telling me to go to the hospital? I'd expect medical devices like this to have a last line of defence safety check against bugs. Basically checking all common sense edge cases like: is this dose lethal to humans, is this dose significantly more/less than historical doses, is this dose below a level in which most humans would…

Good software would certainly include that kind of multi-layered defense. Insulin dosage does not vary by a factor of 100. Sadly, medical software is not written any better than any other software.

In this case, the firmware was probably written by engineers who don't think about possible user errors, because they are focused on the hardware. Meanwhile, the app was probably outsourced to the lowest bidder from Elbonia.

Post reply on HN