Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 282531 - With IBM JRE, after re-attach, no more data is collected for methods already entered
Summary: With IBM JRE, after re-attach, no more data is collected for methods already ...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Chengrui Deng CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard: Milestone3 adopter
Keywords:
: 325539 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-06 10:41 EDT by Kathy Chan CLA
Modified: 2016-05-05 11:00 EDT (History)
7 users (show)

See Also:
kathy: pmc_approved? (oec)
kathy: pmc_approved? (chris.l.elford)
kathy: pmc_approved? (sluiman)
kathy: pmc_approved? (ernest)
kathy: pmc_approved+
paulslau: pmc_approved+
ewchan: pmc_approved+


Attachments
Patch to solve reattach crash with PerformanceExample on IBM JVM (2.53 KB, patch)
2009-07-08 09:25 EDT, Chengrui Deng CLA
chengrui.deng: review?
Details | Diff
Profilers binary files on WinXP for testing usuage (1.08 MB, application/x-zip-compressed)
2009-07-08 09:28 EDT, Chengrui Deng CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Chan CLA 2009-07-06 10:41:13 EDT
This bug is used to track the attach, re-attach problem (as detailed in bug 194081) that is specific to IBM JREs.
Comment 1 Chengrui Deng CLA 2009-07-08 09:25:59 EDT
Created attachment 141080 [details]
Patch to solve reattach crash with PerformanceExample on IBM JVM

The test case PerformanceExample will crash with IBM JVM in reattach scenario. This problem does not happen on Sun JVM. It is related with both JVM and TPTP profilers code.

In a TPTP class CThreadSet, a private list implementation is used. But when delete element from list, the delete function assert next pointer of list elements must be not NULL but does not check NULL condition in TPTP release version. Different Thread Id allocation mechanism in JVM implementation may cause this NULL pointer access.

Dear committers, please help to review the patch code. After this patch is applied in TPTP 4.5.2.1, it should be ported in TPTP 4.6.1 too.

Thanks,
Chengrui
Comment 2 Chengrui Deng CLA 2009-07-08 09:28:37 EDT
Created attachment 141081 [details]
Profilers binary files on WinXP for testing usuage

This is the profilers binary files for testing usuage.
Comment 3 Eugene Chan CLA 2009-07-08 12:14:06 EDT
(In reply to comment #2)
> Created an attachment (id=141081) [details]
> Profilers binary files on WinXP for testing usuage
> 
> This is the profilers binary files for testing usuage.
> 

The patch does not crash the IBM JRE anymore, but there is no data collected for memory analysis while data collection works fine with execution analysis.
Comment 4 Chengrui Deng CLA 2009-07-08 22:23:51 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Created an attachment (id=141081) [details] [details]
> > Profilers binary files on WinXP for testing usuage
> > 
> > This is the profilers binary files for testing usuage.
> > 
> 
> The patch does not crash the IBM JRE anymore, but there is no data collected
> for memory analysis while data collection works fine with execution analysis.
> 
Hi, Eugene,
The memory analysis problem exists in previous TPTP too. The patch just add NULL pointer conditon to avoid crash problem. I think memory analysis problem should be filed with another new bug. Since crash problem with IBM JRE has been solved, this bug should be fixed.

Thanks,
Chengrui
Comment 5 Eugene Chan CLA 2009-07-08 23:20:04 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Created an attachment (id=141081) [details] [details] [details]
> > > Profilers binary files on WinXP for testing usuage
> > > 
> > > This is the profilers binary files for testing usuage.
> > > 
> > 
> > The patch does not crash the IBM JRE anymore, but there is no data collected
> > for memory analysis while data collection works fine with execution analysis.
> > 
> Hi, Eugene,
> The memory analysis problem exists in previous TPTP too. The patch just add
> NULL pointer conditon to avoid crash problem. I think memory analysis problem
> should be filed with another new bug. Since crash problem with IBM JRE has been
> solved, this bug should be fixed.
> 
> Thanks,
> Chengrui
> 

Ok. I have opened bug 282952 for the memory problem. This patch is good for the original reattach problem. Please submit PMC approval request for inclusion in TPTP 4521.
Comment 6 Chengrui Deng CLA 2009-07-08 23:29:08 EDT
Requesting approval to include the following defect in TPTP 4.5.2.1 branch:

With IBM JRE, after re-attach, no more data is collected for methods already entered.
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=282531)

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? 
  This reattach problem is related with bug 194081. After shadow stack solution patch applied, it is found IBM JRE will crash when reattach profiling with test case PerformanceExample. The problem is related both with TPTP profilers NULL pointer check code and JRE implementation.

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. 
  No.

4. Does this require new API? 
  No.

5. Who performed the code review? 
  Eugene.

6. Is there a test case attached to the bugzilla record? 
  The test case PerformanceExample is used.

7. What is the nature of the fix? What is the scope of the fix? What is the
risk associated with this fix? 
  This fix just adds NULL pointer check conditions in class CThreadSet methods. Risk is very low.

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.
Comment 7 Kathy Chan CLA 2009-07-09 18:03:49 EDT
Requesting PMC approval for TPTP 4.5.2.1 Milestone 3.
Comment 8 Kathy Chan CLA 2009-07-10 09:05:33 EDT
Jonathan,

Please check in the patch on behalf of Chengrui.  Thanks!
Comment 9 Jonathan West CLA 2009-07-10 10:22:56 EDT
Patch checked into 4.5.2.1 w/ PMC approval.
Comment 10 Kathy Chan CLA 2009-10-16 16:49:28 EDT
Verified in consuming product.
Comment 11 Mike Reid CLA 2010-09-28 11:37:12 EDT
*** Bug 325539 has been marked as a duplicate of this bug. ***