JDK-8039995 : Test serviceability/sa/jmap-hashcode/Test8028623.java fails on some Linux/Mac machines.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: hs25,7u75,8u20,8u25,8u31,8u60,9
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2014-04-11
  • Updated: 2016-12-19
  • Resolved: 2015-02-04
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 9Fixed
Related Reports
Relates :  
Description
Testsuite name: Regression / Hotspot
Test name: serviceability/sa/jmap-hashcode/Test8028623.java
JDK tested: JDK 8u20 b04
OS tested: Ubuntu 13.04 x64

This test fails since it was integrated in 8u20 b04. See JDK-8028623.
Not a regression.

LOG:

section:main
----------messages:(3/109)----------
command: main Test8028623
reason: User specified action: run main Test8028623 
elapsed time (seconds): 1.358
----------System.out:(30/1852)----------
1
stdout:
Attaching to process ID 24740, please wait...

stderr:
Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process
sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process
	at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerThread.execute(LinuxDebuggerLocal.java:163)
	at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.attach(LinuxDebuggerLocal.java:278)
	at sun.jvm.hotspot.HotSpotAgent.attachDebugger(HotSpotAgent.java:671)
	at sun.jvm.hotspot.HotSpotAgent.setupDebuggerLinux(HotSpotAgent.java:611)
	at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:337)
	at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
	at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
	at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
	at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
	at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:83)
	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:483)
	at sun.tools.jmap.JMap.runTool(JMap.java:201)
	at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process
	at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.attach0(Native Method)
	at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.access$100(LinuxDebuggerLocal.java:62)
	at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$1AttachTask.doit(LinuxDebuggerLocal.java:269)
	at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerThread.run(LinuxDebuggerLocal.java:138)


----------System.err:(21/1331)----------
java.lang.RuntimeException: jmap returns: 1
	at Test8028623.main(Test8028623.java:64)
	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:483)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:744)
java.lang.RuntimeException: Test failed with: java.lang.RuntimeException: jmap returns: 1
	at Test8028623.main(Test8028623.java:71)
	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:483)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test failed with: java.lang.RuntimeException: jmap returns: 1
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed with: java.lang.RuntimeException: jmap returns: 1
Comments
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: ...
08-05-2015

Closing this 8u40 entry as won't fix - is already fixed in 8u60.
04-02-2015

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope can solve permission issue on box.
26-05-2014

On Linux it is system-dependent whether attaching using jmap works. Standard linux permssion problem, e.g. on stt-83 in strace looks like: ptrace(PTRACE_ATTACH, 1157, 0, 0) = -1 EPERM (Operation not permitted) ..and that machine's /etc/sysctl.d/10-ptrace.conf file contains: kernel.yama.ptrace_scope = 1 ..meaning ptrace is disallowed. A machine where that is set to zero (permissive) will permit the attach. This is a reminder that jmap will just not work on various machines without specific configuration. The bug which this test checks is not architecture specific, so as long as we have other platforms that will accept jmap running, it seems OK to skip the test when jmap fails.
12-05-2014