Giter Site home page Giter Site logo

crashrecovery's Introduction

CrashRecovery

CrashRecovers demonstrates recovery mechanism from crashes/hangs using a simple do-nothing app. This app stays alive, recovers and restarts from a crash or a hang situation. In case of crashes/hangs, it creates and saves the application state(memory dump) that can be used for later troubleshooting.

Platforms:

  • Windows Vista & Windows server 2008.
  • Windows 7 & Windows server 2008 R2.
  • Windows 8 & Windows server 2012.
  • Windows 8.1 & Windows server 2012 R2.
  • Windows 10 & Windows server 2016.
  • Both x86 and x64 are supported.

Design:

  • CrashRecovery.exe designed to work on windows platforms.
  • It handles the WOW64 redirections for 32-bit(esp. registry).
  • CrashRecovery uses WER(Windows Error Reporting) APIs to get crash notification, recovery callbacks, system event callbacks, crashdump, etc.
  • WER APIs requires app to be running for, at least, 60 seconds to avoid cyclic restart.
  • Crashdump: Only the last crash dump is saved to preserve the diskspace.

Alternate design considerations:

  • Another approach is to create two instances of the executable. One instance will run the application while other monitors the first app.
  • On crash monitor app can save the crash dump and restart the app if needed.
  • Platform independent solution could prefer this approach.

Usage:

  • Run CrashRecovery.exe with admin command prompt(App uses registry & WER settings thus needs admin rights.)
  • App keeps crashing every 61 seconds, collecting crashdump.
  • Press Ctr+C to exit.
  • By default crashdump is created in the module directory with name similar to CrashRecovery.exe.11748.dmp.

Note:

  • Settings such as minidump/fulldump are configurable in Settings class(Settings.h).
  • Older versions of windows show the crash notification(UI) by default. If required this can be disabled with registry setting(HKEY_CURRENT_USER\Software\ Microsoft\Windows\Windows Error Reporting\DontShowUI = 1).

Testing:

Testing is done on windows 7 & windows 10 x64 and x86 platforms.

Assumption:

1.Windows WER would be enabled and active for this application.

  • It's possible that WER(Windows error reporting) can be replaced with some other Error handling tool.

TODO:

  • Improvement in logging framework.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.