Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Profiler hangs while "Connecting to the JVMTI agent"
Profiler hangs while "Connecting to the JVMTI agent" [message #138204] Mon, 17 November 2008 08:34 Go to next message
Christoph Leuzinger is currently offline Christoph Leuzinger
Messages: 5
Registered: July 2009
Junior Member
Hello,

I'm trying to profile my Java application using TPTP. My system is running
Ubuntu Linux 8.04 on an amd64 platform. I'm using Eclipse version 3.4.1
(Build id: M20080911-1700) and the TPTP Platform plugin version 4.5.1. I'm
using version 1.6.0.07 of Sun's JDK and the the internal agent controller.

Testing the connection to the agent controller from the preferences panel
succeeds. However, when I try to profile any application, the progress
view shows that the application is launched, but then hangs displaying
"Connecting to the JVMTI agent". No profiling takes place.

When I run "eclipse -debug", I get the two exceptions shown below ("Socket
closed", "Broken pipe") when trying to profile the application.

Any hints? Thanks in advance,

Christoph

Output of "eclipse -debug":
---------------------------
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.j ava:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:14 1)
at
org.eclipse.tptp.platform.execution.client.core.internal.Con nectionImpl.sendMessage(ConnectionImpl.java:518)
at
org.eclipse.tptp.platform.execution.client.core.internal.Age ntController.sendCommand(AgentController.java:1203)
at
org.eclipse.tptp.platform.execution.client.agent.internal.Ag entImpl.sendCommand(AgentImpl.java:353)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.sendOptions(TIDelegateHelper.java:1061)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.attachToAgent(TIDelegateHelper.java:729)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.attachToAgent(TIDelegateHelper.java:653)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.access$7(TIDelegateHelper.java:651)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper$2.processLaunched(TIDelegateHelper.java:492)
at
org.eclipse.tptp.platform.execution.client.core.internal.Pro cessImpl.launchAC(ProcessImpl.java:701)
at
org.eclipse.tptp.platform.execution.client.core.internal.Pro cessImpl.launch(ProcessImpl.java:130)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.launchProcess(TIDelegateHelper.java:527)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.launch(TIDelegateHelper.java:325)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIJ avaLauncherDelegate.launch(TIJavaLauncherDelegate.java:37)
at
org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUti lity.delegateInit(LauncherUtility.java:1164)
at
org.eclipse.tptp.trace.ui.provisional.launcher.PrimaryLaunch Delegate.run(PrimaryLaunchDelegate.java:195)
at java.lang.Thread.run(Thread.java:636)
java.net.SocketException: Socket is closed
at java.net.Socket.getOutputStream(Socket.java:827)
at
org.eclipse.tptp.platform.execution.client.core.internal.Con nectionImpl.sendMessage(ConnectionImpl.java:517)
at
org.eclipse.tptp.platform.execution.client.core.internal.Age ntController.sendCommand(AgentController.java:1203)
at
org.eclipse.tptp.platform.execution.client.agent.internal.Ag entImpl.sendCommand(AgentImpl.java:353)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.configureDataProcessor(TIDelegateHelper.java:8 19)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.attachToAgent(TIDelegateHelper.java:738)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.attachToAgent(TIDelegateHelper.java:653)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.access$7(TIDelegateHelper.java:651)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper$2.processLaunched(TIDelegateHelper.java:492)
at
org.eclipse.tptp.platform.execution.client.core.internal.Pro cessImpl.launchAC(ProcessImpl.java:701)
at
org.eclipse.tptp.platform.execution.client.core.internal.Pro cessImpl.launch(ProcessImpl.java:130)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.launchProcess(TIDelegateHelper.java:527)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TID elegateHelper.launch(TIDelegateHelper.java:325)
at
org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIJ avaLauncherDelegate.launch(TIJavaLauncherDelegate.java:37)
at
org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUti lity.delegateInit(LauncherUtility.java:1164)
at
org.eclipse.tptp.trace.ui.provisional.launcher.PrimaryLaunch Delegate.run(PrimaryLaunchDelegate.java:195)
at java.lang.Thread.run(Thread.java:636)
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #138227 is a reply to message #138204] Mon, 17 November 2008 12:28 Go to previous messageGo to next message
Bing Xu is currently offline Bing Xu
Messages: 6
Registered: July 2009
Junior Member
Can you check if your problem is related to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=240677 and have you tried
with IBM JVM?
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #138259 is a reply to message #138227] Mon, 17 November 2008 15:06 Go to previous messageGo to next message
Christoph Leuzinger is currently offline Christoph Leuzinger
Messages: 5
Registered: July 2009
Junior Member
Bing Xu wrote:

> Can you check if your problem is related to
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=240677

No, I don't think so. I did install libstdc++ from an older Ubuntu release
and the ACServer is starting without any errors.

In the meantime I tried profiling a really simple application, and it
works. But not for my app, where I still get the same exceptions.

> and have you tried with IBM JVM?

No, not yet. But I might give it a try.

Thanks,
Christoph
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #138261 is a reply to message #138259] Mon, 17 November 2008 15:38 Go to previous messageGo to next message
Christoph Leuzinger is currently offline Christoph Leuzinger
Messages: 5
Registered: July 2009
Junior Member
Christoph Leuzinger wrote:
> Bing Xu wrote:

>> and have you tried with IBM JVM?
> No, not yet. But I might give it a try.

I have tried the IBM 6.0 JDK now, but it doesn't make any difference.

Cheers,
Christoph
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #138320 is a reply to message #138259] Tue, 18 November 2008 10:49 Go to previous messageGo to next message
Bing Xu is currently offline Bing Xu
Messages: 6
Registered: July 2009
Junior Member
Can you post your IAC config and log file (should be under
<workspace> /.metadata/.plugins/org.eclipse.tptp.platform.iac.administra tor/config).
And how complicate is your Java program?
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #138350 is a reply to message #138320] Tue, 18 November 2008 15:26 Go to previous messageGo to next message
Christoph Leuzinger is currently offline Christoph Leuzinger
Messages: 5
Registered: July 2009
Junior Member
Bing Xu wrote:

> Can you post your IAC config and log file (should be under
>
<workspace> /.metadata/.plugins/org.eclipse.tptp.platform.iac.administra tor/config).

I've included both files below.

> And how complicate is your Java program?

It's a small Swing app that controls multiple threads. But it doesn't even
start up when profiling.

BTW, I tried JProfiler and it works fine. Don't know if that helps. I'd
really love to see TPTP working, though.
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #138363 is a reply to message #138350] Tue, 18 November 2008 15:28 Go to previous messageGo to next message
Christoph Leuzinger is currently offline Christoph Leuzinger
Messages: 5
Registered: July 2009
Junior Member
Christoph Leuzinger wrote:

> I've included both files below.

Well, I meant to. Nevermind, here they go:

serviceconfig.xml:
------------------
<?xml version="1.0" encoding="UTF-8"?>
<AgentControllerConfiguration>
<AgentControllerEnvironment configuration="default">
<Variable name="JAVA_PATH" position="replace"
value="/usr/lib/jvm/java-6-sun-1.6.0.07/jre/bin/java"/>
<Variable name="RASERVER_HOME" position="replace"
value=" /home/chris/eclipse/plugins/org.eclipse.tptp.platform.ac.lin ux_em64t_4.4.1.v200808290100/agent_controller "/>
<Variable name="TPTP_AC_HOME" position="replace"
value="%RASERVER_HOME%"/>
<Variable name="TPTP_AC_CONFIG_HOME" position="replace"
value=" /home/chris/ls6-workspace/.metadata/.plugins/org.eclipse.tpt p.platform.iac.administrator/config "/>
<Variable name="PLUGINS_HOME" position="replace"
value="/home/chris/eclipse/plugins"/>
<Variable name="LD_LIBRARY_PATH" position="prepend"
value="%RASERVER_HOME%/lib"/>
<Variable name="SYS_TEMP_DIR" position="replace" value="%TEMP%"/>
<Variable name="LOCAL_AGENT_TEMP_DIR" position="replace"
value="%SYS_TEMP_DIR%"/>
<Variable name="CLASSPATH_ORG_APACHE_COMMONS_LOGGING" position="append"
value=" /home/chris/eclipse/plugins/org.apache.commons.logging_1.0.4 .v20080605-1930.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_CORE_COMMANDS" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.core.commands_3.4.0. I20080509-2000.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_CORE_RUNTIME" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.core.runtime_3.4.0.v 20080512.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_EQUINOX_COMMON" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.equinox.common_3.4.0 .v20080421-2006.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_OSGI" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.osgi_3.4.2.R34x_v200 80826-1230.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_EMF_COMMON" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.emf.common_2.4.0.v20 0808251517.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_EMF_ECORE" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.emf.ecore_2.4.1.v200 808251517.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_EMF_ECORE_XMI" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.emf.ecore.xmi_2.4.1. v200808251517.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_JFACE" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.jface_3.4.1.M2008082 7-2000.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_SWT" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64 .source_3.4.1.v3449c.jar:/home/chris/eclipse/plugins/org.ecl ipse.swt_3.4.1.v3449c.jar:/home/chris/eclipse/plugins/org.ec lipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS"
position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.tptp.platform.models _4.5.1.v200807310709/tptp-models.jar "/>
<Variable name="CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS_HIERARCHY"
position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.tptp.platform.models .hierarchy_4.5.0.v200806120100/tptp-models-hierarchy.jar "/>
<Variable name="CLASSPATH_ORG_JUNIT" position="append"
value=" /home/chris/eclipse/plugins/org.junit_3.8.2.v20080602-1318/j unit.jar "/>
<Variable name="CLASSPATH_COM_IBM_ICU" position="append"
value="/home/chris/eclipse/plugins/com.ibm.icu_3.8.1.v20080530.jar "/>
<Variable name="CLASSPATH_ORG_APACHE_JAKARTA_COMMONS_LOGGING"
position="append" value="%CLASSPATH_ORG_APACHE_COMMONS_LOGGING%"/>
<Variable name="CLASSPATH" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.core.runtime_3.4.0.v 20080512.jar "/>
<Variable name="CLASSPATH" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.equinox.common_3.4.0 .v20080421-2006.jar "/>
<Variable name="CLASSPATH" position="append"
value=" /home/chris/eclipse/plugins/org.eclipse.osgi_3.4.2.R34x_v200 80826-1230.jar "/>
</AgentControllerEnvironment>
<ApplicationAliases>
<Application configuration="default" executable="java.exe"
location="%SYS_TEMP_DIR%" path="%JAVA_PATH%">
<Variable name="CLASSPATH" position="append"
value="%CLASSPATH_ORG_ECLIPSE_EQUINOX_COMMON%"/>
<Variable name="LD_LIBRARY_PATH" position="prepend"
value="%RASERVER_HOME%/lib"/>
</Application>
</ApplicationAliases>
<Plugin path="/home/chris/ls6-workspace/.metadata/.plugins"/>
<Agent path="%TPTP_AC_HOME%/agents"/>
<Jvm
location=" /usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/amd64/server/libjvm .so "/>
<Logging directory="%TPTP_AC_CONFIG_HOME%" format="CBE"
level="INFORMATION"/>
<ProcessController>%TPTP_AC_HOME%/bin/tptpProcessController </ProcessController>
<Connection name="Dev">
<TransportLayer loadlib="socketTL" type="TPTP_SOCKET">
<Configuration>
<Port>10006</Port>
<SecurityEnabled>false</SecurityEnabled>
</Configuration>
<CommandExtractor>tptpCmdExtr</CommandExtractor>
</TransportLayer>
<TransportLayer loadlib="namedPipeTL" type="TPTP_LOG">
<Configuration>
<PipeName>acmasterlog</PipeName>
</Configuration>
<CommandExtractor>tptpCmdExtr</CommandExtractor>
</TransportLayer>
<TransportLayer loadlib="namedPipeTL" type="TPTP_NAMEDPIPE">
<Configuration>
<PipeName>acmaster</PipeName>
</Configuration>
<CommandExtractor>tptpCmdExtr</CommandExtractor>
</TransportLayer>
<TransportLayer loadlib="sharedMemTL" type="TPTP_SHAREDMEM">
<Configuration>
<MemName>acbuffer</MemName>
</Configuration>
<CommandExtractor>tptpCmdExtr</CommandExtractor>
</TransportLayer>
<TransportLayer loadlib="tptpCCTL" type="TPTP_CCTL">
<Configuration>
<Port>10002</Port>
<SecuredPort>10003</SecuredPort>
<FilePort>10005</FilePort>
<IsDataMultiplexed>false</IsDataMultiplexed>
<ProcessPolling>true</ProcessPolling>
<Version>4.4.1</Version>
<SecurityEnabled>false</SecurityEnabled>
<Hosts configuration="default">
<Allow host="LOCAL"/>
</Hosts>
</Configuration>
<CommandExtractor>tptpCmdExtr</CommandExtractor>
</TransportLayer>
<TransportLayer loadlib="tptpACTL" type="TPTP_ACTL">
<Configuration/>
<CommandExtractor>tptpCmdExtr</CommandExtractor>
</TransportLayer>
</Connection>
<PeerConnectionTransport>TPTP_CCTL</PeerConnectionTransport >
</AgentControllerConfiguration>

servicelog.log:
---------------
<CommonBaseEvent creationTime="2008-11-18T20:18:27.705633Z"
globalInstanceId="A9232313000AC4430CB91B1B432AD8CE" msg="Native file
server started listening on port 10005" severity="10" version="1.0.1">
<sourceComponentId component="AgentController"
componentIdType="TPTPComponent" executionEnvironment="ClientCTL.c, line
585" instanceId="1004" location="harpinna" locationType="IPV4"
processId="6912" subComponent="Client Compatibility TL" threadId="6912"
componentType="Eclipse_TPTP"/>
<situation categoryName="ReportSituation">
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent>
<CommonBaseEvent creationTime="2008-11-18T20:21:07.262003Z"
globalInstanceId="A92323B30003FF3D7B04736374C75F0F" msg="ptrace() call
failed for pid 6926" severity="50" version="1.0.1">
<sourceComponentId component="ProcessController"
componentIdType="TPTPComponent" componentType="Eclipse_TPTP"
executionEnvironment="TPTPProcessController.cpp, line 912"
instanceId="101" location="harpinna" locationType="IPV4" processId="6926"
subComponent="ProcessController" threadId="6926"/>
<situation categoryName="ReportSituation">
<situationType reasoningScope="INTERNAL" reportCategory="LOG"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ReportSituation"/>
</situation>
</CommonBaseEvent>
<CommonBaseEvent creationTime="2008-11-18T20:21:07.262782Z"
globalInstanceId="A92323B30004027848B6376B2C6712ED" msg="PC
monitorProcessState: Failed to monitor process 6926" severity="50"
version="1.0.1">
<sourceComponentId component="ProcessController"
componentIdType="TPTPComponent" componentType="Eclipse_TPTP"
executionEnvironment="TPTPProcessController.cpp, line 1749"
instanceId="101" location="harpinna" locationType="IPV4" processId="6926"
subComponent="ProcessController" threadId="6926"/>
<situation categoryName="ReportSituation">
<situationType reasoningScope="INTERNAL" reportCategory="LOG"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ReportSituation"/>
</situation>
</CommonBaseEvent>
<CommonBaseEvent creationTime="2008-11-18T20:21:07.270788Z"
globalInstanceId="A92323B3000421BA27B1A1413621722F" msg="Agent Manager
received an unexpected error response TPTP_Error" severity="30"
version="1.0.1">
<sourceComponentId component="AgentController"
componentIdType="TPTPComponent" executionEnvironment="AgentManager.c, line
738" instanceId="1" location="harpinna" locationType="IPV4"
processId="6912" subComponent="Agent Manager" threadId="6912"
componentType="Eclipse_TPTP"/>
<situation categoryName="ReportSituation">
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent>
<CommonBaseEvent creationTime="2008-11-18T20:21:07.406549Z"
globalInstanceId="A92323B30006340C47E59C000B45C13A" msg="CONSOLE LAUNCHED
COMMAND for connection(5001). " severity="50" version="1.0.1">
<sourceComponentId component="AgentController"
componentIdType="TPTPComponent" executionEnvironment="NamedPipeListener.c,
line 578" instanceId="1002" location="harpinna" locationType="IPV4"
processId="6912" subComponent="Named Pipe TL" threadId="6912"
componentType="Eclipse_TPTP"/>
<situation categoryName="ReportSituation">
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent>
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #138735 is a reply to message #138363] Mon, 24 November 2008 11:08 Go to previous messageGo to next message
Bing Xu is currently offline Bing Xu
Messages: 6
Registered: July 2009
Junior Member
Oops, I thought I posted this couple days ago and but couldn't see it
now...

Can you change your AC logging level by modifying this line in your config
xml:

<Logging directory="%TPTP_AC_CONFIG_HOME%" format="CBE" level="DEBUG"/>

And then restart AC and try the profiling ago. The BrokenPipeException
might be not the cause. It could happen when the pipe is closed by a
thread at client side (workbench side) or when AC is crashed. So please
check if ACServer is still running after you get the error.
Re: Profiler hangs while "Connecting to the JVMTI agent" [message #818661 is a reply to message #138735] Sun, 11 March 2012 20:46 Go to previous message
Nathan Reynolds is currently offline Nathan Reynolds
Messages: 1
Registered: July 2009
Junior Member
I am having the exact same problem. I am running the Agent Controller as a Windows service. I get the same exception call stack. I have attached the TPTP log file with debug log level. Here's my configuration.

Windows 7 64-bit SP 1
HotSpot 7 Update 3 32-bit
Eclipse Indigo SR 2 Build 20120216-1857
TPTP 4.7.2

Previous Topic:Install Eclipse TPTP on Ubuntu 11.10 64bits
Next Topic:TPTP Install Problems
Goto Forum:
  


Current Time: Wed Jul 30 23:34:25 EDT 2014

Powered by FUDForum. Page generated in 0.05856 seconds