10 ms·
Toyota Unintended Acceleration and the Big Bowl of “Spaghetti” Code (2013)
- swiley 11y agoCritical systems should be open source by law.
- brohee 11y agoNot sure it would help any, it's not exactly hard to find very low quality code on Github. It IMHO shows a failure of the type approval process, maybe it didn't evolve enough with regard to the amount of software used in safety critical components. Inspiration from aircraft certification would likely be mùore than welcome in that regard...
- PakG1 11y agoThe point is that a world of coders who would be mulling over the code due to interest and spare time would likely find critical issues and shine light onto them, making it a PR issue for those companies. If those companies ever get around to offering bounties for issues relating to safety or security, even easier to get an army of eyes on the code.
- TeMPOraL 11y agoThat's the point. We already know it doesn't work. Most recent examples would be Heartbleed, ShellShock, etc.
- Lewton 11y agoOSS having bugs is not proof that open sourcing software won't lead to less bugs.
- TeMPOraL 11y agoI'm only trying to show that you can't shout "Open Source!" and get magical immunity from bugs in life-critical software. We need to think of something else instead, or in addition to, open-sourcing to meaningfully reduce the amount of those bugs.
- Jemmeh 11y agoI agree. The main component of safety and security--is making it part of the software development process itself. Nothing can substitute for that, and it's what the article is addressing. Open source would be "nice", but it's just the training wheels, while safety and security baked into the process is the front tire. Might help it from not falling over but you're not going anywhere in the right direction without the right foundation.
- snowwrestler 11y agoHeartbleed and ShellShock are examples of why open source is better. Both were found by folks who were not the software maintainers, but were reviewing the source code independently. In comparison, it took multiple deaths and a major lawsuit to create the same level of visibility into Toyota's codebase. And what reviewers found was code quality far worse than that of OpenSSL or bash. Someone else said this in another HN thread, but I love it: imagine a world in which Consumer Reports car reviews include a code audit report. That would be far, far better for overall safety than the current situation.
- TeMPOraL 11y agoI agree. I might have stated my point too strongly. I just think that going Open Source won't magically fix things. ShellShock and Heartbleed were out there for many years before someone reported on them, with (AFAIR) evidence of those holes being exploited by malicious actors. Trying to force a switch to Open Source won't improve situation very much, while requiring a serious overhaul of how the entire world does business. It doesn't seem to be worth it without introducing additional ways to fix the software creation and testing process.
- fahadkhan 11y ago"spare time", do you know where I can find some of that?
- a3n 11y ago> Not sure it would help any, it's not exactly hard to find very low quality code on Github. Because it's open and findable. I think that was the point.
- hoorayimhelping 11y agoI love magic bullets! As we've recently seen with things like Heartbleed, open source has no vulnerabilities, no bugs, no errors, and is free from all the problems of proprietary software.
- eru 11y agoSee https://en.wikipedia.org/wiki/Heartbleed#Discovery https://en.wikipedia.org/wiki/Heartbleed#Discovery It looks like at least having the source available made it easier for the good guys to discover the bug.
- Jtsummers 11y agoOne of the problems with embedded systems like this is that very few eyes ever see the code. Even in more regulated fields like avionics. The code will be examined primarily by the developers, testers, their QA and maybe the company that hired them if it's contracted out. Instead, what gets examined are the artifacts like requirements documents, the results of tests, specifications and such. This allows poor code quality to be hidden, and, to some extent, encourages sloppy development practices (especially when time is critical). Exposing the code to more people will have several effects, but the main two (from my perspective) are: * Developers won't release as much bad code, either due to pride or insistence from their management. * Bugs may be more easily discovered and diagnosed if the code is available. As it is now, it's a black box. So if I find an issue I may be able to repeat it, but I can't examine the code to see why it's actually happening or to correct it.
- nkrisc 11y agoAnd then it was discovered and fixed.
- snowwrestler 11y agoHeartbleed is the perfect example of why critical code should be open source. It was discovered by developers who were not the original coders, and they were able to talk about it freely, essentially marketing it to create awareness. If OpenSSL was closed-source my servers would probably still be vulnerable today.
- TerraHertz 11y agoI'm a retired electronics design engineer and embedded programmer, and I will NEVER own a car with any kind of vehicle/engine management computer. Old cars for me, forever. I flatly refuse anything but fully manual and direct mechanical gears, clutch, steering, brakes and throttle. Curiously the chief engineer I knew at a major car service center, also felt the same way. And that's not even touching on the insanity of building computerized vehicle systems with always-on GSM data links to the Net. Ask Michael Hastings how that worked out for him. Also I agree that critical systems software should be legally required to be open source.
- luckystarr 11y agoAgree. What about power steering? You won't get any car without nowadays. Do you count non-computerized (servo) power-steering as "mechanical steering"?
- TerraHertz 11y agoI don't think you'd be able to get any new non-computerized car at all today. Emission control makes computerization an absolute requirement. That's why choice in cars for people who feel the way I do is limited to old cars from pre-90s. Suits me fine. Servo power steering is acceptable, though my present car (1993 Subaru stationwaggon) has direct steering, and I prefer that.
- feintruled 11y agoCar manufacturers have made giant leaps in driver safety though (going by NCAP star ratings and the like). Drivers can now walk away from what once would have been a fatal crash - are you comfortable forgoing all those advancements?
- pinkrooftop 11y agoDoes the safety improvements in cars introduced since 1993 designed to protect you from collisions with other vehicles, outweigh the risk of a computer fault ?
- 11y ago
- quant5 11y agoPatio11 has talked about how programmers are little respected and paid poorly in Japan compared with the US. Could this have something to do with Toyota's code quality being so poor and causing this issue?
- sdrothrock 11y agoThat plus project management philosophies and societally-expected overtime (fatigue buildup) are quite possibly all factors in this.
- kenny_r 11y agoPaul Sebastian Ziegler gave a talk at the HITB security conference in 2012 titled "Hacking in the Far East". https://www.youtube.com/watch?v=ouQFu1FDllw https://www.youtube.com/watch?v=ouQFu1FDllw To me it was an eye opener to learn about the different attitudes of tech professionals in countries such as South Korea and particularly Japan. I highly recommend watching it some time.
- mikekchar 11y agoKeep in mind that I live in the country side and don't hang out with the likes of Patio11 ;-) I think he's seeing the best side of it. Where I live (in Japan, if it isn't obvious), the programmers I know have no training in programming, let alone a degree or anything like that. One of my friends was a secretary at an insurance company. One day her boss walked up to her and said, "From today you are going to be a programmer" and that was that! I do also know a self taught free lancer who makes an absolute killing cleaning up problems in various companies. He does really short contracts (like 2-4 weeks) in Tokyo and Osaka. Then he comes back to Shizuoka and hangs out for a couple of weeks. So there is money to be made ;-)
- Jemmeh 11y agoThat seems so strange to me since I always think of Japan as being so technologically advanced. Granted, even here in the USA programming used to be considered "women's work", mostly revolving around planning and organization. So they passed it off to secretaries. I just didn't think that was something that was still happening. http://www.smithsonianmag.com/smart-news/computer-programming-used-to-be-womens-work-718061/?no-ist http://www.smithsonianmag.com/smart-news/computer-programmin...
- stretchwithme 11y agoThese unintended acceleration incidents seem to happen mostly to elderly drivers. http://www.theatlantic.com/business/archive/2010/03/how-real-are-the-defects-in-toyotas-cars/37448/ http://www.theatlantic.com/business/archive/2010/03/how-real...
- reitanqild 11y agoIs there any reason why this pattern hasn't been widely reported? Edit: I mean, -if it was this obvious we should have known it by now?
- pjc50 11y agoThat source was Megan McArdle, who is a libertarian partisan. It's trying to discredit the complainants. The actual court case had an expert who looked at the code and found bugs where the possibility of unintended acceleration could come about. I'm not saying it's not true about the ages of the complainants, but it's certainly trying to present a particular interpretation of unknown events.
- Lagged2Death 11y agoIs there any reason why this pattern hasn't been widely reported? My recollection is: It was widely reported at the time.
- reitanqild 11y agoMy fault then. HN is my primary source of US news but I guess this was featured in more mainstream news.
- mikeash 11y agoBecause "you experienced unintended acceleration because you panicked and wouldn't release the accelerator" and "you should have just mashed the brakes until the car stopped" and "shift into neutral, silly" don't make for interesting stories and all have the smell of victim-blaming, even if completely true.
- 11y ago
- Jansemon 11y agoHow can breaks not stop the engine?! Parking break being a different thing, but the main ones?
- delinka 11y ago"Brakes" are at the wheels. The only time stopping a car from rolling also affects the engine is when everything remains engaged (manual transmission, manual clutch; in gear, clutch not depressed to the floor.) In a vehicle with an automatic transmission, the transmission begins to disengage from the wheels as the wheels spin slower than the engine is pushing. (Very simplified explanation...) i.e. brakes on cars are not designed the stop the engine but to absorb the vehicle's momentum.
- radiorental 11y agoAlso, it's been reported that drivers pumped the brakes in a panic (and understandably so). This will have the effect of reducing the power assist, which is already reduced due to high revs / low vacuum.
- jmhobbs 11y agoI wonder if this is a behavior inherent to older drivers? I'm in my 20's, but my first car was from the late 60's. I hadn't properly bled the master cylinder on my brakes, so I would have to pump them to make them more effective. Just wondering if it's a natural panic behavior, or something learned.
- drbawb 11y agoIt's something learned. You are explicitly taught to do it if your vehicle does not have ABS. It prevents the wheels from locking up. ABS does the same thing, and does it much more effectively than a human ever could. Preventing the wheels from locking up under hard braking is crucial to stopping when you have little traction. To provide traction on any surface _wheels must keep rolling._ When wheels are static their contact patch is effectively the size of a hockey puck, that little bit of rubber is not very good at stopping a car going 80MPH. Not compared to disc brakes w/ ceramic pads bleeding off all that energy, at any rate. While I'm on the subject, I'll take this time to drop a PSA: on ice, where ABS is most helpful, the rubber of your all season tires is about the consistency of a hockey puck. -- Please invest in actual winter tires if you get regular snowfall. (Also if you live in Texas: invest in a set of winter tires anyways and go have a blast when the streets are deserted.)
- oldpond 11y agoI am quite surprised by this, especially since it comes from Toyota, the company that invented Lean. This is very relevant given that the debate over upgrading vehicle software is raging on and the Volkswagen scandal has not settled just yet. Too bad we can't crowd source the various automobile software development teams. I am curious to see if any of them are any good. In my travels over the last 10 years I have encountered very few skilled software development teams at the enterprise level. Given the current state of the industry I would not e surprised to find them all wanting. Thanks for posting.
- illumen 11y agoIt's interesting that VW cars have been taken off the road for unintended acceleration. Also that quickcheck was used to find many timing related bugs between software components that VW uses. It was used after the models were taken off the road. There are other models still not recalled using similar software from the same era.
- SixSigma 11y agoAlmost all brands of cars have. You should read the NIST database sometime - the list of recalls is much longer then the ones you see in the news. While you're at it, read the FDA list of food and medical recalls too, so much risk!
- achr2 11y agoIsn't it time for an oversight agency that looks at code quality within safety-critical systems? The FDA forces oversight of drugs that less than 100,000 people a year will take. Yet there is no agency looking into the software quality of a car management system that millions of people will drive with every day.
- bradfa 11y agoThis will add a tremendous amount of cost to product development. This might be worthwhile if simple consumer or industry pressure doesn't work.
- arbitrage 11y ago> This will add a tremendous amount of cost to product development. Not that many people are getting killed, so it's an acceptable tradeoff?
- hga 11y agoYes, it's an potentially acceptable tradeoff. While the figures vary, economists and the like have estimates of how many people you'll kill for every N million dollars you extract from the economy (and they're below 10 million last time I checked). Just how much do you propose to extract with such a regime?
- achr2 11y agoI am not advocating that every aspect of a system is tested by an agency, I am simply saying that there should be a body that ensures that safety-critical software development follows a basic set of best practices - avoiding some of pitfalls mentioned in the article.
- celticninja 11y agoThat forces the cost onto the state and the state is also inefficient generally so it would take longer than an I ternary review. Then when a bug causes an issue it is the fault of the state for allowing it through and not the company for coding it. In addition private sector usually pays more so the state sector does not get the pick of the coders.
- Dav3xor 11y agoI've worked on safety critical software, for a couple different companies. Code quality is a very real problem. One company, the guy in charge of software was a CE, who would have been fine as long as the hardware was at the level of sophistication as what he was taught at school (He knew 8051 microcontrollers really well). He was really good at giant switch-case statements. Function pointers were a little newfangled and suspect. Basically, he knew enough software engineering to get the hardware working. That's one big problem that needs to be addressed -- there aren't a lot of people being trained in the software side of embedded systems. You have CS grads who for the most part aren't given much training on the low end of the abstraction spectrum, and the opposite for CE people, so there tends to be a very fuzzy area in the middle that causes arguments between the two camps. The other company I worked for literally had crazy coding standards that basically dictated 20,000 line functions and a bizarre sort of anti-DRY mindset that I will never understand. You were encouraged to c-c c-v a block of code, change one line, move on!
- Splines 11y agoA big takeaway that I got out of this is that nearly everybody forgot about this. People are still buying and driving Toyotas. When the VW emissions thing started making its way through the news cycle, I read comments postulating that this might be the end of VW. Hah - people are going to forget about VW just like they forget about everything else.
- csours 11y ago> When the VW emissions thing started making its way through the news cycle, I read comments postulating that this might be the end of VW. Hah - people are going to forget about VW just like they forget about everything else. It wasn't the end of Toyota, and it won't be the end of VW; but it was the end of Toyota's goal to be the Biggest Car Company in the World[1][2], and it may be the end of VW's goal to be the Biggest Car Company in the the World. Being #1 volume vehicle manufacturer is a curse! 1. https://hbr.org/2007/07/lessons-from-toyotas-long-drive https://hbr.org/2007/07/lessons-from-toyotas-long-drive - Interestingly, in this article Mr Watanabe claims that Toyota never had the goal to be the biggest car company. 2. http://www.economist.com/node/15576506 http://www.economist.com/node/15576506 - James Womack, one of the authors of “The Machine that Changed the World”, a book about Toyota's innovations in manufacturing, dates the origin of its present woes to 2002, when it set itself the goal of raising its global market share from 11% to 15%. Mr Womack says that the 15% target was “totally irrelevant to any customer” and was “just driven by ego”. According to Mr Womack, the requirement to expand its supply chain rapidly “meant working with a lot of unfamiliar suppliers who didn't have a deep understanding of Toyota culture.” Disclosure - I work for GM, these opinions are my own, etc.
- sakopov 11y agoOne of the general principles of engineering ethics states "A practitioner shall, regard the practitioner's duty to public welfare as paramount." I think part of the problem is that software development isn't considered an engineering discipline and code of engineering ethics goes out the window.
- burnallofit 11y agoI got a degree in CS at UC Berkeley. There were exactly 2 lectures on ethics, both given by the same professor. Kudos to him (Ousterhout), but shame on the department. I'm not singling out UCB, I'm sure many other schools have the same problem.
- mfoy_ 11y ago>Toyota had more than 10,000 global variables. Oh my.
- lurkinggrue 11y agoJust dealing wit the entertainment messy of modern cars I already came to the conclusion that the car industry has no damn clue how to write software. It's like the worst internal shit code you see in the in house tools at many companies where the moment it ran it was considered done enough.