Lightweight Labeling Scheme for On-the-fly Race Detection of Signal Handlers
Data races represent one of the most notorious class of bugs in shared-memory parallel programs since they are hard to reproduce and can lead programs into unintended nondeterministic executions. However, data races can also show up in sequential programs that use signals when a signal handler and the sequential program both access without proper synchronization, a shared variable with at least one write-access operation. Unfortunately, existing tools for race detection in such programs produce high time and space overhead that drastically slow down the monitored program. This overhead is partly due to the use of costly and inappropriate timestamps originally designed for threads’ ordering in multithreaded programs. This paper presents a lightweight labeling scheme for efficient on-the-fly race detection in sequential programs that use signal handlers. This scheme generates constant-sized labels for the program and its signal handlers and determines the logical concurrency between instructions accessing the same shared memory. Generating and comparing concurrency information are done in constant time. The efficiency of the technique and its limited footprint on the program execution make the on-the-fly race detection more practical in sequential programs.
KeywordsData races sequential programs signal signal handlers labeling scheme on-the-fly race detection
Unable to display preview. Download preview PDF.
- 1.Agarwal, A., Garg, V.K.: Efficient Dependency Tracking for Relevant Events in SharedMemory Systems. In: The 24th Symposium on Principles of Distributed Computing (PODC 2005), pp. 19–28. ACM, Las Vegas (2005)Google Scholar
- 2.Baldoni, R., Raynal, M.: Fundamentals of Distributed Computing: A Practical Tour of Vector Clock Systems. IEEE Distributed Systems Online 3(2) (2002)Google Scholar
- 3.Banerjee, U., Bliss, B., Ma, Z., Petersen, P.: A Theory of Data Race Detection. In: Workshop on Parallel and Distributed Systems: Testing and Debugging, pp. 69–78. ACM, New York (2006)Google Scholar
- 4.Dinning, A., Schonberg, E.: An Empirical Comparison of Monitoring Algorithms for Access Anomaly Detection. In: The Second ACM SIGPLAN symposium on Principles & Practice of Parallel Programming, pp. 1–10. ACM, New York (1990)Google Scholar
- 5.Dowd, M., McDonald, J., Schuh, J.: The Art of Software Security Assessment: Identifying and Preventing Software Vulnerabilities, 1st edn. Addison-Wesley Professional, Massachusetts (2006)Google Scholar
- 7.Flanagan, C., Freund, S.N.: FastTrack: Efficient and Precise Dynamic Race Detection. Communications of the ACM, 93–101 (November 2010)Google Scholar
- 11.Ousterhout, J.K.: Why Threads are a Bad Idea (for most purposes). In: USENIX 1996: Invited talk at the 1996 USENIX Technical Conference, USENIX (1996)Google Scholar
- 14.The Open Group, and IEEE: The Open Group Technical Standard Base Specifications, (7), POSIX.1-2008 (2008), http://www.opengroup.org/onlinepubs/9699919799/
- 15.Zalewski, M.: Delivering Signals for Fun and Profit (2001), http://lcamtuf.coredump.cx/signals.txt