[jbosstools-issues] [JBoss JIRA] (JBIDE-20217) JDT Debug can not connect/list VM started with suspend=y

Aslak Knutsen (JIRA) issues at jboss.org
Thu Jul 16 20:28:02 EDT 2015


    [ https://issues.jboss.org/browse/JBIDE-20217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090216#comment-13090216 ] 

Aslak Knutsen commented on JBIDE-20217:
---------------------------------------

jps will detect the VM, even in the current Eclipse code it does, but it can't connect to it to get more information as the VM is suspended.This is where Eclipse currently fail. The 'odd hangs sometime' described in the commit message for JBIDE-19397 is jps finding a VM with suspend=y and attempting to connect to it, the hang is waiting for that connection to time out. This is where all the deleted platform / os specific code deleted in JBIDE-19397 comes in, attempt to find the same information as jps would but from the os instead, e.g. via the process list. 

One way of avoiding the jps hang could be to:

* fetch only process ids from jps in first round to know what are java processes
* fetch command line arguments in a os specific way for the found processes
* get extra info from jps for only the processes not detected to be in suspend=y via command line args
* use a simplified 'view' of the ones that are 

> JDT Debug can not connect/list VM started with suspend=y
> --------------------------------------------------------
>
>                 Key: JBIDE-20217
>                 URL: https://issues.jboss.org/browse/JBIDE-20217
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: common/jst/core
>    Affects Versions: 4.3.0.Beta1
>            Reporter: Aslak Knutsen
>            Assignee: Rob Stryker
>            Priority: Critical
>             Fix For: 4.3.0.CR1
>
>
> Having a VM started with suspend=y cause the following error to be logged from https://github.com/jbosstools/jbosstools-base/blob/master/common/plugins/org.jboss.tools.common.jdt.debug/src/org/jboss/tools/common/jdt/debug/RemoteDebugActivator.java#L171 due to Exception thrown in ToolsCore.getJvmArgs
> Seemingly JVMStat can not connect to a suspended VM. 
> {code}
> eclipse.buildId=4.5.0.I20150603-2000
> java.version=1.8.0_45
> java.vendor=Oracle Corporation
> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
> Command-line arguments:  -os linux -ws gtk -arch x86_64
> org.jboss.tools.common.jdt.debug
> Error
> Wed Jul 08 17:16:00 CEST 2015
> {code}
> {code}
> 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:497)
> 	at org.jboss.tools.common.jdt.debug.tools.internal.Tools.getJvmArgs(Tools.java:780)
> 	at org.jboss.tools.common.jdt.debug.tools.ToolsCore.getJvmArgs(ToolsCore.java:98)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getVmModelsUsingTools(RemoteDebugActivator.java:166)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getVmModel(RemoteDebugActivator.java:145)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getVmModels(RemoteDebugActivator.java:132)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getDebugModels(RemoteDebugActivator.java:193)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getDebugModels(RemoteDebugActivator.java:227)
> 	at org.jboss.tools.common.jdt.debug.ui.RemoteDebugUIActivator.discoverRemoteApplication(RemoteDebugUIActivator.java:137)
> 	at org.jboss.tools.common.jdt.debug.ui.RemoteDebugUIActivator$1.run(RemoteDebugUIActivator.java:93)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: sun.jvmstat.monitor.MonitorException: Could not synchronize with target
> 	at sun.jvmstat.perfdata.monitor.v2_0.PerfDataBuffer.synchWithTarget(PerfDataBuffer.java:277)
> 	at sun.jvmstat.perfdata.monitor.v2_0.PerfDataBuffer.buildMonitorMap(PerfDataBuffer.java:131)
> 	at sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.findByName(PerfDataBufferImpl.java:241)
> 	at sun.jvmstat.perfdata.monitor.AbstractPerfDataBuffer.findByName(AbstractPerfDataBuffer.java:100)
> 	at sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.findByName(AbstractMonitoredVm.java:85)
> 	at sun.jvmstat.monitor.MonitoredVmUtil.jvmArgs(MonitoredVmUtil.java:145)
> 	... 14 more
> Root exception:
> sun.jvmstat.monitor.MonitorException: Could not synchronize with target
> 	at sun.jvmstat.perfdata.monitor.v2_0.PerfDataBuffer.synchWithTarget(PerfDataBuffer.java:277)
> 	at sun.jvmstat.perfdata.monitor.v2_0.PerfDataBuffer.buildMonitorMap(PerfDataBuffer.java:131)
> 	at sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.findByName(PerfDataBufferImpl.java:241)
> 	at sun.jvmstat.perfdata.monitor.AbstractPerfDataBuffer.findByName(AbstractPerfDataBuffer.java:100)
> 	at sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.findByName(AbstractMonitoredVm.java:85)
> 	at sun.jvmstat.monitor.MonitoredVmUtil.jvmArgs(MonitoredVmUtil.java:145)
> 	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:497)
> 	at org.jboss.tools.common.jdt.debug.tools.internal.Tools.getJvmArgs(Tools.java:780)
> 	at org.jboss.tools.common.jdt.debug.tools.ToolsCore.getJvmArgs(ToolsCore.java:98)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getVmModelsUsingTools(RemoteDebugActivator.java:166)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getVmModel(RemoteDebugActivator.java:145)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getVmModels(RemoteDebugActivator.java:132)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getDebugModels(RemoteDebugActivator.java:193)
> 	at org.jboss.tools.common.jdt.debug.RemoteDebugActivator.getDebugModels(RemoteDebugActivator.java:227)
> 	at org.jboss.tools.common.jdt.debug.ui.RemoteDebugUIActivator.discoverRemoteApplication(RemoteDebugUIActivator.java:137)
> 	at org.jboss.tools.common.jdt.debug.ui.RemoteDebugUIActivator$1.run(RemoteDebugUIActivator.java:93)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jbosstools-issues mailing list