kirancodes.me
To Proof Maintenance & Beyond!

Low-overhead deadlock prediction

Yan Cai, Ruijie Meng, Jens Palsberg

Abstract

Multithreaded programs can have deadlocks, even after deployment, so users may want to run deadlock tools on deployed programs. However, current deadlock predictors such as MagicLock and UnDead have large overheads that make them impractical for end-user deployment and confine their use to development time. Such overhead stems from running an exponential-time algorithm on a large execution trace. In this paper, we present the first low-overhead deadlock predictor, called AirLock, that is fit for both in-house testing and deployed programs. AirLock maintains a small predictive lock reachability graph, searches the graph for cycles, and runs an exponential-time algorithm only for each cycle. This approach lets AirLock find the same deadlocks as MagicLock and UnDead but with much less overhead because the number of cycles is small in practice. Our experiments with real-world benchmarks show that the average time overhead of AirLock is 3.5%, which is three orders of magnitude less than that of MagicLock and UnDead. AirLock's low overhead makes it suitable for use with fuzz testers like AFL and on-the-fly after deployment.

BibTeX
@inproceedings{Cai-al:ICSE20,
  author    = {Yan Cai and
               Ruijie Meng and
               Jens Palsberg},
  title     = {Low-overhead deadlock prediction},
  booktitle = {ICSE},
  pages     = {1298--1309},
  publisher = {{ACM}},
  year      = {2020},
}

Related papers