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

Bug 315777

Summary: [Heap Instance Collection] Prevent HeapObjectData from tracking itself
Product: z_Archived Reporter: Mike Reid <mikereid>
Component: TPTPAssignee: Mike Reid <mikereid>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: normal    
Priority: P2 CC: analexee, asaf.yaffe, jcayne, jgwest, yunan.he
Version: unspecifiedFlags: kathy: pmc_approved? (oec)
kathy: pmc_approved? (ernest)
kathy: pmc_approved+
kathy: pmc_approved? (paulslau)
jgwest: pmc_approved+
jcayne: review+
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to filter out HeapObjectData none

Description Mike Reid CLA 2010-06-04 10:54:42 EDT
Depending on active collection filters, the heap instance data collector (bug 313987) may try to track itself, resulting in a NullPointerException to stderr.
Comment 1 Mike Reid CLA 2010-06-04 11:00:35 EDT
Created attachment 171107 [details]
Patch to filter out HeapObjectData

Attached patch which short-circuits the request to track an object if the object is the HeapObjectData.class instance itself.
Comment 2 Joel Cayne CLA 2010-06-04 14:01:05 EDT
Patch looks good.
Comment 3 Kathy Chan CLA 2010-06-04 14:26:22 EDT
Mike, 

Please fill in the PMC template to request this for TPTP 4.7.
Comment 4 Mike Reid CLA 2010-06-04 14:45:36 EDT
Requesting PMC approval:

   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?

When running with Heap Instance Data collection, certain filter sets will result in a NullPointerException being logged to stderr of the process being profiled.

   2. Is there a work-around? If so, why do you believe the work-around is insufficient?

None other than to use a filter set where this will not happen. However, it is not within user's knowledge to know what filter set to choose; additionally a filter which is a legitimate use case can cause this exception.

   3. Is this a regression or API breakage? Explain.

Not a regression, this occurs in new functionality.

   4. Does this require new API?

No.

   5. Who performed the code review?

Joel Cayne

   6. Is there a test case attached to the bugzilla record?

No.

   7. What is the nature of the fix? What is the scope of the fix? What is the risk associated with this fix?

Fix simply short circuits heap instance tracking when the tracked object is the heap instance collector itself. Scope is limited to the case where heap instance collection is enabled. Low risk.

   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?

N/A.
Comment 5 Kathy Chan CLA 2010-06-04 15:59:25 EDT
Requesting PMC approval for TPTP 4.7.
Comment 6 Jonathan West CLA 2010-06-04 17:00:47 EDT
Patch checked into HEAD.
Comment 7 Kathy Chan CLA 2011-02-11 13:46:18 EST
This defect had been resolved as FIXED for more than 1 month.  Please verify with the latest TPTP 4.7.2 driver.  If this defect is still left unverified by February 25, we'll close it on the originator's behalf.

TPTP 4.7.2 driver can be downloaded from:

http://www.eclipse.org/tptp/home/downloads/?ver=4.7.2
Comment 8 Mike Reid CLA 2011-04-04 10:59:45 EDT
Closing.