Font Size: a A A

Concurrent Bug Reproduction And Detection Based On Replay Analysis

Posted on:2011-09-17Degree:MasterType:Thesis
Country:ChinaCandidate:Q Z LuoFull Text:PDF
GTID:2178360308452631Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the development of multi-thread techniques, multi-thread programming has been much more widely applied in practice. Through the improvement of CPU utilization rate and the reduced waste of resources, multi-thread techniques could greatly improve the execution efficiency of programs. Programming languages, like C++ and Java, propose their own concurrency programming models. These models are also widely used in real applications and proved to be a great help to increase programs'execution speed. But in the meantime, due to concurrent programs'un-deterministic behaviors, developers would hardly to spot an error after it happened; it will also require a lot of time of programmers'to reproduce such an erroneous scenario. Typical concurrent bugs such as Data Race, Deadlock and Atomicity Violation, these concurrent programs specific bugs largely make the test and correction process harder. Based on above points, a large part of traditional program testing techniques are not applicable for concurrent programs. And the un-determinism of thread scheduling also issue new requests for concurrent program testing.To aid in testing concurrent programs, Record & Replay techniques are employed in concurrent program testing. There are two methods concerning record and replay for concurrent programs: Content-based method and Order-based method. Content-based method could accurately reproduce read and write operations of memory, while Order-based method cares about the execution order of inter-thread events. These two methods both have advantages and limitations: Content-based method would generate huge size record file for the frequent read and write operations of memory; on the other hand, Order-based method requires the precise recording of execution order of inter-thread events in the executing process.Existing methods use long time Stress Testing to reproduce software bugs in concurrent programs. Not only this technique costs a lot of time, but also it could not guarantee the reproduction for a specific concurrent bug. Based on such requirements, this paper mainly focused on record and deterministic replay for bugs in concurrent programs. After using Soot to instrument Java byte code, two versions of original program will be generated: record version and replay version. Running record version program will record the logical order of inter-thread events'execution at the same time of the original program's running. This paper also proposed ConCrash, an tool to generate multi-thread test cases and the record files of logical orders of program's running after program crashes, which is based on studying and extending single thread bug reproduction infrastructure. The crash scenario of concurrent programs could be reproduced using these generated test cases.The main contributions of this paper are:A lightweight and portable technique that captures and reproduces multi-thread concurrent failures, which can be integrated with various static analysis toolsA prototype implementation for Java, ConCrash, which could generate simulated JUnit test cases for multi-thread applications.A thorough evaluation for ConCrash's effectiveness and efficiency based on benchmarks and read world applications. The future work directions are also proposed.
Keywords/Search Tags:Concurrent programs, Failure reproduce, Deterministic replay, Byte-code instrumentation, Testing
PDF Full Text Request
Related items