Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PWL NY: Simple Testing Can Prevent Most Critica...
Search
Caitie McCaffrey
June 14, 2016
Technology
8
460
PWL NY: Simple Testing Can Prevent Most Critical Failures
Caitie McCaffrey
June 14, 2016
Tweet
Share
More Decks by Caitie McCaffrey
See All by Caitie McCaffrey
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
The Path Towards Simplifying Consistency in Distributed Systems
caitiem20
1
330
Argus Papers We Love
caitiem20
13
1.2k
The Verification of a Distributed System
caitiem20
22
2.2k
We Hear You Like Papers: Eventual Consistency
caitiem20
14
820
The Verification of a Distributed System
caitiem20
12
780
The Verification of a Distributed System
caitiem20
6
780
A Brief History of Distributed Programming: RPC
caitiem20
31
6.6k
Building Scalable Stateful Services
caitiem20
12
1.6k
Other Decks in Technology
See All in Technology
FastMCPでSQLをチェックしてくれるMCPサーバーを自作してCursorから動かしてみた
nayuts
1
230
Roo Codeにすべてを委ねるためのルール運用
pharma_x_tech
1
250
実践Kafka Streams 〜イベント駆動型アーキテクチャを添えて〜
joker1007
1
690
Houtou.pm #1
papix
0
690
継続戦闘能⼒
sansantech
PRO
0
220
從開發到架構設計的可觀測性實踐
philipz
0
140
データプレーンプログラミングとは? DPU&スイッチASICの開発経験から語る
ebiken
PRO
1
270
SmartHRの複数のチームにおけるMCPサーバーの活用事例と課題
yukisnow1823
2
1.2k
Java で学ぶ 代数的データ型
ysknsid25
1
980
ローカル環境でAIを動かそう!
falken
PRO
1
170
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.2k
mnt_data_とは?ChatGPTコード実行環境を深堀りしてみた
icck
0
210
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
42
2.3k
Writing Fast Ruby
sferik
628
61k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
The Cult of Friendly URLs
andyhume
78
6.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
15
890
RailsConf 2023
tenderlove
30
1.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Code Reviewing Like a Champion
maltzj
523
40k
Into the Great Unknown - MozCon
thekraken
39
1.8k
Transcript
Simple Testing Can Prevent Most Critical Failures: An Analysis of
Production Failures in Distributed Data-Intensive Systems Papers We Love New York - June 2016
Caitie McCaffrey @caitie Distributed Systems Engineer CaitieM.com
None
None
Analyzed Failures in Real World Systems
“A majority (77%) of failures require more than one input
event to manifest, but most of the failures (90%) require no more than 3” Complexity of Failures
“The specific order of events is important in 88% of
the failures that require multiple events Complexity of Failures
“3 Nodes or less can reproduce 98% of Failures” Complexity
of Failures
Unit Tests “A majority of production failures (77%) can be
reproduced by a unit test”
Top Down Fault Injection & State Space Exploration is Expensive
Logging • 76% of the failures print explicit failure- related
error messages • For 84% of the failures, all of the triggering events are logged • Logs are noisy: each failure prints 824 log messages (median)
Catastrophic Failures
Error Handling • 92% of failures were the result of
incorrect handling of non-fatal errors • 58% of faults could have been detected via simple testing • 35% of failures caused by bad practices in error handling code
• Error Handling Code is simply empty or only contains
a Log statement • Error Handler aborts cluster on an overly general exception • Error Handler contains comments like FIXME or TODO Bad Practices
Aspirator Performs static analysis of Java bytecode to detect: •
error handler is empty • error handler over-catches exceptions and aborts • error handler contains phrases like “TODO” or “FIXME”
• 500 New Bugs & Bad Practices • 115 Fasle
Positives • 171 bugs reported • 143 bugs confirmed or fixed Aspirator Results
-developer “I fail to see the reason to handle every
exception” Developer Reactions
“It is often much harder to reason about the correctness
of a system’s abnormal path than its normal execution path ”
Moving Forward • Use a tool like Aspirator that is
capable of identifying trivial bugs • Enforce code reviews of error handling code • High code coverage on error handling code
Questions @caitie