Enhanced Memory Error Messages for Java VMs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Java-based systems face challenges in detecting and troubleshooting memory leaks, which can lead to Out Of Memory Errors (OOME), especially in long-running applications, due to limited capabilities of existing profiling tools that require system restarts and manual analysis of extensive code data.

Innovation Solution

A system and method that generate enhanced memory error messages by collecting and associating garbage collection statistics and class statistics with conventional memory error messages, providing detailed information to identify the root cause of memory errors without restarting the virtual machine, thus facilitating quicker diagnosis and prevention of memory leaks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Difficulty of detecting and measuring

If conventional profiling tools are used to detect memory leaks, then memory leak detection capability is improved, but system reliability deteriorates due to required VM restarts and increased system overhead

Engineering Contradiction:
Improvememory leak detection capabilityVSAvoidsystem reliability
Core Design Contradiction:
Difficulty of detecting and measuringVSReliability

Solution Approach 1:

The system performs preliminary actions by collecting and storing garbage collection statistics and class statistics in advance during normal VM operation. When a memory error occurs, these pre-collected statistics are immediately available for analysis without requiring VM restarts, thus maintaining system reliability while enabling effective memory leak detection.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If profiling tools require VM restarts to provide memory analysis, then measurement precision is improved, but loss of time increases due to production downtime

Engineering Contradiction:
Improvememory analysis precisionVSAvoidproduction downtime
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system collects and stores garbage collection statistics and class statistics during normal operation before memory errors occur. When errors happen, the pre-collected data provides precise memory analysis immediately, eliminating the need for VM restarts and associated production downtime.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates copies of memory usage information through garbage collection statistics and class statistics that are stored during normal operation. These copies can be analyzed without affecting the running VM, enabling precise memory analysis while avoiding production downtime associated with actual VM restarts.

Inventive Principle:
Principle #26Copying

3Measurement precision

If detailed memory analysis is performed manually, then measurement precision is improved, but loss of time increases due to extensive code evaluation requirements

Engineering Contradiction:
Improvememory error analysis precisionVSAvoidmanual code evaluation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system extracts critical memory usage information from the complex VM state by collecting and storing garbage collection statistics and class statistics. This extraction provides precise memory error analysis data without requiring manual evaluation of extensive code, significantly reducing analysis time while maintaining precision.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system introduces garbage collection statistics and class statistics as intermediary data structures that mediate between the complex VM memory state and the analyst. These intermediaries contain distilled, actionable memory information that enables precise analysis without manual code evaluation, reducing time loss while maintaining measurement precision.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Measurement precision

If profiling tools are used to monitor memory allocation, then measurement precision is improved, but device complexity increases due to additional memory consumption and CPU overhead

Engineering Contradiction:
Improvememory allocation monitoring precisionVSAvoidsystem overhead
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system uses the VM's own garbage collection mechanism to collect and store memory statistics during normal operation. The GC process itself serves the dual purpose of memory management and data collection, eliminating the need for separate profiling tools and their associated overhead, thus improving measurement precision without significantly increasing device complexity.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7725771B2Method and system for providing enhanced memory error messages
Publication Date: 2010.05.25 SAP SE
  • US7725771B2 patent drawing
  • US7725771B2 patent drawing
  • US7725771B2 patent drawing

AI summary

A system and method are provided to provide an enhanced memory error message. In one embodiment, a first message is associated to a memory error occurring at a virtual machine, the first message indicating the memory error has occurred. A second message is associated to the memory error when the memory error has occurred, the second message explaining the memory error. The memory error having the first message and the second message is thrown.