United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6950927 Testcase failure sun/management/jmxremote/bootstrap/JvmstatCountersTest.java
JDK-6950927 : Testcase failure sun/management/jmxremote/bootstrap/JvmstatCountersTest.java

Details
Type:
Bug
Submit Date:
2010-05-08
Status:
Resolved
Updated Date:
2010-06-30
Project Name:
JDK
Resolved Date:
2010-06-30
Component:
core-svc
OS:
generic
Sub-Component:
tools
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
The testcase  sun/management/jmxremote/bootstrap/JvmstatCountersTest.java has started to fail on all linux and solaris platforms.

Linux is a little different, Solaris looks like it might be a bit different.

--------------------------------------------------
TEST: sun/management/jmxremote/bootstrap/JvmstatCountersTest.java
JDK under test: (/tmp/jprt/T1/T/172836.ohair/testproduct/linux_i586_2.6-product)
java version "1.7.0-201005081728.ohair.jdk"
Java(TM) SE Runtime Environment (build 1.7.0-201005081728.ohair.jdk-jprtadm_2010_05_08_11_16-b00)
Java HotSpot(TM) Server VM (build 18.0-b04, mixed mode)

ACTION: clean -- Passed. Clean successful
REASON: User specified action: run clean JvmstatCountersTest 
TIME:   0.0 seconds
messages:
command: clean JvmstatCountersTest
reason: User specified action: run clean JvmstatCountersTest 
elapsed time (seconds): 0.0

ACTION: build -- Passed. Build successful
REASON: User specified action: run build JvmstatCountersTest 
TIME:   0.751 seconds
messages:
command: build JvmstatCountersTest
reason: User specified action: run build JvmstatCountersTest 
elapsed time (seconds): 0.751

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.749 seconds
messages:
command: compile /tmp/jprt/T1/T/172836.ohair/source/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.749
STDOUT:
STDERR:
/tmp/jprt/T1/T/172836.ohair/source/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java:44: warning: ConnectorAddressLink is Sun proprietary API and may be removed in a future release
import sun.management.ConnectorAddressLink;
                     ^
/tmp/jprt/T1/T/172836.ohair/source/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java:75: warning: ConnectorAddressLink is Sun proprietary API and may be removed in a future release
        String localAddress = ConnectorAddressLink.importFrom(0);
                              ^
/tmp/jprt/T1/T/172836.ohair/source/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java:76: warning: ConnectorAddressLink is Sun proprietary API and may be removed in a future release
        Map<String, String> remoteData = ConnectorAddressLink.importRemoteFrom(0);
                                         ^
/tmp/jprt/T1/T/172836.ohair/source/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java:150: warning: ConnectorAddressLink is Sun proprietary API and may be removed in a future release
                String localAddress2 = ConnectorAddressLink.importFrom(0);
                                       ^
/tmp/jprt/T1/T/172836.ohair/source/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java:157: warning: ConnectorAddressLink is Sun proprietary API and may be removed in a future release
                Map<String, String> remoteData2 = ConnectorAddressLink.importRemoteFrom(0);
                                                  ^
5 warnings

ACTION: build -- Passed. All files up to date
REASON: Named class compiled on demand
TIME:   0.0 seconds
messages:
command: build JvmstatCountersTest
reason: Named class compiled on demand
elapsed time (seconds): 0.0

ACTION: main -- Passed. Execution successful
REASON: User specified action: run main/othervm JvmstatCountersTest 1 
TIME:   0.152 seconds
messages:
command: main JvmstatCountersTest1
reason: User specified action: run main/othervm JvmstatCountersTest 1 
elapsed time (seconds): 0.152
STDOUT:
Test PASSED! The OOTB management agent didn't publish any jvmstat counter.
Bye! Bye!
STDERR:
STATUS:Passed.

ACTION: build -- Passed. All files up to date
REASON: Named class compiled on demand
TIME:   0.0 seconds
messages:
command: build JvmstatCountersTest
reason: Named class compiled on demand
elapsed time (seconds): 0.0

ACTION: main -- Passed. Execution successful
REASON: User specified action: run main/othervm -Dcom.sun.management.jmxremote JvmstatCountersTest 2 
TIME:   0.666 seconds
messages:
command: main  -Dcom.sun.management.jmxremoteJvmstatCountersTest2
reason: User specified action: run main/othervm -Dcom.sun.management.jmxremote JvmstatCountersTest 2 
elapsed time (seconds): 0.666
STDOUT:
Address = service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc2AAtVbmljYXN0UmVmMgAACzEwLjUuMjA2LjMyAADdCbJ6NPQbOuNKWCn57AAAASh5QTAXgAEAeA==
MBean Count = 21
Test PASSED! The OOTB management agent only publishes the local connector through a jvmstat counter.
Bye! Bye!
STDERR:
STATUS:Passed.

ACTION: build -- Passed. All files up to date
REASON: Named class compiled on demand
TIME:   0.0 seconds
messages:
command: build JvmstatCountersTest
reason: Named class compiled on demand
elapsed time (seconds): 0.0

ACTION: main -- Passed. Execution successful
REASON: User specified action: run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3 
TIME:   0.727 seconds
messages:
command: main  -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=falseJvmstatCountersTest3
reason: User specified action: run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3 
elapsed time (seconds): 0.727
STDOUT:
Address = service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc2AAtVbmljYXN0UmVmMgAACzEwLjUuMjA2LjMyAACocS+xlv4nYIJ1L1/1jwAAASh5QTLdgAIAeA==
MBean Count = 21
Address = service:jmx:rmi:///jndi/rmi://prt-x2200-2:58795/jmxrmi
MBean Count = 21
OK: sun.management.JMXConnectorServer.0.remoteAddress=service:jmx:rmi:///jndi/rmi://prt-x2200-2:58795/jmxrmi
OK: sun.management.JMXConnectorServer.0.authenticate=false
OK: sun.management.JMXConnectorServer.0.ssl=false
OK: sun.management.JMXConnectorServer.0.sslRegistry=false
OK: sun.management.JMXConnectorServer.0.sslNeedClientAuth=false
Test PASSED! The OOTB management agent publishes both the local and remote connector info through jvmstat counters.
Bye! Bye!
STDERR:
STATUS:Passed.

ACTION: build -- Passed. All files up to date
REASON: Named class compiled on demand
TIME:   0.0 seconds
messages:
command: build JvmstatCountersTest
reason: Named class compiled on demand
elapsed time (seconds): 0.0

ACTION: main -- Failed. Execution failed: `main' threw exception: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
REASON: User specified action: run main/othervm JvmstatCountersTest 4 
TIME:   5.4 seconds
messages:
command: main JvmstatCountersTest4
reason: User specified action: run main/othervm JvmstatCountersTest 4 
elapsed time (seconds): 5.4
STDOUT:
name = 5876@prt-x2200-2
vmid = 5876
STDERR:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
	at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:100)
	at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
	at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
	at JvmstatCountersTest.main(JvmstatCountersTest.java:145)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)

JavaTest Message: Test threw exception: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded

TEST RESULT: Failed. Execution failed: `main' threw exception: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
--------------------------------------------------

                                    

Comments
EVALUATION

This may have something to do with the hotspot change:

http://hg.openjdk.java.net/jdk7/jdk7/hotspot/rev/a2ea687fdc7c

The test only fails when you override java.io.tmpdir, which JPRT does all the time, e.g.
-Djava.io.tmpdir=/tmp/jprt/T1/T/233717.ss145989/io

Windows works, but Solaris and Linux do not.

Some of the changes in http://hg.openjdk.java.net/jdk7/jdk7/hotspot/rev/a2ea687fdc7c
seem to create a length limitation on java.io.tmpdir, that could be an issue, although just using -Djava.io.tmpdir=/tmp/y seems to cause the test to fail.
                                     
2010-05-14
EVALUATION

/tmp is hardcoded in the sun.tools.attach.SolarisVirtualMachine.openDoor and sun.tools.attach.LinuxVirtualMachine.findSocketFile method.  Looks like it also fails to open /proc/<pid>/.java_pid<pid> file before attempting the /tmp path.
                                     
2010-05-14
EVALUATION

There was a follow on changeset to a2ea687fdc7c:

> Changeset: 96d554193f72
> Author:    coleenp
> Date:      2010-04-19 18:58 -0400
> URL:       http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/96d554193f72
> 
> 6944822: Fix for 6938627 exposes problem with hard-coded buffer sizes
> Summary: Make tmpdir buffer sizes MAX_PATH+1
> Reviewed-by: dholmes, coleenp
> Contributed-by: ###@###.###
> 
> ! src/os/linux/vm/attachListener_linux.cpp
> ! src/os/linux/vm/os_linux.cpp
> ! src/os/solaris/vm/attachListener_solaris.cpp


I pushed the follow on changeset to HotSpot's Main_Baseline on 2010.05.11.

The follow on change is included in the HSX-19-B01 snapshot that
was just submitted for PIT and is targeted for JDK7-B94.
                                     
2010-05-14



Hardware and Software, Engineered to Work Together