Accelerating race condition detection through procrastination

  • Authors:
  • Thomas Arts;John Hughes;Ulf Norell;Nicholas Smallbone;Hans Svensson

  • Affiliations:
  • Chalmers University of Technology, Göteborg, Sweden;Chalmers University of Technology, Göteborg, Sweden;Chalmers University of Technology, Göteborg, Sweden;Chalmers University of Technology, Göteborg, Sweden;Chalmers University of Technology, Göteborg, Sweden

  • Venue:
  • Proceedings of the 10th ACM SIGPLAN workshop on Erlang
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Race conditions are notoriously frustrating to find, and good tools can help. The main difficulty is reliably provoking the race condition. In previous work we presented a randomising scheduler for Erlang that helps with this task. In a language without pervasive shared mutable state, such as Erlang, performing scheduling decisions at random uncovers race conditions surprisingly well. However, it is not always enough. We describe a technique, procrastination, that aims to provoke race conditions more often than by random scheduling alone. It works by running the program and looking for pairs of events that might interfere, such as two message sends to the same process. Having found such a pair of events, we re-run the program but try to provoke a race condition by reversing the order of the two events. We apply our technique to a piece of industrial Erlang code. Compared to random scheduling alone, procrastination allows us to find minimal failing test cases more reliably and more quickly.