Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327067

Summary: EC JPIAgent received message (FATAL ERROR): Internal error (see log file)
Product: z_Archived Reporter: Mikael Petterson <mikaelpetterson>
Component: TPTPAssignee: Mike Reid <mikereid>
Status: CLOSED INVALID QA Contact: Kathy Chan <kathy>
Severity: major    
Priority: P2 CC: jcayne, jgwest
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: closed472

Description Mikael Petterson CLA 2010-10-06 04:07:51 EDT
When running the following script:

export TPTP_AC_HOME=/home/eraonel/pub/eclipse-java-helios-linux-gtk/eclipse/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.300.v201009101627/agent_controller


export JAVA_PROFILER_HOME=/home/eraonel/pub/eclipse-java-helios-linux-gtk/eclipse/plugins/org.eclipse.tptp.platform.jvmti.runtime_4.6.1.v201009131917


#Add the following directories to LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=$JAVA_PROFILER_HOME:$TPTP_AC_HOME/lib:$LD_LIBRARY_PATH


export JAVA_HOME=/app/j2sdk/1.6.0_13


#Use junit runner.


/app/j2sdk/1.6.0_13/bin/java '-agentpath:/home/eraonel/pub/eclipse-java-helios-linux-gtk/eclipse/plugins/org.eclipse.tptp.platform.jvmti.runtime_4.6.1.v201009131917/agent_files/linux_ia32/libJPIBootLoader.so=JPIAgent:ac_home=/home/eraonel/pub/eclipse-java-helios-linux-gtk/eclipse/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.300.v201009101627/agent_controller/lib,server=enabled,file=log.trcxml;CGProf'  org.junit.runner.JUnitCore    org.junit.runner.JUnitCore  se.ericsson.wcdma.rnc.roam.testenv.testcases.generated.AllTests

We get the following error message:

[Error: EC JPIAgent received message (FATAL ERROR): Internal error (see log file).]

I don't know where to find log file. And 'googling' gives an error:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=184618

So I am re-opening the bug.
Comment 1 Kathy Chan CLA 2010-10-13 14:20:03 EDT
It looks like you're using the Integrated Agent Controller (IAC).  In general, the logs for IAC can be found in a directory named:

workspace/.metadata/.plugins/org.eclipse.tptp.platform.iac.administrator/config 

in a file called servicelog.log.

Please provide us a bit more detail on what you're trying to accomplish and may be we could help you isolate the problem further.
Comment 2 Mikael Petterson CLA 2010-10-14 04:25:40 EDT
Hi,

Thanks for replying.

I am trying to profile my application when I run my junit tests. I want to do this
without using the IDE. So no gui ( just plain command line).

So I read in:

3.3 New Java Profiler runtime execution modes

http://www.eclipse.org/tptp/platform/documents/tutorials/jvmti/Java_Application_Profiling_using_TPTP-v2.0.html

I wanted to use standalone mode. So I wrote a script to set all env. variables and
then tried to run profiling on my application (j2se) under test (I want to collect data in xml format to be able to parse it later on).

I use an existing installation of helios ( I used updater to install TPTP packages).

Then when I tried to start my profiling I got:

[Error: EC JPIAgent received message (FATAL ERROR): Internal error (see log
file).]

All hints are very much appreciated.

br,

//mikael
Comment 3 Joel Cayne CLA 2010-10-19 10:33:10 EDT
Hi Mikael,

Using the configuration, I was able to reproduce the error. It appears that both the agentpath and agentlib method is being used here. The Getting Started guide describes which options can be used together. It can be found from the Installation Guide on the website or included in the Standalone Agent Controller.

If you use the agentpath then the environment variables do not need to be set. When I did not set the environment variables, the error did not appear. If you set the environment variables, then the JAVA_PROFILER_HOME should be set to org.eclipse.tptp.platform.jvmti.runtime_<version>/agent_files/<platform> when not using the Standalone Agent Controller.

The environment variables required to set the log location (MARTINI_LOGGER_DIRECTORY) and log level (MARTINI_LOGGER_LOG_LEVEL) can be used to create the log file.
Comment 4 Joel Cayne CLA 2010-10-25 10:26:54 EDT
Are you able to profile the application when you change the environment variable?

Reassigning to Mike to look at the precedence for agentpath and environment variables.
Comment 5 Mikael Petterson CLA 2010-10-25 11:17:44 EDT
Hi,

Thanks for input. I looked at guide using the following url:

http://dev.eclipse.org/viewcvs/index.cgi/platform/org.eclipse.tptp.platform.agentcontroller/src-native-new/packaging_md/linux/getting_started.html?root=TPTP_Project&view=co

I found the some more information about agentpath then the environment variables.

I was able to start app using the following:

export MARTINI_LOGGER_DIRECTORY=/home/eraonel/tmp
export MARTINI_LOGGER_LOG_LEVEL=5

export TPTP_AC_HOME=/home/eraonel/pub/eclipse-java-helios-linux-gtk/eclipse/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.300.v201009101627/agent_controller

export JAVA_PROFILER_HOME=/home/eraonel/pub/eclipse-java-helios-linux-gtk/eclipse/plugins/org.eclipse.tptp.platform.jvmti.runtime_4.6.1.v201009131917/agent_files/linux_ia32

export LD_LIBRARY_PATH=$JAVA_PROFILER_HOME:$TPTP_AC_HOME/lib:$LD_LIBRARY_PATH

export JAVA_HOME=/app/j2sdk/1.6.0_13


#Use junit runner.
/app/j2sdk/1.6.0_13/bin/java '-agentlib:JPIBootLoader=JPIAgent:server=enabled,file=/home/eraonel/tmp/log.trcxml;CGProf' -classpath $CLASSPATH org.junit.runner.JUnitCore    org.junit.runner.JUnitCore  se.ericsson.wcdma.rnc.roam.testenv.testcases.generated.AllTests


I will now take a look at the output ( xml).

Thanks!

//mike
Comment 6 Mikael Petterson CLA 2010-10-26 07:18:52 EDT
Hi,

Just a quick qestion. What api is used to parse the result in my xml file.
Which jar file cotains these classes?

br,

//mike
Comment 7 Mike Reid CLA 2010-10-26 13:58:19 EDT
I'm not sure what you are referring to regarding the jar file containing 'these classes'. Can you clarify?

You can import your generated .trcxml file into Eclipse as documented here:
 http://help.eclipse.org/helios/topic/org.eclipse.tptp.platform.doc.user/tasks/teimprof.htm

I'll just point out that at step #5 the selected analysis type should match the profiling analysis type collected in your .trcxml file. In you example command line in comment #5 would be execution statistics; or you can also select all details to ensure everything is imported.
Comment 8 Mikael Petterson CLA 2010-10-27 03:41:31 EDT
Hi,

We are evaluating profilers for java to use with Hudson. We want to run the profiling test at night and collect the data and present it in Hudson. I thought tptp was well developed and produced an xml that can be parsed.

First step is to view bottlenecks (identifying performance bottlenecks).
So I thought the Hudson plug-in could parse the .trcxml output and make a simple summary of the data and present it in Hudson ( Not as nice a s this but merly the same info http://www.eclipse.org/tptp/home/documents/conferences/eclipseCon2009/712_ProfilingTestingTPTP.pdf page 23).

I don't know how data is parsed and presented. But maybe you can point me in the right direction :-) Goal is to use as much as possible from tptp so when it develops the plug-in does not need to change that much.

Looking forward to hear your opinion on this.

//mike
Comment 9 Mike Reid CLA 2010-11-26 14:40:53 EST
Hi Mikael,

I did not realize you were generating the profiling data with the purpose of parsing it.

The TPTP project does define an EMF model for the data and does contain a parser to load the model. I would suggest however that the tptp-tracing-profiling-tools-dev mailing list is probably a better place to discuss specific questions you have relating to consuming the trace data produced by the profiler.

This is probably the best place to start:

http://eclipse.org/tptp/platform/documents/index.php

It contains links to the trace schema spec as well as to the geneated Javadocs for the project.

I'm going to go ahead and resolve this since the original problem has been resolved. By all means lets continue this discussion on the mailing list if you have further questions about consuming the XML data.

/mike.
Comment 10 Kathy Chan CLA 2011-02-11 13:51:11 EST
Closed in the TPTP 4.7.2 release.