JDK-8044416 : serviceability/sa/jmap-hashcode/Test8028623.java fails with AssertionFailure: can not get class data for java/lang/UNIXProcess$Platform$$Lambda
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 8u40,8u65,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-05-30
  • Updated: 2016-12-12
  • Resolved: 2015-04-10
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
8u60Fixed 9 b64Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Sub Tasks
JDK-8044540 :  
Description
Test fails in Main baseline on all platforms with:

Attaching to process ID 9073, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.9.0-internal-201405231729.jcoomes.jdk9-hs-2014-05-23--fastdebug
Dumping heap to heap.out ...

stderr:
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:484)
	at sun.tools.jmap.JMap.runTool(JMap.java:201)
	at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: sun.jvm.hotspot.utilities.AssertionFailure: can not get class data for java/lang/UNIXProcess$Platform$$Lambda$10x00000007c0074430
	at sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
	at sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeInstance(HeapHprofBinWriter.java:803)
	at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter$1.doObj(AbstractHeapGraphWriter.java:95)
	at sun.jvm.hotspot.oops.ObjectHeap.iterateLiveRegions(ObjectHeap.java:353)
	at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:171)
	at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
	at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:433)
	at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:62)
	at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
	at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
	at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
	at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:83)
	... 6 more



RULE serviceability/sa/jmap-hashcode/Test8028623.java Exception sun.jvm.hotspot.utilities.AssertionFailure: can not get class data for java/lang/UNIXProcess$Platform$$Lambda$1...
Comments
Lambda object is not counted when SA builds class data cache iterating over system dictionary, but it's reached inside live region when SA writes an actual dump.
09-04-2015

Please file a different bug for problems when running without -F.
25-03-2015

Running with or without -F is two completely different code-paths. With -F we use the Serviceability Agent (which is really a standalone native debugger), without -F we use the attach API to execute code in the running the JVM. In JDK 9, -F will be removed and that functionality will be moved to a different launcher. This bug is about the -F functionality and the lack of lambda support in Serviceability Agent.
25-03-2015

as part of working on 8073756 I figured few things: if your code has no lambdas then jmap -F works fine, but it's enough to have one lambda (a simple hello world with one lambda) to cause this exception. not using -F causes another issue oftenly (but not always) - inability to connect to java process, the workaround for this is: use flag -XX:+StartAttachListener in target java process and make sure you run jmap within the same user as main java process Since -F is workaround, can this exception be ever considered as a bug? to fix this bug, remove -F flag from jmap option and add -XX:+StartAttachListener to startup options of the test
25-03-2015

Test got broken after 8000975: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/27e0909d3fa0 the fix was integrated into 8u40, doesn't seem to be connected to https://bugs.openjdk.java.net/browse/JDK-8073756 which happen since 8u20.
05-03-2015

Hi, can you please downport https://bugs.openjdk.java.net/browse/JDK-8044540 which is a fix for this problem, to 8u-dev as well. Thanks, Volker
06-02-2015

Yes, I was referring to the test quarantine. We do regular jtreg tests for jdk8u and get ugly "red traffic lights" because of this issue.
06-02-2015

Volker: do you want this issue backported to 8u? The "fix" you refer to is just a test quarantine.
06-02-2015

At least one external user is experiencing the related failure: https://twitter.com/a_abashev/status/554403325123493889 Please consider bumping the priority for this one.
11-01-2015

OK I did reproduce this, tests were: Solaris on x64: 9 b40 fail 9 b14 fail 9 b13 PASS 9 b12 PASS 9 b10 PASS 9 b05 PASS
03-12-2014

Hi, I can't reproduce this failure, e.g., Solaris x86 with jdk 9 promoted builds b14,b15 (picking some from around the time of this being reported above), or b40. The aurora links aren't working for me either, maybe the results are gone. Is it still an issue?
26-11-2014

Added rules for product RULE serviceability/sa/jmap-hashcode/Test8028623.java Exception java.lang.RuntimeException: Test failed with: java.lang.RuntimeException: jmap returns: ... RULE serviceability/sa/jmap-hashcode/Test8028623.java Exception java.lang.RuntimeException: jmap returns: ... RULE serviceability/sa/jmap-hashcode/Test8028623.java Exception java.lang.reflect.InvocationTargetException RULE serviceability/sa/jmap-hashcode/Test8028623.java Exception sun.jvm.hotspot.utilities.AssertionFailure: can not get class data for java/lang/UNIXProcess$$Lambda$7...
01-07-2014