agebhar1 / jvmtop

Automatically exported from code.google.com/p/jvmtop
0 stars 0 forks source link

Crash when starting Glassfish whilst jvmtop is running #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start jvmtop
2. Start Glassfish

What is the expected output? What do you see instead?

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
17169 m.jvmtop.JvmTop   26m 1715m    9m  130m  0.21%  0.00% O7U21    phill   12
java.io.IOException: Unable to open socket file: target process not responding 
or HotSpot VM not loaded
    at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:341)
    at com.jvmtop.openjdk.tools.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:137)
    at com.jvmtop.openjdk.tools.ProxyClient.tryConnect(ProxyClient.java:367)
    at com.jvmtop.openjdk.tools.ProxyClient.connect(ProxyClient.java:349)
    at com.jvmtop.VMInfo.attachToVM(VMInfo.java:187)
    at com.jvmtop.VMInfo.processNewVM(VMInfo.java:146)
    at com.jvmtop.VMOverviewView.scanForNewVMs(VMOverviewView.java:132)
    at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:25)
    at com.jvmtop.JvmTop.run(JvmTop.java:70)
    at com.jvmtop.JvmTop.main(JvmTop.java:41)
Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open 
socket file: target process not responding or HotSpot VM not loaded
    at sun.tools.attach.BsdVirtualMachine.<init>(BsdVirtualMachine.java:90)
    at sun.tools.attach.BsdAttachProvider.attachVirtualMachine(BsdAttachProvider.java:63)
    at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
    at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:337)
    ... 9 more
java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy5.getHeapMemoryUsage(Unknown Source)
    at com.jvmtop.VMInfo.update(VMInfo.java:235)
    at com.jvmtop.VMOverviewView.updateVMs(VMOverviewView.java:110)
    at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:27)
    at com.jvmtop.JvmTop.run(JvmTop.java:70)
    at com.jvmtop.JvmTop.main(JvmTop.java:41)
Caused by: java.rmi.ConnectException: Connection refused to host: 
192.168.200.97; nested exception is:
    java.net.ConnectException: Connection refused
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
    at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttributes(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttributes(RMIConnector.java:926)
    at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.getCachedAttributes(ProxyClient.java:1053)
    at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.getAttribute(ProxyClient.java:1012)
    at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.invoke(ProxyClient.java:994)
    at com.sun.proxy.$Proxy0.getAttribute(Unknown Source)
    at com.sun.jmx.mbeanserver.MXBeanProxy$GetHandler.invoke(MXBeanProxy.java:122)
    at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
    at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:265)
    ... 6 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at java.net.Socket.<init>(Socket.java:425)
    at java.net.Socket.<init>(Socket.java:208)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
    ... 19 more
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy6.findDeadlockedThreads(Unknown Source)
    at com.jvmtop.VMInfo.hasDeadlockThreads(VMInfo.java:330)
    at com.jvmtop.VMOverviewView.printVM(VMOverviewView.java:85)
    at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:37)
    at com.jvmtop.JvmTop.run(JvmTop.java:70)
    at com.jvmtop.JvmTop.main(JvmTop.java:41)
Caused by: java.rmi.ConnectException: Connection refused to host: 
192.168.200.97; nested exception is:
    java.net.ConnectException: Connection refused
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
    at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:1017)
    at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.invoke(ProxyClient.java:1002)
    at com.sun.proxy.$Proxy0.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150)
    at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
    at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:265)
    ... 6 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at java.net.Socket.<init>(Socket.java:425)
    at java.net.Socket.<init>(Socket.java:208)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
    ... 20 more

What version of the product are you using? On what operating system?

0.5.0 Mac OS X

Original issue reported on code.google.com by gilberthuph@gmail.com on 26 May 2013 at 3:45

GoogleCodeExporter commented 9 years ago
1. Does the application 
- really crash?
- or just print out the exceptions once?
- or every second?
2. Are you running jvmtop with the same user (or root) as glassfish has been 
started?

Original comment by patric.r...@gmail.com on 27 May 2013 at 10:22

GoogleCodeExporter commented 9 years ago
1) Yes it really crashes, it prints the exception and exits.
2) I'm running jvmtop and Glassfish under the same non-root user.

Original comment by gilberthuph@gmail.com on 27 May 2013 at 6:49

GoogleCodeExporter commented 9 years ago
Ok, thanks for the clarification.

Which JDK are you using?

Original comment by patric.r...@gmail.com on 27 May 2013 at 7:12

GoogleCodeExporter commented 9 years ago
Mac OS X java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Original comment by gilberthuph@gmail.com on 28 May 2013 at 3:21

GoogleCodeExporter commented 9 years ago
Reproduced.

More generally, the shutdown of a previously monitored jvm is the root cause 
here.

Original comment by patric.r...@gmail.com on 29 May 2013 at 3:11

GoogleCodeExporter commented 9 years ago
Can you verify if jvmtop 0.5.1 will fix this problem?

Original comment by patric.r...@gmail.com on 29 May 2013 at 3:55

GoogleCodeExporter commented 9 years ago
jvmtop 0.5.1 does not exit but I still get an exception every second:

 JvmTop 0.5.1 alpha (expect bugs) x86_64,  8 cpus, Mac OS X 10.8.3
 http://code.google.com/p/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
25649 m.jvmtop.JvmTop   11m 1760m    9m  130m  0.53%  0.00% O7U21    phill   15
23268 ap.GradleDaemon  125m  910m   67m  304m  0.37%  0.00% O7U21    phill   11
25668 admin-cli.jar   [ERROR: Could not fetch telemetries (Process DEAD?)]
25671 ootstrap.ASMain [ERROR: Could not attach to VM]
java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy5.getHeapMemoryUsage(Unknown Source)
    at com.jvmtop.VMInfo.update(VMInfo.java:260)
    at com.jvmtop.VMOverviewView.updateVMs(VMOverviewView.java:117)
    at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:27)
    at com.jvmtop.JvmTop.run(JvmTop.java:70)
    at com.jvmtop.JvmTop.main(JvmTop.java:41)
Caused by: java.rmi.ConnectException: Connection refused to host: 
192.168.200.97; nested exception is:
    java.net.ConnectException: Connection refused
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
    at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttributes(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttributes(RMIConnector.java:926)
    at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.getCachedAttributes(ProxyClient.java:1053)
    at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.getAttribute(ProxyClient.java:1012)
    at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.invoke(ProxyClient.java:994)
    at com.sun.proxy.$Proxy0.getAttribute(Unknown Source)
    at com.sun.jmx.mbeanserver.MXBeanProxy$GetHandler.invoke(MXBeanProxy.java:122)
    at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
    at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:265)
    ... 6 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at java.net.Socket.<init>(Socket.java:425)
    at java.net.Socket.<init>(Socket.java:208)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
    ... 19 more

 JvmTop 0.5.1 alpha (expect bugs) x86_64,  8 cpus, Mac OS X 10.8.3
 http://code.google.com/p/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
25649 m.jvmtop.JvmTop   14m 1760m    9m  130m  0.86%  0.00% O7U21    phill   15
23268 ap.GradleDaemon  126m  910m   67m  304m  0.18%  0.00% O7U21    phill   11
25668 admin-cli.jar   [ERROR: Could not fetch telemetries (Process DEAD?)]
25671 ootstrap.ASMain [ERROR: Could not attach to VM]

Original comment by gilberthuph@gmail.com on 29 May 2013 at 7:38

GoogleCodeExporter commented 9 years ago
Ok, thanks for the update.
Release 0.6.0 should fix the remaining issue.

Please let me know if this is the case.

Original comment by patric.r...@gmail.com on 5 Jun 2013 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by patric.r...@gmail.com on 11 Jun 2013 at 6:41

GoogleCodeExporter commented 9 years ago

Original comment by patric.r...@gmail.com on 18 Jul 2013 at 1:55