Lightweight Labeling Scheme for On-the-fly Race Detection of Signal Handlers

  • Guy Martin Tchamgoue
  • Ok-Kyoon Ha
  • Kyong-Hoon Kim
  • Yong-Kee Jun
Part of the Communications in Computer and Information Science book series (CCIS, volume 151)


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.


Data races sequential programs signal signal handlers labeling scheme on-the-fly race detection 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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. 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. 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. 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. 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
  6. 6.
    Fidge, C.J.: Logical Time in Distributed Computing Systems. Computer 53(11), 28–33 (1991)CrossRefGoogle Scholar
  7. 7.
    Flanagan, C., Freund, S.N.: FastTrack: Efficient and Precise Dynamic Race Detection. Communications of the ACM, 93–101 (November 2010)Google Scholar
  8. 8.
    Jun, Y., Koh, K.: On-The-Fly Detection of Access Anomalies in Nested Parallel Loops. In: The 1993 ACM/ONR Workshop on Parallel and Distributed Debugging, pp. 107–117. ACM, California (1993)CrossRefGoogle Scholar
  9. 9.
    Mellor-Crummey, J.: On-The-Fly Detection of Data Races for Programs with Nested Fork-Join Parallelism. In: The 1991 ACM/IEEE conference on Supercomputing (SC 1991), pp. 24–33. ACM, New York (1991)CrossRefGoogle Scholar
  10. 10.
    Netzer, R.H.B., Miller, B.P.: What Are Race Conditions? Some Issues and Formalizations. ACM Letters on Programming Languages and Systems 1(1), 74–88 (1992)CrossRefGoogle Scholar
  11. 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
  12. 12.
    Ronsse, M., Maebe, J., De Bosschere, K.: Detecting Data Races in Sequential Programs with DIOTA. In: Danelutto, M., Vanneschi, M., Laforenza, D. (eds.) Euro-Par 2004. LNCS, vol. 3149, pp. 82–89. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Tahara, T., Gondow, K., Ohsuga, S.: Dracula: Detector of Data Races in Signals Handlers. In: The 15th IEEE Asia-Pacific Software Engineering Conference (APSEC 2008), pp. 17–24. IEEE, Los Alamitos (2008)CrossRefGoogle Scholar
  14. 14.
    The Open Group, and IEEE: The Open Group Technical Standard Base Specifications, (7), POSIX.1-2008 (2008),
  15. 15.
    Zalewski, M.: Delivering Signals for Fun and Profit (2001),

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Guy Martin Tchamgoue
    • 1
  • Ok-Kyoon Ha
    • 1
  • Kyong-Hoon Kim
    • 1
  • Yong-Kee Jun
    • 1
  1. 1.Department of InformaticsGyeongsang National UniversityJinjuSouth Korea

Personalised recommendations