Abstract
Multi-threaded programming is part of mainstream software development. It adds several issues not present on serial applications. Among the issues an important one is data races, i.e. the unsynchronized access of data by multiple threads. They are particularly hard to debug since they typically occur sporadically and often invisibly corrupt the internal state. Generally, the tool used to identify those kinds of issues is a data race analyzer. Due to the subtlety of data race bugs, the user at this point would already have tried to understand the problem using an application debugger. Debuggers offer a variety of features to analyze and modify the execution state of programs. Such features are typically not offered by data race analyzers. Integrating a data race analyzer into a debugger would improve the user workflow. This is usually prohibited by the huge performance overhead of a whole-program data race analysis. We propose in this work a method to reduce the overhead by allowing the user to define the scope of the analysis. A sufficiently narrow scope reduces the performance overhead to less than 5\(\times \), thus allowing its integration into a debugger. Defining the analysis scope fits naturally into the debugger workflow of focusing on one problem at a time. The work here presented has been implemented in a commercial debugger product.













Similar content being viewed by others
References
Banerjee, U., Bliss, B., Ma, Z., Petersen, P.: A theory of data race detection. In: Proceedings of the 2006 Workshop on Parallel and Distributed Systems: Testing and Debugging, PADTAD ’06, pp. 69–78. ACM, New York, NY, USA (2006)
Emrath, P.A., Padua, D.A.: Automatic detection of nondeterminacy in parallel programs. SIGPLAN Not. 24(1), 89–99 (1988)
Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. Commun. ACM 53, 93–101 (2010)
Jannesari, A., Tichy, W.F.: On-the-fly race detection in multi-threaded programs. In: Proceedings of the 6th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging, PADTAD ’08, pp. 6:1–6:10. ACM, New York, NY, USA (2008)
Lamport, L.: Time clocks, and the ordering of events in a distributed system. Commun. ACM 21, 558–565 (1978)
Mueller-Albrecht, R.: Intel(R) Debugger for Linux (2010). http://software.intel.com/en-us/articles/idb-linux/
Mühlenfeld, A., Wotawa, F.: Fault detection in multi-threaded c++ server applications. Electron. Notes Theor. Comput. Sci. 174, 5–22 (2007)
Netzer, R.H.B., Miller, B.P.: Improving the accuracy of data race detection. In: Proceedings of the Third ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP ’91, pp. 133–144. ACM, New York, NY, USA (1991)
OpenMP Architecture Review Board (2011). http://www.openmp.org/
Patil, H., Pereira, C., Stallcup, M., Lueck, G., Cownie J.: Pinplay: a framework for deterministic replay and reproducible analysis of parallel programs. In: Proceedings of the 8th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO ’10, pp. 2–11. ACM, New York, NY, USA (2010)
Pozniansky, E., Schuster, A.: Efficient on-the-fly data race detection in multithreaded c++ programs. SIGPLAN Not. 38, 179–190 (2003)
Robert Mueller-Albrecht, B.A., Metzger, M.: Intel(R) Parallel Debugger Extension (2010). http://software.intel.com/en-us/articles/parallel-debugger-extension/
Ronsse, M., De Bosschere, K.: Recplay: a fully integrated practical record/replay system. ACM Trans. Comput. Syst. 17, 133–152 (1999)
Sack, P., Bliss, B.E., Ma, Z., Petersen, P., Torrellas J.: Accurate and efficient filtering for the intel thread checker race detector. In: Proceedings of the 1st Workshop on Architectural and System Support for Improving Software Dependability, ASID ’06, pp. 34–41. ACM, New York, NY, USA (2006)
Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15, 391–411 (1997)
Standard Performance Evaluation Corporation. Spec omp (openmp benchmark suite) 3.1c (2011). http://www.spec.org/omp/
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Metzger, M., Tian, X. & Tedeschi, W. User-Guided Dynamic Data Race Detection. Int J Parallel Prog 43, 159–179 (2015). https://doi.org/10.1007/s10766-013-0296-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10766-013-0296-z