An efficient method for detecting concurrency errors in object-oriented programs
- 107 Downloads
Multicore and multi-threaded processors have become the norm for modern processors. Accordingly, concurrent programs have become more and more prevalent despite being difficult to write and understand. Although errors are highly likely to appear in concurrent code, conventional error detection methods such as model checking, theorem proving, and code analysis do not scale smoothly to concurrent programs. Testing is an indispensable technique for detecting concurrency errors, but it involves a great deal of manual work and is inefficient. This paper presents an automatic method for detecting concurrency errors in classes in object-oriented languages. The method uses a heuristic algorithm to automatically generate test cases that can effectively trigger errors. Then, each test case is executed automatically and a fast method is adopted to identify the actual concurrency error from anomalous run results. We have implemented a prototype of the method and applied it to some typical Java classes. Evaluation shows that our method is more effective and faster than previous work.
Keywordsconcurrency error dynamic test data race atomicity violations test case generation
Unable to display preview. Download preview PDF.
- 1.Godefroid P, Nagappan N. Concurrency at Microsoft: an exploratory survey. In: Workshop on Exploiting Concurrency Efficiently and Correctly, Princeton, 2008Google Scholar
- 2.Poulsen K. Tracking the blackout bug Security Focus. 2004-04-07. http://www.securityfocus.com/news/8412
- 3.Leveson N G. SafeWare: System Safety and Computers. Boston: Addison-Wesley Professional, 1995Google Scholar
- 7.Park S, Vuduc R W, Harrold M J. Falcon: fault localization in concurrent programs. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, Cape Town, 2010. 245–254Google Scholar
- 12.Schildt H. Java 7 the Complete Reference. 8th Ed. New York: Mc-Graw Hill, 2011Google Scholar
- 15.Nistor A, Luo Q, Pradel M, et al. Ballerina: automatic generation and clustering of efficient random unit tests for multithreaded code. In: ICSE 2012 Proceedings of the 2012 International Conference on Software Engineering, Piscataway, 2012. 727–737Google Scholar
- 21.Naik M, Park C S, Sen K, et al. Effective static deadlock detection. In: ICSE’ 09 Proceedings of the 31st International Conference on Software Engineering, Vancouver, 2009. 386–396Google Scholar
- 26.Pacheco C, Lahiri S K, Ernst M D, et al. Feedback-directed random test generation. In: ICSE’ 07 Proceedings of the 29th international conference on Software Engineering, Minneapolis, 2007. 75–84Google Scholar