Public Deployment of Cooperative Bug Isolation
description
Transcript of Public Deployment of Cooperative Bug Isolation
![Page 1: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/1.jpg)
Public Deployment of Cooperative Bug Isolation
Ben Liblit, Mayur Naik, Alice Zheng, Alex Aiken, and Michael Jordan
UC Berkeley, Stanford University and University of Wisconsin (pending)
![Page 2: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/2.jpg)
Our Goal: Measure Reality
• We measure bridges, airplanes, cars…– Where is ight data recorder for software?
• Users are a vast, untapped resource– 96,000 new Kazaa users during this workshop– Users know what matters most
• Opportunity for reality-directed debugging– Implicit bug triage for an imperfect world
![Page 3: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/3.jpg)
Bug Isolation Architecture
ProgramSource
Compiler
Sampler
Guesses
ShippingApplication
Pro le& /
€ƒƒ
€‚Statistical
Debugging
Top bugs withlikely causes
![Page 4: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/4.jpg)
Predicates on Program Behavior
• Guess what might be interesting– Branches: Left? Right?– Function returns: Negative? Zero? Positive?– Pairs of variables: Less? Equal? Greater?– Reference counts: Alive? Dead?
• Count how often guesses are true
• Feedback: vector of counts + outcome label
![Page 5: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/5.jpg)
Sampling the Bernoulli Way
• “Next sample” countdown– Geometric distribution
• Split into acyclic regions– Finite threshold weight
![Page 6: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/6.jpg)
Sampling the Bernoulli Way
• “Next sample” countdown– Geometric distribution
• Split into acyclic regions– Finite threshold weight
1
2 1
1
1
2
3
4
![Page 7: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/7.jpg)
Sampling the Bernoulli Way
• “Next sample” countdown– Geometric distribution
• Split into acyclic regions– Finite threshold weight
• Clone acyclic regions– “Fast” & “slow” variants
– Choose at run time
• Result:– Subset of dynamic behavior
– Statistically fair sample
>4?
![Page 8: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/8.jpg)
Multithreaded Programs
• Global next-sample countdown– High contention, small footprint– Want to use registers for performanceThread-local: one countdown per thread
• Global predicate counters– Low contention, large footprintOptimistic atomic increment
![Page 9: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/9.jpg)
Multi-Module Programs
• Forget about global static analysis– Plug-ins, shared libraries– Instrumented & uninstrumented code
• Self-management at compile time– Locally derive identifying object signature– Embed static site information within object le
• Self-management at run time– Report feedback state on normal object unload– Signal handlers walk global object registry
![Page 10: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/10.jpg)
Native Compiler Integration
• Instrumentor must mimic native compiler– You don’t have time to port & annotate by hand
• Our approach: source-to-source, then native
• Hooks for GCC:– Stage wrapping via scripts– Flag management via spec les
ProgramSource
Compiler
Sampler
Guesses
ShippingApplication
CompilerTool Chain
![Page 11: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/11.jpg)
Keeping the User In Control
![Page 12: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/12.jpg)
Public Deployment, To Date
0
200
400
600
800
1000
1200
1400
Evolu
tion
Gaim
GIM
P
Gnum
eric
Nautil
us
Rhythm
box
Rep
orts
Rec
eive
d
GoodErrorCrash
![Page 13: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/13.jpg)
Public Deployment, To Date
0%
20%
40%
60%
80%
100%
Evolu
tion
Gaim
GIM
P
Gnum
eric
Nautil
us
Rhythm
box
GoodErrorCrash
![Page 14: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/14.jpg)
Sneak Peak: Data Exploration
![Page 15: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/15.jpg)
Conclusions
• Public deployment is challenging– Real world code pushes tools to their limits– Large user communities take time to build
• But the results are worth it:
“Thanks to Ben Liblit and the CooperativeBug Isolation Project, this version of
Rhythmbox should be the most stable yet.”
![Page 16: Public Deployment of Cooperative Bug Isolation](https://reader036.fdocuments.us/reader036/viewer/2022062409/56814588550346895db26d6d/html5/thumbnails/16.jpg)
The Cooperative Bug Isolation Projecthttp://www.cs.berkeley.edu/~liblit/sampler/
Join the Cause!