JDK-6961186 : Better VM handling of unexpected exceptions from application native code
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows,windows_xp
  • CPU: generic,x86
  • Submitted: 2010-06-15
  • Updated: 2016-09-19
  • Resolved: 2011-04-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
As reported in this openjdk discussion:

http://mail.openjdk.java.net/pipermail/hotspot-dev/2010-June/003044.html

A C++ exception that escapes from application native code back into the VM can lead to failure modes that are unexpected, and undesirable, for the user:

Internal Error (os_windows_x86.cpp:114), pid=5024, tid=1848
guarantee(result == EXCEPTION_CONTINUE_EXECUTION) failed: Unexpected result
from topLevelExceptionFilter

We should see if the VM can handle this condition more gracefully.
CAP member is expecting the JRE to recover from native exceptions more gracefully.
Crashing is obviously bad but so is the fact that the crash error message is very
cryptic and does not help developers track the problem down to the source.
Our own testing folk have added their voice to this bug. It seems that when we run tests on Windows via a networked drive any of the remote reads can potentially raise an exception. When that happens we get the VM crash:

guarantee(result == EXCEPTION_CONTINUE_EXECUTION) failed: Unexpected result from topLevelExceptionFilter

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/1e637defdda6
22-12-2010

EVALUATION On Windows, compiler generates exception code 0xE06D7363 for uncaught C++ exception, so it can be fit under current exception handling mechanism. On Solaris/Linux, set_terminate should be able to trap uncaught C++ exception.
20-12-2010