Debugging Code via Thread Pattern Variance Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging software code is challenging due to intermittent bugs that manifest only during program execution, making it difficult to identify the specific code causing errors, even with the use of debuggers, as the bug may occur before visible symptoms appear, requiring extensive resources and time.

Innovation Solution

The method involves executing multiple instances of code and comparing thread patterns to identify variances, which can indicate bugs, using a code debugging manager that filters out operating system threads, captures execution context information, and sets breakpoints for further analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional debuggers are used to monitor and stop code execution, then debugging capability is provided, but extensive resources and time are required to identify bugs that occur before visible symptoms

Engineering Contradiction:
Improvebug detection precisionVSAvoiddebugging time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary actions by executing multiple instances of the code in parallel before traditional debugging can occur. Thread patterns are captured and stored for later comparison, allowing the system to proactively gather execution data that will reveal intermittent bugs without requiring extensive manual debugging time later.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates multiple copies (instances) of the code that execute in parallel. Each instance generates thread pattern data that can be compared against others. This copying approach allows intermittent bugs to manifest in at least one of the copies, making them detectable through comparison without requiring repeated manual debugging sessions.

Inventive Principle:
Principle #26Copying

2Productivity

If multiple instances of code are executed in parallel to capture thread patterns, then bug detection efficiency is improved, but system resource consumption increases

Engineering Contradiction:
Improvedebugging productivityVSAvoidcomputational resource consumption
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The debugging process is segmented into distinct phases: execution phase where multiple instances run in parallel to generate thread patterns, and analysis phase where these patterns are compared to identify variances. This segmentation allows resource-intensive parallel execution to be performed only when needed for data collection, while the comparison phase can be performed more efficiently on the captured data.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system executes multiple instances of the code for debugging purposes, but these instances serve multiple functions: they not only generate thread pattern data for comparison but also naturally stress-test the system under various execution conditions. This multi-functionality justifies the resource consumption by extracting maximum debugging value from each executed instance.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If thread patterns from multiple instances are compared to identify variances, then intermittent bugs are detected more easily, but complexity of the debugging system increases

Engineering Contradiction:
Improvebug detection reliabilityVSAvoiddebugging system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system introduces thread patterns as an intermediary representation of code execution behavior. Instead of directly comparing raw execution traces or source code, the system compares standardized thread pattern data structures that capture the essential execution flow. This intermediary layer simplifies the comparison process while maintaining high reliability in detecting intermittent bugs.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system changes the parameters of comparison from direct code text or execution timing to thread pattern characteristics such as thread creation order, thread termination order, and thread execution sequences. By transforming the comparison parameters to these standardized metrics, the system achieves reliable bug detection while managing system complexity through consistent parameter sets.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11422920B2Debugging multiple instances of code using thread patterns
Publication Date: 2022.08.23 MICRO FOCUS LLC
  • US11422920B2 patent drawing
  • US11422920B2 patent drawing
  • US11422920B2 patent drawing

AI summary

This document describes debugging multiple instances of code by detecting a variance in thread patterns of threads of execution relative to the multiple instances of executing code. A first instance of the code is executed and a first thread pattern is identified indicative of a first plurality of threads of execution of the first instance of the code. A second instance of the code is executed, the second instance of the code beginning executing prior to the first instance of the code completing executing, and a second thread pattern is identified indicative of a second plurality of threads of execution of the second instance of the code. A comparative representation of the first thread pattern and the second thread pattern is generated relative to each other. A variance between the first thread pattern and the second thread pattern relative to the comparative representation is identified, the variance typically being indicative of a bug in the code.