Using local clocks to reproduce concurrency bugs

Zhe Wang, Chenggang Wu, Xiang Yuan, Zhenjiang Wang, Jianjun Li, Pen Chung Yew, Jeff Huang, Xiaobing Feng, Yanyan Lan, Yunji Chen, Yuanming Lai, Yong Guan

Research output: Contribution to journalArticlepeer-review

1 Scopus citations


Multi-threaded programs play an increasingly important role in current multi-core environments. Exposing concurrency bugs and debugging such multi-threaded programs are quite challenging due to their inherent non-determinism. In order to mitigate such non-determinism, many approaches such as record-and-replay have been proposed. However, those approaches often suffer significant performance degradation because they require a large amount of recorded information and/or long analysis and replay time. In this paper, we propose an efficient and effective approach, ReCBuLC (reproducing concurrency bugs using local clocks), to take advantage of the hardware clocks available on modern processors. The key idea is to reduce the recording overhead and the time to analyze events' global order by recording timestamps in each thread. These timestamps are used to determine the global order of shared accesses. To avoid the large overhead in accessing system-wide global clock, we opt to use local per-core clocks that incur much less access overhead.We then propose techniques to resolve skews among local clocks and obtain an accurate global event order. By using per-core clocks, state-of-the-art bug reproducing systems such as PRES and CLAP can reduce their recording overheads by up to 85 percent, and the analysis time up to 84.66% 99.99%, respectively.

Original languageEnglish (US)
Article number8038023
Pages (from-to)1112-1128
Number of pages17
JournalIEEE Transactions on Software Engineering
Issue number11
StatePublished - Sep 13 2017

Bibliographical note

Funding Information:
We would like to thank the anonymous reviewers whose suggestions have improved the presentation of our work. This research is supported by the National High Technology Research and Development Program of China under grant 2012AA010901, the National Natural Science Foundation of China (NSFC) under grants 61303051, 61303052, 61332009, 60925009, and 61100011, the Innovation Research Group of NSFC under grant 61221062. Xiang Yuan, Zhenjiang Wang, and Jianjun Li did this work when they were in the State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences.

Publisher Copyright:
© 2017 IEEE.


  • Bug reproducing
  • Concurrency
  • Local clock


Dive into the research topics of 'Using local clocks to reproduce concurrency bugs'. Together they form a unique fingerprint.

Cite this