JDK-8034860 : Fatal error due to incorrect thread state during nightly testing
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-02-13
  • Updated: 2014-07-29
  • Resolved: 2014-02-14
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 8 JDK 9
8u20Fixed 9 b04Fixed
Description
A large number of RT_Baseline 2/12/14 tests are failing with the following assertion:

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/interfaceSupport.hpp:198
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/XXXX/src/share/vm/runtime/interfaceSupport.hpp:198), pid=23963, tid=3707763568
#  assert(thread->thread_state() == _thread_in_native) failed: coming from wrong thread state
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b129) (build 1.8.0-fastdebug-b129)
# Java VM: Java HotSpot(TM) Client VM (25.0-b62-internal-201402122153.dsamerso.hotspot-fastdebug compiled mode linux-x86 )

Comments
The problem is that the env->ExpectionCheck() is being called from a vm thread and triggers the following assert in trasition_from_native(): assert(thread->thread_state() == _thread_in_native, "coming from wrong thread state"); A fix is to use the HAS_PENDING_EXCEPTION and CLEAR_PENDING_EXCEPTION macros. webrev: http://cr.openjdk.java.net/~ccheung/8034860/webrev/
14-02-2014