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

Bug 186639

Summary: Sometimes both datacollectors show up when using IAC
Product: z_Archived Reporter: Navid Mehregani <nmehrega>
Component: TPTPAssignee: amehrega
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: ewchan, jkubasta, lizdancy
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460
Attachments:
Description Flags
Patch none

Description Navid Mehregani CLA 2007-05-11 15:19:08 EDT
Sometimes both datacollectors show up in the profiling launch configuraiton when using IAC.  On further investigation, Ali discovered that the Agent Controller sometimes returns an empty string for its JVM version.  This is then cached on the client side and the two datacollectors always show up.  This shouldn't be cached. Perhaps another defect should be opened against AC for returning an empty string for its JVM version.
Comment 1 amehrega CLA 2007-05-11 15:38:35 EDT
This if condition in JVMVersionDetector should also check to make sure that version.getLength() > 0

if (node != null && node.isConnected() && 
    node.getConnection().getPort() == port && host.equals(node.getName()) && 
    version != null)

This is something that should go into i4.  I'll ask for approval when the time comes.
Comment 2 amehrega CLA 2007-05-16 23:57:59 EDT
Hi Joanna,

Can you please approve this defect for i4?  Although it's a major defect I think it should be treated as P2.  There are cases where users will see both Java profiling data collectors if there are errors in retrieving the JVM version.  In the case of an error, an empty string representing the JVM version is cached and the user will always see both data collectors throughout an IAC session.

I would like to modify the code so as to avoid caching an empty string.  This will ensure that the launch configuration will re-attempt in determining the JVM version when the user opens the dialog.  
Comment 3 jkubasta CLA 2007-05-18 08:34:00 EDT
I approve inclusion in i4 given a successful code review
Comment 4 amehrega CLA 2007-05-18 14:46:00 EDT
Created attachment 67846 [details]
Patch
Comment 5 amehrega CLA 2007-05-18 14:49:18 EDT
Eugene and Navid,

Can you please review the attached patch and test to make sure that it works under different scenarios.  I have removed the caching mechanism for determining the JVM version and removed redundant calls to JVMVersionDetector.

I would appreciate it if you can review the patch and get back to me early next week.

Thanks.
Comment 6 Eugene Chan CLA 2007-05-23 11:37:36 EDT
I do not see the problem with the patch, but I see both collectors shown when secure connection failed upon opening of launch configuration tab. However, when user select a valid collector and continue with correct id and password, profile continues successfully. Maybe we can improve the usability by not showing any collector upon connection failure but shown an error message in the tree instead and ask user to try reconnect again.

I reviewed the patch and it looks good to me.
Comment 7 Navid Mehregani CLA 2007-05-23 12:08:38 EDT
Empty string doesn't seem to be cached anymore.
Comment 8 amehrega CLA 2007-05-23 12:17:53 EDT
Fix in CVS - HEAD.
Comment 9 Eugene Chan CLA 2007-06-01 16:33:39 EDT
The problem is back in the tptp.sdk-TPTP-4.4.0-200705310943 build. =(
Remote profile from XP on XP.
Comment 10 Eugene Chan CLA 2007-06-01 16:35:58 EDT
It looks like both TI and PI collector are associated with JRE 1.5 as I don't get both of them when having remote machine's RAC setup with JRE 1.4
Comment 11 Eugene Chan CLA 2007-06-01 18:02:53 EDT
It seems to be a delay problem with remote connection while firewall dialog slower the response between the hosts. 
Comment 12 Paul Slauenwhite CLA 2009-06-30 13:50:26 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.
Comment 13 Paul Slauenwhite CLA 2009-06-30 13:57:10 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.