skip to main content
10.1145/2950290.2950310acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

A deployable sampling strategy for data race detection

Published: 01 November 2016 Publication History

Abstract

Dynamic data race detection incurs heavy runtime overheads. Recently, many sampling techniques have been proposed to detect data races. However, some sampling techniques (e.g., Pacer) are based on traditional happens-before relation and incur a large basic overhead. Others utilize hardware to reduce their sampling overhead (e.g., DataCollider) and they, however, detect a race only when the race really occurs by delaying program executions. In this paper, we study the limitations of existing techniques and propose a new data race definition, named as Clock Races, for low overhead sampling purpose. The innovation of clock races is that the detection of them does not rely on concrete locks and also avoids heavy basic overhead from tracking happens-before relation. We further propose CRSampler (Clock Race Sampler) to detect clock races via hardware based sampling without directly delaying program executions, to further reduce runtime overhead. We evaluated CRSampler on Dacapo benchmarks. The results show that CRSampler incurred less than 5% overhead on average at 1% sampling rate. Whereas, Pacer and DataCollider incurred larger than 25% and 96% overhead, respectively. Besides, at the same sampling rate, CRSampler detected significantly more data races than that by Pacer and DataCollider.

References

[1]
Netlink communication between Linux user space and kernel space. http://man7.org/linux/man-pages/man7/netlink.7.html
[2]
Jikes Research Archive. http://www.jikesrvm.org/Resources/ResearchArchive
[3]
Jikes RVM 3.1.3. http://jikesrvm.org
[4]
J. Jackson. Nasdaq's Facebook glitch came from 'race conditions', May 21 2012. http://www.computerworld.com/article/2504676/financial-it/nasdaq-s-facebook-glitch-came-from--race-conditions-.html, last visited on March 2016.
[5]
B. Alpern, C.R. Attanasio, A. Cocchi, D. Lieber, S. Smith, T. Ngo, J.J. Barton, S.F. Hummel, J.C. Sheperd, and M. Mergen. Implementing jalapeño in Java. In Proc. OOPSLA, 314-324, 1999.
[6]
S. Biswas, M. Zhang, and M.D. Bond. Lightweight data race detection for production runs. Ohio State CSE Technical Report #OSU-CISRC-1/15-TR01, January 2015. 23 pages, available at: http://web.cse.ohio-state.edu/~mikebond/litecollider-tr.pdf
[7]
E. Bodden and K. Havelund. Racer: effective race detection using AspectJ. In Proc. ISSTA, 155-166, 2008.
[8]
M.D. Bond, K. E. Coons and K. S. Mckinley. PACER: Proportional detection of data races. In Proc. PLDI, 255-268, 2010.
[9]
S.M. Blackburn, R. Garner, C. Hoffmann, A.M. Khang, K.S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S.Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. Eliot B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The Dacapo benchmarks: Java benchmarking development and analysis. In Proc. OOPSLA, 169-190, 2006.
[10]
A. Bron, E. Farchi, Y. Magid, Y. Nir, and S. Ur. Applications of synchronization coverage. In Proc. PPoPP, 206-212, 2005.
[11]
S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In Proc. ASPLOS, 167-178, 2010.
[12]
Y. Cai and L. Cao. Effective and precise dynamic detection of hidden races for Java programs. In Proc. ESEC/FSE, 450-461, 2015.
[13]
Y. Cai and W.K. Chan. LOFT: Redundant synchronization event removal for data race Detection. In Proc. ISSRE, 160-169, 2011.
[14]
Y. Cai and W.K. Chan. Lock trace reduction for multithreaded programs. IEEE Transactions on Parallel and Distributed Systems (TPDS), 24(12): 2407-2417, 2013.
[15]
Y. Cai and W.K. Chan. Magiclock: scalable detection of potential deadlocks in large-scale multithreaded programs. IEEE Transactions on Software Engineering (TSE), 40(3), 266-281, 2014.
[16]
D. Dimitro, V. Raychev, M. Vechev, and E. Koskinen. Commutativity race detection. In Proc. PLDI, 305-315, 2014.
[17]
J. Erickson, M. Musuvathi, S. Burckhardt and K. Olynyk. Effective data-race detection for the kernel. In Proc. OSDI, 1-6, 2010.
[18]
M. Eslamimehr and J. Palsberg. Race directed scheduling of concurrent programs. In Proc. PPoPP, 301-314, 2014.
[19]
C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In Proc. PLDI, 121-133, 2009.
[20]
C. Flanagan and P. Godefroid. Dynamic partial-order reduction for model checking software. In Proc. POPL, 110-121, 2005.
[21]
S. Hong, J. Ahn, S. Park, M. Kim, and M.J. Harrold. Testing concurrent programs to achieve high synchronization coverage. In Proc. ISSTA, 210-220, 2012.
[22]
S. Hong, Y. Park, and M. Kim. Detecting concurrency errors in client-side java script web applications. In Proc. ICST, 61-70, 2014.
[23]
C. Hsiao, Y. Yu, S. Narayanasamy, Z. Kong, C.L. Pereira, G.A. Pokam, P.M. Chen, and J. Flinn. Race detection for event-driven mobile applications. In Proc. PLDI, 326-336, 2014.
[24]
J. Huang, P.O. Meredith, and G. Rosu. Maximal sound predictive race detection with control flow abstraction. In Proc. PLDI, 337-348, 2014.
[25]
G. Jin, A. Thakur, B. Liblit and S. Lu. Instrumentation and sampling strategies for cooperative concurrency bug isolation. In Proc. OOPSLA, 241-225, 2010.
[26]
V. Kahlon, Y. Yang, S. Sankaranarayanan, and A. Gupta. Fast and accurate static data-race detection for concurrent programs. In Proc. CAV, 226-239, 2007.
[27]
B. Kasikci, C. Zamfir, and G. Candea. RaceMob: Crowdsourced data race detection. In Proc. SOSP, 406-422, 2013.
[28]
P. Krishnan. Hardware Breakpoint (or watchpoint) usage in Linux Kernel. IBM Linux Technology Center, Canada, July 2009.
[29]
L. Lamport. Time, clocks, and the ordering of events. Communications of the ACM, 21(7):558-565, 1978.
[30]
Z. Letko, T. Vojnar, and B. Krena. Coverage metrics for saturation-based and search-based testing of concurrent software. In Proc. RV, 177-192, 2011.
[31]
N.G. Leveson and C. S. Turner. An investigation of the Therac-25 accidents. Computer, 26(7), 18-41, 1993.
[32]
S. Lu, S. Park, E. Seo, and Y.Y. Zhou, Learning from mistakes: A comprehensive study on real world concurrency bug characteristics. In Proc. ASPLOS, 329-339, 2008.
[33]
B. Lucia and L. Ceze. Cooperative empirical failure avoidance for multithreaded programs. In Proc. ASPLOS, 39-50. 2013.
[34]
P. Maiya, a. Kanade, and R. Majumdar. Race detection for Android applications. In Proc. PLDI, 316-325, 2014.
[35]
D. Marino, M. Musuvathi, and S. Narayanasamy. LiteRace: effective sampling for lightweight data-race detection. In Proc. PLDI, 134-143, 2009.
[36]
M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In Proc. OSDI, 267-280 2008.
[37]
M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In Proc. PLDI, 308-319, 2006.
[38]
S. Nagarakatte, S. Burckhardt, M. M.K. Martin, and M. Musuvathi. Multicore acceleration of priority-based schedulers for concurrency bug detection. In Proc. PLDI, 2012, 543-554, 2012.
[39]
S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data races using replay analysis. In Proc. PLDI, 22-31, 2007.
[40]
E. Pozniansky and A. Schuster. Efficient on-the-fly data race detection in multithreaded C++ programs. In Proc. PPoPP, 179-190, 2003.
[41]
P. Pratikakis, J.S. Foster, and M. Hicks. LOCKSMITH: context-sensitive correlation analysis for race detection. In Proc. PLDI, 320-331, 2006.
[42]
C.S. Park, K. Sen, P. Hargrove, and C. Iancu. Efficient data race detection for distributed memory parallel programs. In Proc. SC, 2011.
[43]
K. Poulsen. Software bug contributed to blackout. http://www.securityfocus.com/news/8016, Feb. 2004.
[44]
A.K. Rajagopalan and J. Huang. RDIT: race detection from incomplete traces. In Proc. ESEC/FSE, 914-917, 2015.
[45]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro and T. Anderson. Eraser: a dynamic data race detector for multi-threaded programs. ACM TOCS, 15(4), 391-411, 1997.
[46]
K. Sen. Race Directed Random Testing of Concurrent Programs. In Proc. PLDI, 11-21, 2008.
[47]
K. Serebryany and T. Iskhodzhanov. ThreadSanitizer: data race detection in practice. In Proc. WBIA, 62-71, 2009.
[48]
Y. Smaragdakis, J. Evans, C. Sadowski, J. Yi, and C. Flanagan. Sound predictive race detection in polynomial time. In Proc. POPL, 387-400, 2012.
[49]
F. Sorrentino, A. Farzan, and P. Madhusudan. PENELOPE: weaving threads to expose atomicity violations. In Proc. FSE, 37-46, 2010.
[50]
K. Vineet and C. Wang. Universal causality graphs: a precise happens-before model for detecting bugs in concurrent programs. In Proc. CAV, 434-449, 2010.
[51]
J.W. Voung, R. Jhala, and S. Lerner. RELAY: static race detection on millions of lines of code. In Proc. FSE, 205-214, 2007.
[52]
C. Wang, K. Hoang. Precisely deciding control state reachability in concurrent traces with limited observability. In Proc. VMCAI, 376-394, 2014.
[53]
C. Wang, M. Said, and A. Gupta. Coverage guided systematic concurrency testing. In Proc. ICSE, 221-230, 2011.
[54]
X.W. Xie and J.L. Xue. Acculock: Accurate and Efficient detection of data races. In Proc. CGO, 201-212, 2011.
[55]
J. Yu, S. Narayanasamy, C. Pereira, and G. Pokam. Maple: a coverage-driven testing tool for multithreaded programs. In Proc. OOPSLA, 485-502, 2012.
[56]
T. Yu, W. Srisa-an, and G. Rothermel. SimRT: An automated framework to support regression testing for data races. In Proc. ICSE, 48-59, 2014.
[57]
Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: efficient detection of data race conditions via adaptive tracking. In Proc. SOSP, 221-234, 2005.
[58]
X. Yuan, C. Wu, Z. Wang, J. Li, P.C. Yew, J. Huang, X. Feng, Y. Lan, Y. Chen, and Y. Guan. ReCBuLC: reproducing concurrency bugs using local clocks. In Proc. ICSE, 824-834, 2015.
[59]
K. Zhai, B.N. Xu, W.K. Chan, and T.H. Tse. CARISMA: a context-sensitive approach to race-condition sample-instance selection for multithreaded applications. In Proc. ISSTA, 221-231, 2012.
[60]
W. Zhang, M. d. Kruijf, A. Li, S. Lu and K. Sankaralingam. ConAir: featherweight concurrency bug recovery via single-threaded idempotent execution. In Proc. ASPLOS, 113-126. 2013.

Cited By

View all
  • (2024)Towards Life-long Software Self-validation in ProductionProceedings of the 15th Asia-Pacific Symposium on Internetware10.1145/3671016.3671382(357-366)Online publication date: 24-Jul-2024
  • (2022)ERACE: Toward Facilitating Exploit Generation for Kernel Race VulnerabilitiesApplied Sciences10.3390/app12231192512:23(11925)Online publication date: 22-Nov-2022
  • (2022)PoirotProceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security10.1145/3548606.3560710(937-950)Online publication date: 7-Nov-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
FSE 2016: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering
November 2016
1156 pages
ISBN:9781450342186
DOI:10.1145/2950290
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 November 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Data race
  2. concurrency bugs
  3. data breakpoints
  4. sampling

Qualifiers

  • Research-article

Funding Sources

Conference

FSE'16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 17 of 128 submissions, 13%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)2
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Towards Life-long Software Self-validation in ProductionProceedings of the 15th Asia-Pacific Symposium on Internetware10.1145/3671016.3671382(357-366)Online publication date: 24-Jul-2024
  • (2022)ERACE: Toward Facilitating Exploit Generation for Kernel Race VulnerabilitiesApplied Sciences10.3390/app12231192512:23(11925)Online publication date: 22-Nov-2022
  • (2022)PoirotProceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security10.1145/3548606.3560710(937-950)Online publication date: 7-Nov-2022
  • (2022)Hybrid Static-Dynamic Analysis of Data Races Caused by Inconsistent Locking Discipline in Device DriversIEEE Transactions on Software Engineering10.1109/TSE.2021.3138735(1-1)Online publication date: 2022
  • (2021)Sound and efficient concurrency bug predictionProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468549(255-267)Online publication date: 20-Aug-2021
  • (2021)RAProducer: efficiently diagnose and reproduce data race bugs for binaries via trace analysisProceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3460319.3464831(593-606)Online publication date: 11-Jul-2021
  • (2020)Effective Detection of Sleep-in-atomic-context Bugs in the Linux KernelACM Transactions on Computer Systems10.1145/338199036:4(1-30)Online publication date: 17-Apr-2020
  • (2020)Low-overhead deadlock predictionProceedings of the ACM/IEEE 42nd International Conference on Software Engineering10.1145/3377811.3380367(1298-1309)Online publication date: 27-Jun-2020
  • (2020)Krace: Data Race Fuzzing for Kernel File Systems2020 IEEE Symposium on Security and Privacy (SP)10.1109/SP40000.2020.00078(1643-1660)Online publication date: May-2020
  • (2020)IFIX: Fixing Concurrency Bugs While They Are Introduced2020 25th International Conference on Engineering of Complex Computer Systems (ICECCS)10.1109/ICECCS51672.2020.00025(155-164)Online publication date: Oct-2020
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media