Programming-Systems-Lab / chroniclerj

Efficiently recording and reproducing failures in deployed applications
14 stars 8 forks source link

Build Status ChroniclerJ [Chronicler implemented in Java]

Lightweight Recording of Nondeterministic Inputs to Reproduce Field Failures

ChroniclerJ is a system for recording buggy program executions in the field and reproducing them in the lab. ChroniclerJ is our Java implementation of Chronicler, a generalized record and replay approach for VM-based languages.

This repository contains the source for ChroniclerJ. You can build it using mvn package.

For more information

Please see our Technical Report: http://mice.cs.columbia.edu/getTechreport.php?techreportID=1512&format=pdf, or email Jonathan Bell

Running

Instrumenting your code

Before deploying your code, you need to run the ChroniclerJ instrumenter, which will produce two copies of your program: one for deployment (with logging code), and one for replay purposes (with code that reads back from the log).

To run the instrumenter, use the command java -jar chroniclerj.jar -instrument {-mxLogN} input ouputLocationDeploy outputLocationReplay, where:

It is important that all libraries that you plan to deploy with your application are instrumented. We suggest running the instrumenter at the top level folder that you were going to deploy, which might contain several jar files, several class files, etc.

Collecting test cases

Deploy your code as you normally would, but deploy the code that was instrumented and placed in outputLocationDeploy rather than your original, uninstrumented code. Make sure that the ChroniclerJ jar is in your classpath too.

When an uncaught exception ocurrs, ChroniclerJ generates a test case. You can manually invoke this process (e.g. from your own exception handler) by calling the method ChroniclerJExceptionRunner.genTestCase(). Users are notified that a test case was generated, which is placed in the current working directory and has the name format chroniclerj-crash-currenttime.test. The test case file contains all logs necessary to replay the execution.

Replaying test cases

To replay the failed executions, run the command java -jar chroniclerj.jar -replay testCase {classpath}, where

License

This software is released under the MIT license.

Copyright (c) 2012, by The Trustees of Columbia University in the City of New York.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgements

This project makes use of the following libraries:

The authors of this software are Jonathan Bell, Nikhil Sarda and Gail Kaiser. The authors are members of the Programming Systems Laboratory, funded in part by NSF CCF-1161079, NSF CNS-0905246 and NIH 2 U54 CA121852-06.