United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6961186 Better VM handling of unexpected exceptions from application native code
JDK-6961186 : Better VM handling of unexpected exceptions from application native code

Details
Type:
Enhancement
Submit Date:
2010-06-15
Status:
Closed
Updated Date:
2012-10-01
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
windows_xp,windows
Sub-Component:
runtime
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs20 (b06)

Related Reports
Backport:
Backport:
Duplicate:
Relates:

Sub Tasks

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

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.
                                     
2010-12-20
EVALUATION

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



Hardware and Software, Engineered to Work Together