Multi-threaded Application Testing via Thread Hierarchy Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Multi-threaded applications face challenges in debugging due to nondeterministic execution, leading to complex race conditions and errors that are difficult to identify and trace, especially since these errors may not be triggered during standard testing conditions and can arise from threads sharing memory access.

Innovation Solution

A method for testing multi-threaded applications involves running an initial test in debug mode to determine the thread hierarchy, modifying thread execution configurations to simulate various execution scenarios, and running a second test to detect potential errors, using tools to collect and analyze thread data and create error reports that highlight the interplay between threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If multi-threaded applications execute concurrently to improve performance and responsiveness, then productivity and application responsiveness are improved, but the execution becomes nondeterministic introducing complexity and difficult-to-debug defects

Engineering Contradiction:
Improveapplication performanceVSAvoidprogramming complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by establishing a deterministic thread execution model before actual application execution. The system pre-defines thread execution orders and uses this predetermined structure to guide concurrent execution, thereby maintaining performance benefits while eliminating the nondeterministic complexity that makes debugging difficult.

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If standard testing is performed on multi-threaded applications, then testing time is reduced, but errors related to thread interactions and race conditions are not triggered or detected

Engineering Contradiction:
Improvetesting timeVSAvoiderror detection capability
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The patent applies dynamics by creating a testing system that can dynamically adjust thread execution configurations. The system modifies thread execution orders, timing, and synchronization points during testing to deliberately create race conditions and interaction scenarios that would not occur under standard deterministic execution, thereby improving error detection without excessive time cost.

Inventive Principle:
Principle #15Dynamics

3Reliability

If thread execution is modified to simulate various scenarios for thorough testing, then error detection capability is improved, but device complexity and testing complexity increase

Engineering Contradiction:
Improveerror detection capabilityVSAvoidtesting system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary testing framework that sits between the application code and the execution environment. This intermediary layer automatically manages the complexity of simulating various thread execution scenarios by providing abstractions for thread creation, execution order control, and synchronization manipulation, thereby improving error detection capability while shielding developers from the underlying testing system complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Ease of operation

If detailed thread data collection and analysis tools are used to create error reports, then ease of debugging is improved, but use of energy and processing resources increase

Engineering Contradiction:
Improvedebugging easeVSAvoidprocessing resources
Core Design Contradiction:
Ease of operationVSUse of energy by moving object

Solution Approach 1:

The patent applies the extraction principle by separating detailed thread data collection and analysis functions into a dedicated debugging module. This module extracts only the necessary thread execution data required for error analysis and generates focused error reports, thereby improving debugging ease while minimizing the processing resources consumed by avoiding unnecessary data collection and analysis.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10725889B2Testing multi-threaded applications
Publication Date: 2020.07.28 MICRO FOCUS LLC
  • US10725889B2 patent drawing
  • US10725889B2 patent drawing
  • US10725889B2 patent drawing

AI summary

In one example, a method for testing a multi-threaded application includes running an initial test of the multi-threaded application and collecting thread generation data and determining the thread hierarchy. The thread execution is then modified to produce a modified configuration and a second test is run with the modified configuration. A device for testing of multi-threaded applications is also provided.