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

Bug 315806

Summary: Probe insertion failure in Platform.Execution.ProbeKit.JVMTI testsuite
Product: z_Archived Reporter: Samuel Wu <samwu>
Component: TPTPAssignee: Sean Lamers <slamers>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: critical    
Priority: P2 CC: jgwest, pklicnik, slamers
Version: unspecifiedFlags: kathy: pmc_approved? (oec)
ernest: pmc_approved+
kathy: pmc_approved? (kathy)
kathy: pmc_approved? (paulslau)
jgwest: pmc_approved+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
stack trace
none
error message
none
patch pklicnik: review?

Description Samuel Wu CLA 2010-06-04 13:22:36 EDT
The "EntryExit" and "Everything" test cases from the Platform.Execution.ProbeKit.JVMTI testsuite fail on 32-bit Windows XP.

Specifically, a "send error report" window pops up for javaw.exe when using the Entry/Exit/Exception probe to instrument the com.sample.test.CodeFlow class and also when using the MP/CP - Everything probe to instrument the com.sample.test.MainClass class. BCIEngProbe.dll is referenced as the source of the error in the error report.
Comment 1 Sean Lamers CLA 2010-06-04 13:29:14 EDT
This looks to be related to the compiler change from VC6 to VS2005. Specifically, the exit fragments in the probes are causing the crash (if they are removed, the probe insertion succeeds). I tried replacing the BCIEngProbe.dll in the jvmti plugin with the BCIEngProbe.dll from RC1 and the test cases succeed. When using the .dll from RC2 (after the compiler change), the test case fails.
Comment 2 Jonathan West CLA 2010-06-04 13:39:31 EDT
Raising to critical.
Comment 3 Kathy Chan CLA 2010-06-04 14:47:06 EDT
Sean, 

Please take a look at this regression for TPTP 4.7.
Comment 4 Paul Klicnik CLA 2010-06-04 15:32:06 EDT
Created attachment 171156 [details]
stack trace

I loaded the BCIEngProbe library and debugged when it crashed. Looks like the code isn't not crashing in our code. See the attached screenshot for a stack trace
Comment 5 Paul Klicnik CLA 2010-06-04 15:40:39 EDT
Created attachment 171158 [details]
error message

Interesting error message in the (second) attached screenshot. Clearly an error has occurred in the list implementation and it's logging an error message

A simple google search of "list iterator not incrementable" results is many hits. Seems as though we're somehow invalidating the iterator. According to google, VS2005 performs extra checks which prevent you from increasing an invalid iterator (which is why we're seeing this now that the compiler has been bumped up).
Comment 6 Paul Klicnik CLA 2010-06-07 11:22:09 EDT
Created attachment 171282 [details]
patch

Attaching patch. 

Jon, please review patch.
Comment 7 Jonathan West CLA 2010-06-07 11:26:47 EDT
Patch is good.
Comment 8 Paul Klicnik CLA 2010-06-07 11:40:45 EDT
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 is a regression. JVM crashes when using a probe containing an exit fragment

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 introduced by the compiler upgrade to VS2005

4. Does this require new API?
No

5. Who performed the code review?
Jonathan West

6. Is there a test case attached to the bugzilla record?
No - covered by an existing use case

7. What is the nature of the fix? What is the scope of the fix? What is the risk associated with this fix?
Root problem is the code is incrementing an iterator that was at the end of the list - the fix ensures that we never attempt to increase an iterator already at the end. Fix is contained to the code processing the exit fragments. Low risk because the fix is small and contained

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 9 Kathy Chan CLA 2010-06-07 12:03:18 EDT
Requesting PMC approval for TPTP 4.7.
Comment 10 Jonathan West CLA 2010-06-07 13:50:36 EDT
Patch checked into HEAD w/ PMC approval.
Comment 11 Sean Lamers CLA 2010-06-14 15:08:11 EDT
Verified on TPTP-4.7.0-201006081927.
Comment 12 Samuel Wu CLA 2010-06-14 15:10:38 EDT
Closing