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

Bug 199647

Summary: Internal Error profiling JBoss using Agent Controller
Product: z_Archived Reporter: Carsten Mjartan <cmjartan>
Component: TPTPAssignee: Asaf Yaffe <asaf.yaffe>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: analexee, asaf.yaffe, jkubasta, uni162
Version: unspecifiedKeywords: plan
Target Milestone: ---Flags: analexee: review+
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460
Attachments:
Description Flags
Patch none

Description Carsten Mjartan CLA 2007-08-11 06:42:17 EDT
Build ID: I20070621-1340

Steps To Reproduce:
1. Starting JBoss 4.0.5 with these additional Parameters using TPTP AgentController 4.4.0.1 

jboss\bin\run.bat:
  SET TPTP_AC_HOME=c:\europa\tptp\agentcontroller
  SET JAVA_PROFILER_HOME=%TPTP_AC_HOME%\plugins\org.eclipse.tptp.javaprofiler
  SET PATH=%JAVA_PROFILER_HOME%;%PATH%;%TPTP_AC_HOME%\bin
  SET JAVA_OPTS=%JAVA_OPTS% -agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=c:\jboss\bin\filters.txt;CGProf

filters.txt:
  de.mypackage.* * INCLUDE
  * * EXCLUDE

3. During Website Login the following error occurs and JBoss exits:
[Error: EC JPIAgent received message (FATAL ERROR): Internal error (see log file).]

Martini Log:
=============================================
Process ID: 19344
Process command line: "C:\Programme\Java\jdk1.5.0_10\bin\java"  -Dprogram.name=run.bat -server -Xms128m -Xmx512m  -XX:MaxPermSize=128m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -agentlib:JPIBootLoader=JPIAgent:server=standalone,filters=c:\jboss\bin\filters.txt;CGProf "-Djava.endorsed.dirs=c:\jboss\bin\\..\lib\endorsed" -classpath "C:\Programme\Java\jdk1.5.0_10\lib\tools.jar;c:\jboss\bin\\run.jar" org.jboss.Main -c jetty
=============================================
Type	Date	Time	TID	Level	Client	Message
...
...
Informative	08/11/07	10:23:45	27400	5	CDataManager	Updated instrumentation information for method '<init>((Lfreemarker/ext/jsp/TaglibFactory$1;)V)' (id = 163450)
Informative	08/11/07	10:23:45	27400	5	CDataManager	Updated instrumentation information for class 'freemarker/ext/jsp/TaglibFactory$LocalTaglibDtds' (id = 10045)
Informative	08/11/07	10:23:45	27400	5	CGAdaptor	Instrumented: freemarker/ext/jsp/TaglibFactory$LocalTaglibDtds.<init>(()V)
Informative	08/11/07	10:23:45	27400	5	CGAdaptor	Instrumented: freemarker/ext/jsp/TaglibFactory$LocalTaglibDtds.resolveEntity((Ljava/lang/String;Ljava/lang/String;)Lorg/xml/sax/InputSource;)
Informative	08/11/07	10:23:45	27400	5	CGAdaptor	Instrumented: freemarker/ext/jsp/TaglibFactory$LocalTaglibDtds.<init>((Lfreemarker/ext/jsp/TaglibFactory$1;)V)
Informative	08/11/07	10:23:45	27400	5	CJVMTIInterface	ClassPrepare event received: class = 'Lfreemarker/ext/jsp/TaglibFactory$LocalTaglibDtds;', generic = '(null)'
Informative	08/11/07	10:23:47	27400	5	CJVMTIInterface	ClassPrepare event received: class = 'Lorg/apache/xerces/xni/parser/XMLParseException;', generic = '(null)'
Error	08/11/07	10:23:47	27400	0	CDataManager	File: DataManager.cpp (Line: 1557) condition failed: uiJVMPIMethodIndex < uiJVMPINumMethods 

More information:
I also tried to profile using server=enabled and using Java 1.5.0_10 and 1.6 both for class compilation and JBoss runtime. I always got the same error message
Comment 1 Igor Alelekov CLA 2007-08-14 02:00:28 EDT
Hi Asaf,
Do you think it might be a martini defect?
Comment 2 Asaf Yaffe CLA 2007-08-14 03:31:50 EDT
This certainly looks like a Martini defect. Updating components and ownership accordingly.

Carsten, can you provide us with a small JBoss application that reproduces this defect?

Thanks,
Asaf
Comment 3 Petr Ciochon CLA 2008-04-11 07:47:27 EDT
Hi, I have the similar problem with my application on Tomcat. I found some info on 
http://dev.eclipse.org/newslists/news.eclipse.tptp/msg05159.html
but there is no solution.

I'm using the Windows XP + Eclipse3.4m5 with TPTP4.4.0 Profiller.

When I try to use CPU profiller for my application executed on Tomcat5.5 directly executed from Eclipse  ( I execute the Tomcat (from JAR in my project) by "Profille as Java Application) and when I try to click to some generated page from my application, I got [Error: EC JPIAgent received message (FATAL ERROR): Internal error (see log file).] in Eclipse console. 


So I configure the log and there is the following info:


CDataManager	Updated instrumentation information for class 'org/apache/xalan/xsltc/runtime/Node' (id = 5724)
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$62;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$63;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$64;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$66;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$74;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$75;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$76;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$65;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$67;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$68;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$69;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$70;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$71;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$56;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$57;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$58;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$59;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$60;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$33;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	[ClassFileLoadHookHandler] org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2$TypedFollowingSiblingIterator
Informative	04/11/08	11:13:45	4948	5	CDataManager	Updated instrumentation information for method '<init>((Lorg/apache/xml/dtm/ref/sax2dtm/SAX2DTM2;I)V)' (id = 122703)
Informative	04/11/08	11:13:45	4948	5	CDataManager	Updated instrumentation information for method 'next(()I)' (id = 122704)
Informative	04/11/08	11:13:45	4948	5	CDataManager	Updated instrumentation information for class 'org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2$TypedFollowingSiblingIterator' (id = 5725)
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	[ClassFileLoadHookHandler] org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2$FollowingSiblingIterator
Informative	04/11/08	11:13:45	4948	5	CDataManager	Updated instrumentation information for method '<init>((Lorg/apache/xml/dtm/ref/sax2dtm/SAX2DTM2;)V)' (id = 122705)
Informative	04/11/08	11:13:45	4948	5	CDataManager	Updated instrumentation information for method 'setStartNode((I)Lorg/apache/xml/dtm/DTMAxisIterator;)' (id = 122706)
Informative	04/11/08	11:13:45	4948	5	CDataManager	Updated instrumentation information for method 'next(()I)' (id = 122707)
Informative	04/11/08	11:13:45	4948	5	CDataManager	Updated instrumentation information for class 'org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2$FollowingSiblingIterator' (id = 5726)
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'Lorg/apache/xml/dtm/ref/sax2dtm/SAX2DTM2$FollowingSiblingIterator;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'Lorg/apache/xml/dtm/ref/sax2dtm/SAX2DTM2$TypedFollowingSiblingIterator;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$42;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$46;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$43;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$41;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$45;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$7;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$8;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$9;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$10;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$11;', generic = '(null)'
Informative	04/11/08	11:13:45	4948	5	CJVMTIInterface	ClassPrepare event received: class = 'LGregorSamsa$12;', generic = '(null)'
Error	04/11/08	11:13:45	4948	0	CDataManager	File: DataManager.cpp (Line: 1557) condition failed: uiJVMPIMethodIndex < uiJVMPINumMethods 



When I try to search for "what is GregorSamsa" I found this:
http://www.jguru.com/faq/view.jsp?EID=1340163

Yes - I'm using the XSLTC in my aplication. 


I can not eliminate the problem by filter settings, I try to use some filter like Exclude  "*GregorSamsa*" , but the problem still occures.



Comment 4 Asaf Yaffe CLA 2008-04-13 05:51:18 EDT
(In reply to comment #3)
Petr,

Can you describe a use-case that can be used to reproduce this error?
Comment 5 Asaf Yaffe CLA 2008-04-13 06:18:01 EDT
In plan for 4.5.i7, pending a reproducer from bug reporter
Comment 6 Asaf Yaffe CLA 2008-04-29 06:22:57 EDT
Deferring to i8.

Community: this is the last chance to provide a reproducer for this bug. I was not able to reproduce it myself. 

If one of you can attach a simple Java class that reproduces this issue, it will greatly help in root-causing and fixing this issue.
Comment 7 Asaf Yaffe CLA 2008-05-15 03:04:36 EDT
Created attachment 100367 [details]
Patch

The fatal error is caused by an incorrect assertion statement.
The patch removes this assertion. This is a low risk fix.
Comment 8 Asaf Yaffe CLA 2008-05-15 03:06:40 EDT
Alex, please review. This is a low risk patch we can submit for 4.5.i8
Comment 9 Alexander N. Alexeev CLA 2008-05-15 03:38:01 EDT
patch is good
Comment 10 Asaf Yaffe CLA 2008-05-19 02:09:27 EDT
Fix checked-in to HEAD.

Note to bug reporter:
Will you be able to verify this fix when a new build of TPTP 4.5 becomes available?

Thanks,
Asaf
Comment 11 Petr Ciochon CLA 2008-06-02 16:14:16 EDT
Hi,

sorry for no response from me, I was long time away. But now, I'm very happy, I try to use the last stable build - 4.5RC2 with our application and XSLTC enabled  and the problem is fixed for me. 

No errors, everything is OK, I can profile the whole application.

Thanks, good job !!! :o) 
Comment 12 Asaf Yaffe CLA 2008-06-03 01:49:27 EDT
Verified by reporter
Comment 13 Paul Slauenwhite CLA 2009-06-30 13:48:42 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.