Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems | 2021

SherLock: unsupervised synchronization-operation inference

 
 
 
 
 

Abstract


Synchronizations are fundamental to the correctness and performance of concurrent software. Unfortunately, correctly identifying all synchronizations has become extremely difficult in modern soft-ware systems due to the various types of synchronizations. Previous work either only infers specific type of synchronization by code analysis or relies on manual effort to annotate the synchronization. This paper proposes SherLock, a tool that uses unsupervised inference to identify synchronizations. SherLock leverages the fact that most synchronizations appear around the conflicting operations and form it into a linear system with a set of synchronization proper-ties and hypotheses. To collect enough observations, SherLock runs the unit tests a small number of times with feedback-based delay injection. We applied SherLock on 8 C# open-source applications. Without any prior knowledge, SherLock inferred 122 unique synchronizations, with few false positives. These inferred synchronizations cover a wide variety of types, including lock operations, fork-join operations, asynchronous operations, framework synchronization, and custom synchronization.

Volume None
Pages None
DOI 10.1145/3445814.3446754
Language English
Journal Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems

Full Text