JDK-8174995 : SA: clhsdb 'where -a' throws Assertion Failure with illegal code 236 when CDS is used
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-02-15
  • Updated: 2019-08-15
  • Resolved: 2018-05-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 11
11 b14Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
/home/jini/jdk10/hs/build/linux-x86_64-normal-server-slowdebug/images/jdk/bin/java  -Xshare:on -cp ~/tests/ HelloAndLoop
Hello -- and Loop
....after attaching using jhsdb

hsdb> where -a
Thread 3011 Address: 0x00007fdb502da000

Java Stack Trace for Service Thread
Thread state = BLOCKED

Thread 3010 Address: 0x00007fdb5023c800
sun.jvm.hotspot.utilities.AssertionFailure: illegal code 236
        at jdk.hotspot.agent/sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
        at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.Bytecodes.check(Bytecodes.java:338)
        at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.Bytecodes.javaCode(Bytecodes.java:380)
        at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.BytecodeStream.next(BytecodeStream.java:78)
        at jdk.hotspot.agent/sun.jvm.hotspot.oops.GenerateOopMap$RetTable.computeRetTable(GenerateOopMap.java:228)
        at jdk.hotspot.agent/sun.jvm.hotspot.oops.GenerateOopMap.computeMap(GenerateOopMap.java:2191)
        at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.OopMapForCacheEntry.computeMap(OopMapForCacheEntry.java:80)
        at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.OopMapCacheEntry.fill(OopMapCacheEntry.java:53)
        at jdk.hotspot.agent/sun.jvm.hotspot.oops.Method.getMaskFor(Method.java:261)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.InterpretedVFrame.getLocals(InterpretedVFrame.java:53)
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.genHTMLForJavaStackTrace(HTMLGenerator.java:1929)
        at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$44.doit(CommandProcessor.java:1577)
        at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1963)
        at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1933)
        at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1813)
        at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)
        at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)
        at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:191)
        at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:439)
Error: sun.jvm.hotspot.utilities.AssertionFailure: Failure occurred at bci 16 in method java.lang.ref.ReferenceQueue.remove(long)

Comments
Issue seen with 'printall' too
26-04-2018

SA has been unaware of the following new bytecodes introduced as a part of JDK-8074345. ===============snippet from src/hotspot/share/interpreter/bytecodes.hpp============= // These bytecodes are rewritten at CDS dump time, so that we can prevent them from being // rewritten at run time. This way, the ConstMethods can be placed in the CDS ReadOnly // section, and RewriteByteCodes/RewriteFrequentPairs can rewrite non-CDS bytecodes // at run time. // // Rewritten at CDS dump time to | Original bytecode // _invoke_virtual rewritten on sparc, will be disabled if UseSharedSpaces turned on. // ------------------------------+------------------ _nofast_getfield , // <- _getfield _nofast_putfield , // <- _putfield _nofast_aload_0 , // <- _aload_0 _nofast_iload , // <- _iload ===================================================================== Making SA aware of these new bytecodes fixes the issue.
22-03-2018