RaceTrack is a dynamic race detection tool for managed code.
Multithreading has become widely used in software development: modern operating systems and programming languages support threads and many large commercial software systems use them. However, writing and debugging multithreaded programs is very difficult. Probably the most difficult kind of programming error to debug in a multithreaded program is a data race in which the effect of the bug is not reproducible because it depends on a subtle timing relation between threads. Effective automatic race detection tools are lacking.
The RaceTrack research project addresses the problem of detecting races by instrumenting the execution of the program in order to detect suspicious access patterns to shared variables. A suspicious access pattern indicates that a data race might be possible and that the relevant code should be examined closely. The research aims to find a good balance between real races detected, false alarms generated, and the overheads of decreased execution speed and increased memory usage due to instrumentations. The target is large scale multithreaded software systems written in CLI managed code. Unmanaged code will run under RaceTrack without any instrumentation, and hence any race involving unmanaged code will not be detected.
- March 2004. We have built a research prototype using the Rotor runtime. Early experiments have been promising. Our RaceTrack demo at MSR's TechFest'04 received very positive feedbacks. We have started investigating the possibility of integrating RaceTrack into our production runtime. We plan to have a small number of trials with product groups.
- August 2004. We have ported RaceTrack to Everett(v1.1.4322). A Whidbey port is under way. Using RaceTrack, we discovered a few quite subtle bugs in mscorlib. RaceTrack's performance also looked quite good. We have filed one patent, and two more are in preparation.
- Wei Chen (Intern, Summer '04)
- Tom Rodeheffer
- Yuan Yu
- Yuan Yu, Tom Rodeheffer, and Wei Chen. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In Proceedings of the ACM Symposium on Operating System Principles, October 2005.
- E. Schonberg. On-The-Fly detection of Access Anomalies. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, June 1989.
- S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic data race detector for muti-threaded programs. ACM Transactions on Computer Systems, 15(4), 1997.
- C. Praun and T. Gross. Object race detection. In ACM Conference on Object-oriented Programming Systems, languages, and Applications, 2001.
- J. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and precise datarace detection for multithreaded object-oriented programs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 2002.
- D. Engler and K. Ashcraft. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In Proceedings of the ACM Symposium on Operating System Principles, October 2003