Thread-Level Debugging in Virtual Machines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging software in a virtual machine is resource-intensive and inefficient due to the need to start or restart the VM, which can make it difficult to reproduce bugs, especially those caused by race conditions, as the debugging environment differs from the productive environment.

Innovation Solution

A system and method that allows debugging a thread within a virtual machine without affecting other threads by using a debugging switch framework to switch between productive and debugging interpreter loops on a thread-by-thread basis, using a debugging API and interface to control the debugging process, and employing a thread event filter to limit commands to only those affecting the specific thread being debugged.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a new VM is started or existing VM is restarted to provide debugging environment, then debugging tools and capabilities are available, but resource consumption increases and bug reproduction becomes difficult

Engineering Contradiction:
Improvedebugging capabilityVSAvoidexecution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the debugging functionality from the productive execution environment by introducing a debugger thread that operates independently within the same VM. This allows the productive threads to continue executing efficiently while the debugger thread provides debugging capabilities, eliminating the need to restart the VM for debugging.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a debugger thread as an intermediary component that mediates between the debugging tools and the productive threads. This debugger thread intercepts and controls the execution of productive threads, enabling debugging without affecting the overall VM execution efficiency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If VM is restarted for debugging, then debugging environment is established, but bug reproduction becomes impossible due to environment differences

Engineering Contradiction:
Improvedebugging environmentVSAvoidbug reproduction capability
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies preliminary action by establishing the debugging thread within the productive VM environment before any debugging operations begin. This ensures that the debugging environment is already in place and identical to the productive environment, allowing bugs to be reproduced and detected without environment-induced differences.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If debugging interpreter loop is applied to all threads, then comprehensive debugging is available, but administrative overhead increases and other threads are affected

Engineering Contradiction:
Improvedebugging coverageVSAvoidadministrative overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies local quality by enabling debugging functionality selectively for specific threads rather than applying it globally to all threads. The debugger thread can target individual productive threads for debugging while leaving other threads to execute under the productive interpreter loop, thereby reducing administrative overhead and isolating debugging effects to only the necessary threads.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS7617487B2Method and system for debugging individual threads in a productive environment
Publication Date: 2009.11.10 SAP SE
  • US7617487B2 patent drawing
  • US7617487B2 patent drawing
  • US7617487B2 patent drawing

AI summary

A system and method to debug a thread without affecting other threads in a virtual machine. A virtual machine (VM) may execute a thread subject to debugging and another thread. An interface to the VM permits only debugging command that are specific to the thread subject to debugging to affect the VM.