Community
Participate
Working Groups
driver: TPTP-4.6.0-200905281626 This problem happens on both Sun and IBM JVM 1.5 and 1.6. To reproduce: Tomcat Server version: Tomcat v6.x (http://tomcat.apache.org/download-60.cgi) Setup: TPTP driver with packages for TPTP-WTP integration as listed on TPTP download page - TPTP runtime - EMF,XSD - WTP - GEF - DTP To reproduce: 1. Setup TPTP driver with WTP integration. 2. Start TPTP, and configure a Tomcat server in Window>Preferences>Server>Runtime Environments. 3. Open Servers view in perspective by Windows>Show View>Other...>Server>Servers view. 4. Add the Tomcat instance in Servers view. 5. Right click on the server instance in Servers view and select 'Open' to open the server configuration. 6. In the server configuration editor, change 'Server Location' to 'Use TomcatInstallation'. 7. In the server configuration editor, set TimeOuts for start to 180 sec or higher. 8. Start server in Profile mode. 9. In Profile on Server dialog, configure the following: - Profiler: select 'Java Profiler - JRE 1.5 or newer'. - Analysis: select 'Thread Analysis' (with Contention Analysis selected) - Filter: add 'org.apache* * INCLUDE' to the filter list (new or default filter) 10. Click Profile to start profiling. 12. After server is shown as Profiling in state, open http://localhost:8080 in a broswer to load the Tomcat default page. Server Java process crashes and JVM dialog is shown.
Note the problem is not reproducible with Java application of smaller scale.
Hi Yunan and Chengrui, Could you please take a look at this recent regression in TPTP 4.6? It's blocking Profile on server scenarios. Thanks!
Hi, Eugene, Is there some log file available to analyze? I will back to office tomorrow and will investigate about this bug more. Thanks.
Eugene, Does this problem occur in TPTP 4.5.2.1 Milestone 2?
(In reply to comment #4) > Eugene, > > Does this problem occur in TPTP 4.5.2.1 Milestone 2? > Problem does not occur with TPTP-4.5.2.1-200905201524 build.
Created attachment 137858 [details] snap of Java crash report
Chengrui and Yunan, Any update on this regression problem? Are you able to reproduce the problem?
I encountered a problem when profiling with Tomcat 6.0 in step 8. Tomcat server can be started normally or with debugged mode in Eclipse workbench, but failed with a hint ¡°Could not launch in profiling mode because no profilers are configured.¡± I used the Eclipse TPTP all-in-one package downloaded from TPTP website: Eclipse Platform Version: 3.5.0 Build id: I20090528-2000. Eugene, please give me some help to reproduce the bug. Thanks.
Chengrui, I'm glad you asked. As stated in the driver download page: The all-in-one package contains all TPTP plugins with their dependencies, except the TPTP-WTP (required for Profile on Server) and TPTP-BIRT (required for BIRT Reporting) integration features. To install the integration features, please download the "All TPTP plugins" zip file below. So you should get the prereqs and then the "All TPTP plugins (runtime or SDK)". Here are the prereqs you need to: - Eclipse SDK - EMF/XSD - WTP 3.1 - GEF - DTP Just unzip Eclipse SDK. Then unzip the rest of the prereq and the "all TPTP plugin" zip to the dropins directory of the Eclipse. Please let us know if you still have problem getting profile of server to work.
Hi, Kathy, Thanks a lot for your information. Now I can reproduce the problem and I will handle the problem as soon as possible. Thanks, Chengrui (In reply to comment #9) > Chengrui, > > I'm glad you asked. As stated in the driver download page: > > The all-in-one package contains all TPTP plugins with their dependencies, > except the TPTP-WTP (required for Profile on Server) and TPTP-BIRT (required > for BIRT Reporting) integration features. To install the integration features, > please download the "All TPTP plugins" zip file below. > > So you should get the prereqs and then the "All TPTP plugins (runtime or SDK)". > Here are the prereqs you need to: > > - Eclipse SDK > - EMF/XSD > - WTP 3.1 > - GEF > - DTP > > Just unzip Eclipse SDK. Then unzip the rest of the prereq and the "all TPTP > plugin" zip to the dropins directory of the Eclipse. > > Please let us know if you still have problem getting profile of server to work. >
Yunan and Chengrui, We're running out of time for TPTP 4.6. However, there's concern raised about deferring defect 278437 from TPTP 4.6 since this is a regression on performing thread anaysis with profile on server scenario. Have you been able to isolate what is causing this regression or any outlook on fixing this? Please update the defect with your findings. Please note that we need to drop our final TPTP v4.6 driver to Galileo on 06/16 which means that we need to build our final driver this week.
The problem seems caused by some incorrect memory access in ThreadProf. If the cause is found, I think the fix for it is not hard. But it is not easy to position such kind of crash problem. I am trying to find the cause, and if any update I will post it on Bugzilla. (In reply to comment #11) > Yunan and Chengrui, > > We're running out of time for TPTP 4.6. However, there's concern raised about > deferring defect 278437 from TPTP 4.6 since this is a regression on performing > thread anaysis with profile on server scenario. Have you been able to isolate > what is causing this regression or any outlook on fixing this? Please update > the defect with your findings. Please note that we need to drop our final TPTP > v4.6 driver to Galileo on 06/16 which means that we need to build our final > driver this week. >
Created attachment 138899 [details] Patch to solve thread profiling crash on Apache Tomcat Hi, Eugene & Kathy, I have found the problem of this crash. It is found this incorrect memory usage code is in ProfEnv.cpp and AttachEvent.cpp parts. When we fixed bug 277431, the test cases we used did not cover incorrect memory usage in these two files. These incorrect usages include: not initialized memory, not check pointer after malloc or new etc. mainly in CProfEnv function CProfEnv::ConvertStackTrace(SThreadInfo* threadInfo, SStackTrace_* stackTrace). This patch fixed the related problem and it also improves code quality by replacing repeated code in CProfEnv::GetStackTrace with CProfEnv::ConvertStackTrace(...) function call. Eugene, please help to review the patch code and I will submit profilers binary files on WinXP for testing usage. If the patch does not have problem, please help to check it into CVS. Thanks, Chengrui
Created attachment 138901 [details] Profilers binary files for testing usage on WindowsXP This is profilers binary files for testing usage on WindowsXP.
Patch smoke test looks good. Tested with Execution and Memory Analysis also. Jonathan, would you please also review the patch?
I have reviewed the patch code and it looks good.
Yunan, Please also update the existing test case for this problem.
I would like to request that the following defect be considered for PMC approval for 4.6.0. 1. Explain why you believe this is a stop-ship defect. How does the defect manifest itself, and how will users of TPTP / consuming products be affected if the defect is not fixed? > Thread Analysis fails to work in JVMTI profiling. The problem shows in Server profiling and it blocks the profile on server use case. 2. Is there a work-around? If so, why do you believe the work-around is insufficient? > No. 3. Is this a regression or API breakage? Explain. > Regression of bug 277431, the function used to be working in TPTP 4.5.2.X 4. Does this require new API? > No 5. Who performed the code review? > Jonathan West, Eugene Chan 6. Is there a test case attached to the bugzilla record? > Yes, It is found by existing test case. 7. What is the nature of the fix? What is the scope of the fix? What is the risk associated with this fix? > Fixed the incorrect memory usage code is in ProfEnv.cpp and AttachEvent.cpp parts > Medium Risk, Test of patch also covered other Analysis types (Execution and Memory) 8. Is this fix related to any standards that TPTP adheres to? If so, who has validated that the fix continues to adhere to the standard? > No.
I know it's late in the game for TPTP 4.6. However, since this is a bad regression problem, I think we should get it in. We would need to run some more testing once this fix is in a build. +1
Jonathan, could you please check in the changes? Thanks!
Patch checked into HEAD w/ PMC approval.
Marking as FIXED.
close bug.