Shadow Simulation Replay for Pre-Error State Debugging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Real-time interactive applications are difficult to troubleshoot when they enter an anomalous or failed state, as current tools lack the necessary information to identify the inputs or stimuli that lead to such states, making it challenging for developers to diagnose and understand the pre-error conditions.
Innovation Solution
A processing system is implemented that includes a time-delayed version of the primary instance of a real-time interactive application, which operates with the same inputs but at a configurable delay. This allows the time-delayed instance to be paused before an undesired state occurs, enabling inspection and diagnostic functions, thereby preserving the pre-error state and providing more detailed information for troubleshooting.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a single instance of a real-time interactive application is executed, then the application operates in real-time with full interactivity, but the ability to diagnose pre-error states is lost when the application enters an anomalous state
Solution Approach 1:
The system executes a shadow instance that operates in advance of the primary instance, capturing pre-error states before the primary instance enters an anomalous state. This preliminary action allows developers to inspect the state of the application before failures occur, eliminating the need to lose time analyzing crash dumps and logs after errors have already happened.
Solution Approach 2:
The system creates a shadow instance that is a copy of the primary application instance. This shadow instance processes the same input stream but operates with a time delay, allowing it to be paused and inspected at pre-error states. The copy preserves all necessary state information that would otherwise be lost when the primary instance crashes.
2Loss of information
If a time-delayed shadow instance is executed to preserve pre-error states, then diagnostic information is improved, but system complexity increases
Solution Approach 1:
The shadow instance serves multiple functions: it processes the input stream, maintains a delayed state for inspection, and can be paused at pre-error states. This multi-functional approach allows a single additional component to provide comprehensive diagnostic capabilities without requiring multiple separate systems.
Solution Approach 2:
The shadow instance acts as an intermediary between the input stream and the primary instance. It receives the same inputs but processes them with a time delay, providing a buffer that allows inspection of pre-error states without interfering with the real-time operation of the primary application.
3Reliability
If the shadow instance operates with a configurable time delay, then pre-error state preservation is enabled, but processing time increases
Solution Approach 1:
The time delay of the shadow instance is configurable rather than fixed, allowing the system to dynamically adjust the delay based on diagnostic needs. This dynamic adjustment enables optimization between preserving pre-error states and maintaining processing speed, depending on the specific debugging requirements.
Data Source
AI summary
An electronic computing system preserves a pre-error state of a processing unit by receiving a first stream of inputs; buffering the first stream of inputs to generate a buffered stream of inputs identical to the first stream of inputs; conveying the first stream to a primary instance of a first program; conveying the buffered stream to a secondary instance of the first program; executing the primary instance on the first stream in real time; executing the secondary instance on the buffered stream with a predefined time delay with respect to execution of the primary instance on the first stream; detecting an error state resulting from execution of the primary instance; and in response to detecting the error state, pausing the secondary instance and preserving a current state of the secondary instance, wherein the current state of the secondary instance corresponds to a pre-error state of the primary instance.


