Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Detecting race conditions in Java programs using dynamic analysis

https://doi.org/10.15514/ISPRAS-2015-27(2)-3

Abstract

This article presents a dynamic analysis approach to automatic detection of race conditions in multi-threaded Java applications. We use static Java byte-code instrumentation framework Coffee Machine to avoid additional dynamic instrumentation overhead and support a more extensive set of Java virtual machines. Our instrumentation routines target bytecode instructions related to multithreading, monitors as well as base data access and method call instructions. We perform data race detection using ThreadSanitizer Offline tool utilizing two distinct methods: happens-before relation tracking and lock set tracking. Our approach has been tested on a set of open source projects.

About the Authors

M. . Ermakov
Department of Computational Mathematics and Cybernethics, Moscow State University
Russian Federation


S. . Vartanov
Department of Computational Mathematics and Cybernethics, Moscow State University
Russian Federation


References

1. L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM, 21(7), 1978. pp. 558–565. doi: 10.1145/359545.359563

2. Java Thread Primitive Deprecation [HTML] (http://docs.oracle.com/javase/7/docs/technotes/guides/concurrency/threadPrimitiveDeprecation.html)

3. K. Serebryany and T. Iskhodzhanov. ThreadSanitizer – data race detection in practice. Proceedings of the Workshop on Binary Instrumentation and Applications, 2009. pp. 62-71. doi: 10.1145/1791194.1791203

4. Apache Commons Byte Code Engineering Library [HTML] (http://commons.apache.org/bcel)

5. Bruneton E. ASM 4.0. A Java bytecode engineering library, 2011 [PDF] (http://download.forge.objectweb.org/asm/asm4-guide.pdf)

6. M. Eslamimehr, J. Palsberg. Sherlock: scalable deadlock detection for concurrent programs // Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. 2014. P. 353–365

7. Nethercote N., Seward J. Valgrind: A framework for heavyweight dynamic binary instrumentation // PLDI. 2007.

8. C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. Janapa Reddi, K. Hazelwood. Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation // PLDI. 2005.


Review

For citations:


Ermakov M., Vartanov S. Detecting race conditions in Java programs using dynamic analysis. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2015;27(2):39-52. (In Russ.) https://doi.org/10.15514/ISPRAS-2015-27(2)-3



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)