Stuck in "Computing description..."
I just downloaded the Mac OS X Application Bundle and started the application. However, it is stuck in "Computing description". Do you know what the problem might be?
This can happen if there is another java application, which were started when your computer had different IP address (for example you were connected via WiFi started Java app and now you switched to ethernet and started VisualVM).
I've had this happen also and I can confirm that switching IP addresses is definitively an issue. I captured a stack trace to sort out what maybe the issue. Still working to sort out why OSX is not responding.
"DataSource Event Queue" #32 daemon prio=1 os_prio=31 tid=0x00007fa6200bd000 nid=0x19b17 runnable [0x00007000041fa000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketConnect(java.base@10/Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(java.base@10/AbstractPlainSocketImpl.java:400)
- locked <0x00000007b17dc2a0> (a java.net.SocksSocketImpl)
at java.net.AbstractPlainSocketImpl.connectToAddress(java.base@10/AbstractPlainSocketImpl.java:243)
at java.net.AbstractPlainSocketImpl.connect(java.base@10/AbstractPlainSocketImpl.java:225)
at java.net.SocksSocketImpl.connect(java.base@10/SocksSocketImpl.java:402)
at java.net.Socket.connect(java.base@10/Socket.java:591)
at java.net.Socket.connect(java.base@10/Socket.java:540)
at java.net.Socket.(java.base@10/Socket.java:436)
at java.net.Socket.(java.base@10/Socket.java:213)
at sun.rmi.transport.tcp.TCPDirectSocketFactory.createSocket(java.rmi@10/TCPDirectSocketFactory.java:40)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(java.rmi@10/TCPEndpoint.java:613)
at sun.rmi.transport.tcp.TCPChannel.createConnection(java.rmi@10/TCPChannel.java:209)
at sun.rmi.transport.tcp.TCPChannel.newConnection(java.rmi@10/TCPChannel.java:196)
at sun.rmi.server.UnicastRef.invoke(java.rmi@10/UnicastRef.java:129)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(java.rmi@10/RemoteObjectInvocationHandler.java:209)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(java.rmi@10/RemoteObjectInvocationHandler.java:161)
at com.sun.proxy.$Proxy17.newClient(Unknown Source)
at javax.management.remote.rmi.RMIConnector.getConnection(java.management.rmi@10/RMIConnector.java:2105)
at javax.management.remote.rmi.RMIConnector.connect(java.management.rmi@10/RMIConnector.java:321)
- locked <0x00000007b0e1a150> (a javax.management.remote.rmi.RMIConnector)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl$ProxyClient.tryConnect(JmxModelImpl.java:568)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl$ProxyClient.connect(JmxModelImpl.java:507)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl.connect(JmxModelImpl.java:235)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl.(JmxModelImpl.java:205)
at com.sun.tools.visualvm.jmx.impl.JmxModelProvider.createModelFor(JmxModelProvider.java:64)
at com.sun.tools.visualvm.jmx.impl.JmxModelProvider.createModelFor(JmxModelProvider.java:41)
at com.sun.tools.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:111)
- locked <0x00000007b0c08498> (a com.sun.tools.visualvm.jvmstat.application.JvmstatApplication)
at com.sun.tools.visualvm.tools.jmx.JmxModelFactory.getJmxModelFor(JmxModelFactory.java:69)
at com.sun.tools.visualvm.jvm.JmxSupport.getJvmMXBeans(JmxSupport.java:157)
- locked <0x00000007b0bff1f0> (a com.sun.tools.visualvm.jvm.JmxSupport)
at com.sun.tools.visualvm.jvm.JmxSupport.getRuntime(JmxSupport.java:90)
at com.sun.tools.visualvm.jvm.JmxSupport.getJvmArgs(JmxSupport.java:177)
at com.sun.tools.visualvm.jvm.JVMImpl.getJvmArgsJvmstat(JVMImpl.java:537)
at com.sun.tools.visualvm.jvm.JVMImpl.initStaticData(JVMImpl.java:508)
- locked <0x00000007b0bff2a0> (a java.lang.Object)
at com.sun.tools.visualvm.jvm.JVMImpl.getMainClass(JVMImpl.java:139)
at com.sun.tools.visualvm.application.type.MainClassApplicationTypeFactory.createModelFor(MainClassApplicationTypeFactory.java:148)
at com.sun.tools.visualvm.application.type.MainClassApplicationTypeFactory.createModelFor(MainClassApplicationTypeFactory.java:42)
at com.sun.tools.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:111)
- locked <0x00000007b0c08498> (a com.sun.tools.visualvm.jvmstat.application.JvmstatApplication)
at com.sun.tools.visualvm.application.type.ApplicationTypeFactory.getApplicationTypeFor(ApplicationTypeFactory.java:74)
at net.java.visualvm.modules.glassfish.datasource.GlassFishModelProvider.processNewApplication(GlassFishModelProvider.java:93)
at net.java.visualvm.modules.glassfish.datasource.GlassFishModelProvider.dataChanged(GlassFishModelProvider.java:69)
at com.sun.tools.visualvm.core.datasource.DataSourceProvider.fireDataChanged(DataSourceProvider.java:263)
at com.sun.tools.visualvm.core.datasource.DataSourceProvider.fireDataChanged(DataSourceProvider.java:249)
at com.sun.tools.visualvm.core.datasource.DataSourceProvider.fireDataAdded(DataSourceProvider.java:240)
at com.sun.tools.visualvm.core.datasource.DataSourceProvider.registerDataSourcesImpl(DataSourceProvider.java:190)
at com.sun.tools.visualvm.core.datasource.DataSourceRepository.registerDataSourcesImpl(DataSourceRepository.java:57)
at com.sun.tools.visualvm.core.datasource.DataSourceProvider$5.run(DataSourceProvider.java:183)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
These settings in /etc/hosts seem to help resolve the issue
127.0.0.1 localhost box.local
255.255.255.255 broadcasthost
::1 localhost box.local
fe80::1%1lo0 localhost box.local
I will try those and let you know if the problem is fixed.
Didn't work for me.. are there any other alternatives? logs to check? how can I tackle this issue?
IMHO this has definitely something to do with a timeout. Once I let it sit for a while (3min or so, I will measure this) it get's to the point where I can use it again. I'm now on a completely fresh install of OS X on a new macbook so I would exclude any /etc/hosts
or other configuration steps to be the culprit.
This can happen if you run Sophos AV as well. It seems that it does not properly respond to RMI and VisualVM hangs.
To find the process VisualVM attempts to contact you can do the following:
lsof -p $(ps auxww | awk '$0 !~ /awk/ && $0 ~ /java.*VisualVM.app/ {print $2}') | awk -F "/" '/hsperf/ {print $NF}'
This will give you a list of PIDs that it attempts to attach to.
I never found anything relevant in Library/Application Support/VisualVM/1.4/var/log/messages
- but there might some debug option to turn on in /Applications/VisualVM.app/Contents/Resources/visualvm/etc/visualvm.conf
.
Using lsof
helped me to pinpoint the problem JVM.
I am not running Sophos AV.
I am not running Sophos AV.
Did lsof
give you any hints? The point is that there is (likely) a java process that isn't responding properly.
I'm getting the same "computing description" issue. This Exception is in my log:
ava.io.IOException: Can not attach to current VM
at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.(HotSpotVirtualMachine.java:75)
at jdk.attach/sun.tools.attach.VirtualMachineImpl.(VirtualMachineImpl.java:60)
at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:58)
at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)
at com.sun.tools.visualvm.attach.AttachModelImpl.getVirtualMachine(AttachModelImpl.java:124)
Caused: java.io.IOException: Can not attach to current VM
at com.sun.tools.visualvm.attach.AttachModelImpl.getVirtualMachine(AttachModelImpl.java:126)
[catch] at com.sun.tools.visualvm.attach.AttachModelImpl.printFlag(AttachModelImpl.java:89)
at com.sun.tools.visualvm.jvm.JVMImpl.isDumpOnOOMEnabled(JVMImpl.java:257)
at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.updateState(HeapDumpOnOOMEAction.java:83)
at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.isEnabled(HeapDumpOnOOMEAction.java:77)
at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.isEnabled(HeapDumpOnOOMEAction.java:46)
at com.sun.tools.visualvm.core.ui.actions.SingleDataSourceAction.updateState(SingleDataSourceAction.java:77)
at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.updateState(HeapDumpOnOOMEAction.java:98)
at com.sun.tools.visualvm.core.ui.actions.DataSourceAction.initialize(DataSourceAction.java:90)
at com.sun.tools.visualvm.core.ui.actions.DataSourceAction.doInitialize(DataSourceAction.java:122)
at com.sun.tools.visualvm.core.ui.actions.DataSourceAction.isEnabled(DataSourceAction.java:99)
at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getActions(ExplorerContextMenuFactory.java:171)
at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getSelectionActions(ExplorerContextMenuFactory.java:127)
at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getActions(ExplorerContextMenuFactory.java:121)
at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getDefaultActionFor(ExplorerContextMenuFactory.java:113)
at com.sun.tools.visualvm.core.explorer.ExplorerComponent.getDefaultAction(ExplorerComponent.java:194)
at com.sun.tools.visualvm.core.explorer.ExplorerComponent.access$100(ExplorerComponent.java:68)
at com.sun.tools.visualvm.core.explorer.ExplorerComponent$1.processMouseEvent(ExplorerComponent.java:108)
at java.desktop/java.awt.Component.processEvent(Component.java:6354)
at java.desktop/java.awt.Container.processEvent(Container.java:2261)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4966)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2319)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4798)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4914)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4540)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4484)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2305)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4798)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
INFO [com.sun.tools.visualvm.attach.AttachModelImpl]: getSystemProperties
java.io.IOException: Can not attach to current VM
at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.(HotSpotVirtualMachine.java:75)
at jdk.attach/sun.tools.attach.VirtualMachineImpl.(VirtualMachineImpl.java:60)
at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:58)
at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)
at com.sun.tools.visualvm.attach.AttachModelImpl.getVirtualMachine(AttachModelImpl.java:124)
Caused: java.io.IOException: Can not attach to current VM
at com.sun.tools.visualvm.attach.AttachModelImpl.getVirtualMachine(AttachModelImpl.java:126)
[catch] at com.sun.tools.visualvm.attach.AttachModelImpl.getSystemProperties(AttachModelImpl.java:56)
at com.sun.tools.visualvm.jvm.JVMImpl.getSystemProperties(JVMImpl.java:341)
at com.sun.tools.visualvm.application.views.overview.ApplicationOverviewModel.initialize(ApplicationOverviewModel.java:229)
at com.sun.tools.visualvm.application.views.overview.ApplicationOverviewModel.initialize(ApplicationOverviewModel.java:135)
at com.sun.tools.visualvm.application.views.overview.ApplicationOverviewView.willBeAdded(ApplicationOverviewView.java:56)
at com.sun.tools.visualvm.core.ui.DataSourceView.viewWillBeAdded(DataSourceView.java:192)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.addViews(DataSourceWindowManager.java:282)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.openWindowAndAddView(DataSourceWindowManager.java:207)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.access$000(DataSourceWindowManager.java:50)
at com.sun.tools.visualvm.core.ui.DataSourceWindowManager$2.run(DataSourceWindowManager.java:117)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
I am not running Sophos AV.
Did lsof
give you any hints? The point is that there is (likely) a java process that isn't responding properly.
What type of hints should I be looking for?
@miguelvelezmj25 - run this and give us the output:
lsof -p $(ps auxww | awk '$0 !~ /awk/ && $0 ~ /java.*VisualVM.app/ {print $2}') | awk -F "/" '/hsperf/ {printf $NF" "; system("ps -p "$NF" -o command=")}'
It should give a list like this:
37747 /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java -Djdk.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home -classpath /Applications/VisualVM.app/Contents/Resources/visualvm/platform/lib/boot.
34689 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -d64 -enableassertions -server -Dblackboard.wrapper.anchorfile=/usr/local/master/blackboard/apps/tomcat/work/tomcat.anchor -Dblackboard.wrapper.commandfile=/usr/
36280 /Applications/PyCharm CE.app/Contents/MacOS/pycharm
34588 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -d64 -server -Dblackboard.wrapper.anchorfile=/usr/local/master/blackboard/apps/activemq-broker/work/activemq-broker.anchor -Dblackboard.wrapper.commandfile=/usr/
36893 /Users/tkack/eclipse/jee-photon/Eclipse.app/Contents/MacOS/eclipse
tkackimac:~ tkack$ lsof -p $(ps auxww | awk '$0 !~ /awk/ && $0 ~ /java.*VisualVM.app/ {print $2}') | awk -F "/" '/hsperf/ {printf $NF" "; system("ps -p "$NF" -o command=")}'
37747 /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java -Djdk.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home -classpath /Applications/VisualVM.app/Contents/Resources/visualvm/platform/lib/boot.
34689 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -d64 -enableassertions -server -Dblackboard.wrapper.anchorfile=/usr/local/master/blackboard/apps/tomcat/work/tomcat.anchor -Dblackboard.wrapper.commandfile=/usr/
36280 /Applications/PyCharm CE.app/Contents/MacOS/pycharm
34588 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -d64 -server -Dblackboard.wrapper.anchorfile=/usr/local/master/blackboard/apps/activemq-broker/work/activemq-broker.anchor -Dblackboard.wrapper.commandfile=/usr/
36893 /Users/tkack/eclipse/jee-photon/Eclipse.app/Contents/MacOS/eclipse
This is all the processes that VisualVM has attached to (and computed description).
Now, from this list - you eliminate each application (closing them) by killing them until you find the blocking application.
It would also be nice to see a stack trace of VisualVM when it is hung in.
Get that with:
jstack -l $(ps auxww | awk '$0 !~ /awk/ && $0 ~ /java.*VisualVM.app/ {print $2}')
lsof -p $(ps auxww | awk '$0 !~ /awk/ && $0 ~ /java.*VisualVM.app/ {print $2}') | awk -F "/" '/hsperf/ {printf $NF" "; system("ps -p "$NF" -o command=")}'
This is the output that I see
2900 /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/bin/java -Djdk.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home -classpath /Applications/VisualVM.app/Contents/Resources/visualvm/platform/lib/boot.jar:/Applications/VisualVM.app/Contents/Resources/visualvm/p
2906 /usr/bin/java -cp ./target/running-example-1.0-SNAPSHOT.jar edu.cmu.cs.mvelezce.Example true true true true true true true true true true
The top process is VisualVM and the second one is the program that I want to profile. VisualVM never connected to the program.
@miguelvelezmj25 - did you capture a stack trace for both processes?
Would it be possible for me to test running-example-1.0-SNAPSHOT.jar?
If you start Eclipse or some other java application - but not edu.cmu.cs.mvelezce.Example? Can they connect?
I have the situation that visualvm hangs at startup with 'computing description' if intellij idea is running too. Linux, current intellij (2020.1, community edition), current visualvm(2.0.1)
@reuschling Did you fix this problem?
@hangxie1 yes - not sure if it is the same problem as here, but could be. It was not on VisualVm: https://github.com/oracle/visualvm/issues/200
Can anyone provide clear steps to reproduce it?
I had this issue today when using 2.2.1.
I found https://bugs.openjdk.java.net/browse/JDK-8197387 which says that the exception occurs when you are using the root user and visualvm is trying to get data of VMs started in the context of another user.
Using the user which started the VMs allowed me to get past the problem.
But in general it should be possible as root to inspect non-root VMs....