Journal of Frontiers of Computer Science and Technology ›› 2018, Vol. 12 ›› Issue (7): 1087-1099.DOI: 10.3778/j.issn.1673-9418.1706018

Previous Articles     Next Articles

Concurrency Detection Algorithm for Atomicity Violation Based on Thread Communication Invariant

LI Lanying, SUN Jianda, ZHU Suxia   

  1. School of Computer Science and Technology, Harbin University of Science and Technology, Harbin 150080, China
  • Online:2018-07-01 Published:2018-07-06



  1. 哈尔滨理工大学 计算机科学与技术学院,哈尔滨 150080


Atomicity violation is one of the concurrency bugs in concurrency software development. Since the interaction of the threads is random, if the corresponding synchronization is not used, it is very likely that the atomic violation will occur. Aiming at the problems that the application traces of the existing off-line atomicity violation detection are large and redundant, and the running speed of detection algorithm is slow, this paper proposes a concurrency detection algorithm for two kinds of atomicity violations based on thread communication invariant. Firstly, the algorithm extracts the original traces from the program and removes the redundancy, then uses the hash table based on the unordered map to classify the traces. Secondly, the algorithm uses the stack to extract the thread invariant which can tag thread communication, and uses the multiprocess technology to realize the concurrency of the algorithm. At last, the efficiency and effectiveness of the bug detection algorithm are analyzed by experiment.

Key words: concurrency bug detection, atomicity violation, invariant, concurrency algorithm



关键词: 并发错误检测, 原子性违例, 不变量, 并发算法