Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1109/MICRO.2010.55acmconferencesArticle/Chapter ViewAbstractPublication PagesmicroConference Proceedingsconference-collections
Article

InstantCheck: Checking the Determinism of Parallel Programs Using On-the-Fly Incremental Hashing

Published: 04 December 2010 Publication History

Abstract

Developing multithreaded programs in shared-memory systems is difficult. One key reason is the nondeterminism of thread interaction, which may result in one code input producing different outputs in different runs. Unfortunately, enforcing determinism by construction typically comes at a performance, hardware, or programmability cost. An alternative is to check during testing whether code is deterministic. This paper presents Instant Check, a novel technique that checks determinism with a very small runtime overhead while requiring only a minor hardware extension. During code testing, Instant-Check can check whether the code under test ends up in a deterministic state in various runs. The idea is to compute a 64-bit hash of the memory state and compare the hashes of different test runs that have the same input. If two runs have different hashes, Instant-Check reports state nondeterminism. For efficient operation, Instant Checkuses on-the-fly incremental hashing in hardware. The hash is kept in a per-core 64-bit register, which trivially supports virtualization, migration, and context switching. We use Instant Check to understand the determinism properties of 17 popular applications, including Sphinx3, PBZip2, PARSEC, and SPLASH-2. Instant Check incurs a negligible average runtime overhead of 0.3% over native testing runs. We also show how using Instant Check programmers can find bugs and discuss other applications of fast memory-state hashing. While using Instant Check, we found a real bug in the widely used PARSEC benchmark.

References

[1]
G. Altekar and I. Stoica. ODR: Output-deterministic replay for multicore debugging. In SOSP, 2009.
[2]
M. Bellare and D. Micciancio. A new paradigm for collision-free hashing: Incrementality at reduced cost. In Eurocrypt, 1997.
[3]
T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. CoreDet: A compiler and runtime system for deterministic multithreaded execution. In ASPLOS, 2010.
[4]
C. Bienia, S. Kumar, J. P. Singh, and K. Li. The PARSEC benchmark suite: Characterization and architectural implications. In PACT, 2008.
[5]
B. H. Bloom. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 13(7), 1970.
[6]
R. Bocchino, V. Adve, D. Dig, S. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect sytem for deterministic parallel Java. In OOPSLA, 2009.
[7]
M. D. Bond and K. S. McKinley. Probabilistic calling context. In OOPSLA, 2007.
[8]
S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In ASPLOS, 2010.
[9]
J. Burnim and K. Sen. Asserting and checking determinism for multithreaded programs. In ESEC/SIGSOFT FSE, 2009.
[10]
J. Burnim and K. Sen. DETERMIN: Inferring likely deterministic specifications of multithreaded programs. In ICSE, 2010.
[11]
L. Ceze, J. Tuck, P. Montesinos, and J. Torrellas. BulkSC: Bulk enforcement of sequential consistency. In ISCA, 2007.
[12]
J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: Deterministic shared memory multiprocessing. In ASPLOS, 2009.
[13]
C. Flanagan and S. N. Freund. Atomizer: A dynamic atomicity checker for multithreaded programs. In POPL, 2004.
[14]
C. Flanagan and S. N. Freund. FastTrack: Efficient and precise dynamic race detection. In PLDI, 2009.
[15]
B. Gassend, G. E. Suh, D. E. Clarke, M. van Dijk, and S. Devadas. Caches and hash trees for efficient memory integrity. In HPCA, 2003.
[16]
R. Ghiya, D. M. Lavery, and D. C. Sehr. On the importance of points-to analysis and other memory disambiguation methods for C programs. In PLDI, 2001.
[17]
J. Gilchrist. PBZip2 v1.0.5. http://compression.ca/pbzip2.
[18]
S. Gupta, F. Sultan, S. Cadambi, F. Ivancic, and M. Rötteler. Using hardware transactional memory for data race detection. In IPDPS, 2009.
[19]
D. Hower and M. D. Hill. Rerun: Exploiting episodes for lightweight memory race recording. In ISCA, 2008.
[20]
B. Jenkins. A survey of hash functions. http://www.burtleburtle.net/bob/hash/doobs.html.
[21]
S. T. King, G. W. Dunlap, and P. M. Chen. Debugging operating systems with time-traveling virtual machines. In USENIX, 2005.
[22]
L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7), 1978.
[23]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In CGO, 2004.
[24]
D. Lee, M. Said, S. Narayanasamy, Z. Yang, and C. Pereira. Offline symbolic analysis for multi-processor execution replay. In MICRO, 2009.
[25]
D. Lee, B. Wester, K. Veeraraghavan, S. Narayanasamy, P. M. Chen, and J. Flinn. Respec: Efficient online multiprocessor replay via speculation and external determinism. In ASPLOS, 2010.
[26]
M.-L. Li, R. Sasanka, S. V. Adve, Y.-K. Chen, and E. Debes. The ALPBench benchmark suite for complex multimedia applications. In IISWC, 2005.
[27]
S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes: A comprehensive study on real world concurrency bug characteristics. In ASPLOS, 2008.
[28]
S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting atomicity violations via access interleaving invariants. In ASPLOS, 2006.
[29]
B. Lucia and L. Ceze. Finding concurrency bugs with context-aware communication graphs. In MICRO, 2009.
[30]
C.-K. Luk, R. S. Cohn, R. Muth, H. Patil, A. Klauser, P. G. Lowney, S.Wallace, V. J. Reddi, and K. M. Hazelwood. Pin: Building customized program analysis tools with dynamic instrumentation. In PLDI, 2005.
[31]
D. Marino, M. Musuvathi, and S. Narayanasamy. LiteRace: Effective sampling for lightweight data-race detection. In PLDI, 2009.
[32]
C. C. Minh, M. Trautmann, J. Chung, A. McDonald, N. G. Bronson, J. Casper, C. Kozyrakis, and K. Olukotun. An effective hybrid transactional memory system with strong isolation guarantees. In ISCA, 2007.
[33]
P. Montesinos, M. Hicks, S. T. King, and J. Torrellas. Capo: A software-hardware interface for practical deterministic multiprocessor replay. In ASPLOS, 2009.
[34]
M. Musuvathi and D. L. Dill. An incremental heap canonicalization algorithm. In SPIN, 2005.
[35]
M. Musuvathi and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In PLDI, 2007.
[36]
M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI, 2008.
[37]
A. Muzahid, D. Suárez, S. Qi, and J. Torrellas. SigRace: Signature-based data race detection. In ISCA, 2009.
[38]
S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data races using replay analysis. In PLDI, 2007.
[39]
V. Y. Nguyen and T. C. Ruys. Incremental hashing for Spin. In SPIN, 2008.
[40]
A. Nistor, D. Marinov, and J. Torrellas. Light64: Lightweight hardware support for data race detection during systematic testing of parallel programs. In MICRO, 2009.
[41]
M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient deterministic multithreading in software. In ASPLOS, 2009.
[42]
S. Park, S. Lu, and Y. Zhou. CTrigger: Exposing atomicity violation bugs from their hiding places. In ASPLOS, 2009.
[43]
S. Park, Y. Zhou, W. Xiong, Z. Yin, R. Kaushik, K. H. Lee, and S. Lu. PRES: Probabilistic replay with execution sketching on multiprocessors. In SOSP, 2009.
[44]
C. Sadowski, S. N. Freund, and C. Flanagan. SingleTrack: A dynamic determinism checker for multithreaded programs. In ESOP, 2009.
[45]
K. Sen. Race directed random testing of concurrent programs. In PLDI, 2008.
[46]
G. E. Suh, D. E. Clarke, B. Gassend, M. van Dijk, and S. Devadas. Efficient memory integrity verification and encryption for secure processors. In MICRO, 2003.
[47]
J. Tuck, W. Ahn, L. Ceze, and J. Torrellas. SoftSig: Software-exposed hardware signatures for code analysis and optimization. In ASPLOS, 2008.
[48]
W. Visser, K. Havelund, G. Brat, and S. Park. Model checking programs. Automated Software Engineering Journal, 10(2), 2003.
[49]
W. Visser and P. Mehlitz. Model checking programs with Java PathFinder. In ASE Tutorial, 2006.
[50]
S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: Characterization and methodological considerations. In ISCA, 1995.
[51]
T. Xie, D. Marinov, and D. Notkin. Rostra: A framework for detecting redundant object-oriented unit tests. In ASE, 2004.
[52]
M. Xu, R. Bodík, and M. D. Hill. A serializability violation detector for shared-memory server programs. In PLDI, 2005.
[53]
M. Xu, M. D. Hill, and R. Bodík. A regulated transitive reduction (RTR) for longer memory race recording. In ASPLOS, 2006.
[54]
L. Yen, J. Bobba, M. R. Marty, K. E. Moore, H. Volos, M. D. Hill, M. M. Swift, and D. A. Wood. LogTM-SE: Decoupling hardware transactional memory from caches. In HPCA, 2007.
[55]
W. Zhang, C. Sun, and S. Lu. ConMem: Detecting severe concurrency bugs through an effect-oriented approach. In ASPLOS, 2010.

Cited By

View all
  • (2018)Optimizing software-directed instruction replication for GPU error detectionProceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis10.5555/3291656.3291746(1-12)Online publication date: 11-Nov-2018
  • (2018)Optimizing software-directed instruction replication for GPU error detectionProceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis10.1109/SC.2018.00070(1-12)Online publication date: 11-Nov-2018
  • (2015)Fence Placement for Legacy Data-Race-Free Programs via Synchronization Read DetectionACM Transactions on Architecture and Code Optimization10.1145/283517912:4(1-23)Online publication date: 8-Dec-2015
  • Show More Cited By

Index Terms

  1. InstantCheck: Checking the Determinism of Parallel Programs Using On-the-Fly Incremental Hashing

        Recommendations

        Comments

        Please enable JavaScript to view thecomments powered by Disqus.

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        MICRO '43: Proceedings of the 2010 43rd Annual IEEE/ACM International Symposium on Microarchitecture
        December 2010
        542 pages
        ISBN:9780769542997

        Sponsors

        Publisher

        IEEE Computer Society

        United States

        Publication History

        Published: 04 December 2010

        Check for updates

        Author Tags

        1. Determinism
        2. Incremental Hashing
        3. Memory State Hash

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate 484 of 2,242 submissions, 22%

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

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

        Other Metrics

        Citations

        Cited By

        View all
        • (2018)Optimizing software-directed instruction replication for GPU error detectionProceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis10.5555/3291656.3291746(1-12)Online publication date: 11-Nov-2018
        • (2018)Optimizing software-directed instruction replication for GPU error detectionProceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis10.1109/SC.2018.00070(1-12)Online publication date: 11-Nov-2018
        • (2015)Fence Placement for Legacy Data-Race-Free Programs via Synchronization Read DetectionACM Transactions on Architecture and Code Optimization10.1145/283517912:4(1-23)Online publication date: 8-Dec-2015
        • (2015)Verification of Habanero Java Programs using Computation GraphsACM SIGSOFT Software Engineering Notes10.1145/2830719.283073340:6(1-4)Online publication date: 11-Nov-2015
        • (2015)Concurrent software testing in practice: a catalog of toolsProceedings of the 6th International Workshop on Automating Test Case Design, Selection and Evaluation10.1145/2804322.2804328(31-40)Online publication date: 30-Aug-2015
        • (2012)Axis: automatically fixing atomicity violations through solving control constraintsProceedings of the 34th International Conference on Software Engineering10.5555/2337223.2337259(299-309)Online publication date: 2-Jun-2012

        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