Efficient Lockout Testing for Deadlock Bugs and Detection

lockout efficient testing for deadlock bugs n.w
1 / 20
Embed
Share

Explore the significance of deadlock bugs in modern software, the challenges in detecting them manually, and the benefits of utilizing Lockout for efficient testing and detection. Learn about traditional deadlock detection methods, the best approach to uncovering deadlocks, and how Lockout leverages past program executions to increase the probability of encountering deadlocks. Discover the Lockout architecture, its systematic deadlock testing process, and the use of static and dynamic phases for comprehensive deadlock detection.

  • Deadlock Bugs
  • Testing
  • Deadlock Detection
  • Lockout
  • Software

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Lockout: Efficient Testing for Deadlock Bugs Ali Kheradmand, Baris Kasikci, George Candea 1

  2. Deadlock Set of threads Each holding a lock needed by another thread Waiting for another lock to be released by some other thread 2

  3. Why Do Deadlocks Matter? Common in modern software Hard to detect manually Occur rarely during execution Chrome Apache LimeWire Eclipse 3

  4. Deadlock Detection Traditional testing Deadlocks manifest rarely Static detection Fast (run offline) Few false negatives Many false positives Dynamic detection Slow (high runtime overhead) Many false negatives Few false positives 4

  5. Best of Two Worlds Normal tests can t discover enough deadlocks Deadlock avoidance or fixing tools tools (Dimmunix [OSDI 08]) take a long time Need to find the schedules that lead to a deadlock How to increase the probability of encountering a deadlock? Steer the program towards schedules that are likely to cause a deadlock 5

  6. Lockout Systematic deadlock testing Increases deadlock probability By steering the scheduling Leverages past program executions Trigger more deadlocks with the same test suite 6

  7. Outline Lockout architecture Deadlock triggering algorithm Preliminary results Summary and future work 7

  8. Lockout Architecture Static Phase Source Code Instrumented Binary Static Analysis 0100100 1010101 0101010 0100110 1010101 cout << Hello, World!\n ; Instrumentation RaceMob [SOSP 13] 8

  9. Lockout Architecture Dynamic Phase End of execution Events Instrumented Program Runtime Previous executions info Schedule perturbation Subsequent executions DeadlockFuzzer [PLDI 09] 9

  10. Outline Lockout architecture Deadlock triggering algorithm Preliminary results Summary and future work 10

  11. Runtime Lock Order Graph (RLG) Thread 1 b lock lock(a) lock(b) lock(c) a c Lock acquisition order Potential deadlock 11

  12. Deadlock Triggering Selects a directed cycle in RLG Delays threads accordingly Improves simple preemption (CHESS [OSDI 08]) Preemption before each lock lock(a) d a lock(b) c b 12

  13. Deadlock Triggering Time Thread 1 Thread 2 Thread 3 lock(a) lock(b) unlock(b) unlock(a) a Runtime c b lock(b) lock(c) unlock(c) unlock(b) lock(c) lock(a) unlock(a) unlock(c) 13

  14. Deadlock Triggering Time Thread 1 Thread 2 Before lock (a) Thread 3 RT() lock(a) RT() Continue Before lock (b) Runtime Before lock (c) Delay RT() lock(c) RT() Continue RT() lock(b) RT() a lock(b) c b lock(a) lock(c) 14

  15. Race Dependent Deadlocks Preempt before memory accesses Ideally only shared memory accesses Can be approximated by preempting after locks Can be improved using static analysis Can be improved using data race detection 15

  16. Outline Lockout architecture Deadlock triggering algorithm Preliminary results Summary and future work 16

  17. Lockout Effectiveness Program Fraction of executions resulting in deadlock (%) Native Simple preemption + Post-lock preemption Deadlock triggering + Pre-memory access preemption Deadlock triggering + Post-lock preemption Microbench 0.00066 % 0.5 % 50 % 50 % SQLite 3.3.0 0.00064 % 4 % 50 % 50 % HawkNL 1.6b3 23 % 64 % 50 % 50 % Pbzip2 1.1.6 0 % 0 % 0 % 0 % Httpd 2.0.65 0 % 0 % 0 % 0 % Fraction of executions with deadlocks increased up to three orders of magnitude 17

  18. Outline Lockout architecture Deadlock triggering algorithm Preliminary results Summary and future work 18

  19. Lockout Increases deadlock probability Leverages past program executions Effective Up to 3 orders of magnitude more deadlock prone Open source: https://github.com/dslab-epfl/lockout 19

  20. Future Work Increasing effectiveness with low overhead Static analysis (data races, shared variables) Lockout + Automatic failure fixing/avoidance (Dimmunix [OSDI 08], CFix [OSDI 12], Aviso [ASPLOS 13]) In production For testing Crowdsourcing (Aviso [ASPLOS 13], RaceMob [SOSP 13]) 20

More Related Content