JDK-6303999 : improve stack trace handling for OutOfMemoryError
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2005-07-29
  • Updated: 2017-02-06
  • Resolved: 2017-02-06
Related Reports
Relates :  
Relates :  
Description
4753347 added some limited support for a stack trace at java.lang.OutOfMemory time. A small pool of exceptions is preallocated at startup time and consumed when OOME is thrown. Currently this pool is not replenished so once all preallocated exceptions are used up then subsequent OOMEs are thrown without a stack trace. This bug is submitted to revisit this area with a view to adding a scheme to replenish the pool. If a full GC makes progress then it may be possible to allocate an exception and the arrays needed for the stack trace. Another suggestion is to separate the exception from the backtrace - that way the first few OOMEs will be thrown with the complete stack trace (the current implementation limits the number of frames to 32).