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

Bug 239449

Summary: [ui] Unstable behaviour of p2 while refreshing update sites
Product: [Eclipse Project] Equinox Reporter: Alexander Gurov <a.gurov>
Component: p2Assignee: Susan McCourt <susan>
Status: RESOLVED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: simon_kaegi, susan
Version: 3.4   
Target Milestone: 3.4.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 233229    
Bug Blocks: 239422    
Attachments:
Description Flags
Only one feature is shown
none
Only two features are shown
none
All features are shown after pressing Refresh none

Description Alexander Gurov CLA 2008-07-03 10:32:17 EDT
Created attachment 106439 [details]
Only one feature is shown

Short description:
Not all features are shown after update site content is refreshed.

Steps to reproduce:
1) Install two of Subversive features from the Ganymede Update site (SVN Team Provider and JDT Ignore Extensions)
2) Restart as requested by Eclipse Platform
3) Add http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ and try to expand it.

Result: in most cases not all features are present. After pressing Refresh button in most cases all features are shown correctly. 
Screenshots to follow.

P.S.
The fact is that such behaviour is totally unexpected - sometimes that happens, sometimes not, but in any case it is reproducable. Such behaviour makes users to be confused because they simply don't get what's going wrong and why the selected features sometimes cannot be installed.
Comment 1 Alexander Gurov CLA 2008-07-03 10:33:00 EDT
Created attachment 106440 [details]
Only two features are shown
Comment 2 Alexander Gurov CLA 2008-07-03 10:34:37 EDT
Created attachment 106441 [details]
All features are shown after pressing Refresh
Comment 3 Susan McCourt CLA 2008-07-03 13:41:38 EDT
Alexander, In the first screen cap, both checkboxes are checked (show latest + include items that are installed).  Same in the second picture.  But in the third, the "show latest" is no longer checked.  I assume you unchecked it and refreshed again?

Since the "include items that are installed" is also checked, could you attach a snap of what is installed while all this is happening?  

Is it possible that something was being uninstalled during this time?  If your install has changed during these refreshes, then the list would definitely change.  

>Such behaviour makes users
>to be confused because they simply don't get what's going wrong and why the
>selected features sometimes cannot be installed.

Just to clarify.  Your comment above sounds as if in some cases you saw features and could select them and they could not be installed?  Or did you mean that since they are not shown they obviously cannot be installed.

I'll work this scenario from my end, also, but more detail about your install would help.  Also, which build are you running?
Comment 4 Susan McCourt CLA 2008-07-03 15:13:12 EDT
I can reproduce this on the latest build (20080702) without having installed anything first.  I connected to the site and saw about 5 features, then when I checked the "Include items installed" I saw the full list as in snap shot #3.  Will investigate.
Comment 5 Alexander Gurov CLA 2008-07-04 03:48:00 EDT
(In reply to comment #3)
> Alexander, In the first screen cap, both checkboxes are checked (show latest +
> include items that are installed).  Same in the second picture.  But in the
> third, the "show latest" is no longer checked.  I assume you unchecked it and
> refreshed again?
> Since the "include items that are installed" is also checked, could you attach
> a snap of what is installed while all this is happening?  
> Is it possible that something was being uninstalled during this time?  If your
> install has changed during these refreshes, then the list would definitely
> change.  
None of Subversive connectors had been installed when I made these screenshots. Also I didn't touch checkboxes, just pressed Refresh button.

> Just to clarify.  Your comment above sounds as if in some cases you saw
> features and could select them and they could not be installed?  Or did you
> mean that since they are not shown they obviously cannot be installed.
> I'll work this scenario from my end, also, but more detail about your install
> would help.  Also, which build are you running?
I cannot select required features because they are absent. Refresh button helps in most cases, but not always.
Eclipse build is I20080617-2000.
Comment 6 Susan McCourt CLA 2008-07-07 17:48:19 EDT
Hmmm...today I haven't been able to reproduce this problem.  I've also noticed that the expansion of the repo seems a lot faster today than it did when I first looked at it.  I started from a clean Eclipse to ensure there was not a cache of the content lying around.

In discussing the problem with Simon, he thinks that this could be caused by bug 233229.  
Comment 7 Alexander Gurov CLA 2008-07-08 03:55:34 EDT
>In discussing the problem with Simon, he thinks that this could be caused by
>bug 233229.
Yes, looks very close to bug 233229. And one more problem looks close to this bug: features sizes are readen asynchronously and in most cases this process takes much more time to complete than is required for user to finally press Install button. This mean that reading of feature sizes have no sense if user can't see them just in time. Do you think we should open another bug report for this or add this description to bug 225759?
Comment 8 Susan McCourt CLA 2008-07-08 14:50:12 EDT
>Do you think we should open another bug report for
>this or add this description to bug 225759?

I opened bug 240055 for this.  I think the other bug should focus on the metadata and computation surrounding size vs. the presentation of it.
Comment 9 Susan McCourt CLA 2008-07-08 14:59:52 EDT
I'm marking this bug as dependent on bug 233229 rather than duplicating it since it has specific scenarios.  

Alexander, do you run/test in a self hosted environment?  If so, you could run the patch from bug #233229 and see if the "reload detect" info is printed out whenever you observe the bug.  That would help to prove that this is caused by the thread safety issue.  Otherwise we could prepare a patched bundle to install into 3.4...
Comment 10 Susan McCourt CLA 2008-08-11 17:30:58 EDT
Alexander, are you seeing this problem anymore?
The thread fix was released into the 3.5 stream on 7/16.
I just tried the scenario several times by unzipping a fresh M1 candidate (I20080806-0815) and adding the site.  Each time I would see the full list of features in each category, and if I refresh (using the refresh button, or the checkboxes), I'd get the same content.

I think we can close this based on the fix for bug #233229, but I'd like to get your confirmation since I had trouble reproducing the problem several days after first seeing it.
Comment 11 Alexander Gurov CLA 2008-08-12 04:53:31 EDT
Hello Susan, 

I've checked 3.5M1 and now I'm sure that the problem is solved in this Eclipse Platform version. Thank you for your help. 
I hope this fix also will be released into the Ganymede 3.4.1. :)
Comment 12 Alexander Gurov CLA 2008-08-12 05:05:10 EDT
But with this build I got another one error when I tried to install Subversive. It looks like:

Cannot complete the request.  See the details.
Unsatisfied dependency: [org.eclipse.team.svn.feature.group 0.7.2.I20080801-1500] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.compare/[0.0.0,1.0.0)
Unsatisfied dependency: [org.eclipse.team.svn.feature.group 0.7.2.I20080801-1500] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ui.editors/[0.0.0,1.0.0)
...........

We have the following section in our feature.xml:

   <requires>
      <import plugin="org.eclipse.core.resources"/>
      <import plugin="org.eclipse.core.runtime"/>
      <import plugin="org.eclipse.team.core"/>
      <import plugin="org.eclipse.ui.ide"/>
      <import plugin="org.eclipse.ui.views"/>
      <import plugin="org.eclipse.jface.text"/>
      <import plugin="org.eclipse.ui.workbench.texteditor"/>
      <import plugin="org.eclipse.ui.editors"/>
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.team.ui"/>
      <import plugin="org.eclipse.compare"/>
      <import plugin="org.eclipse.osgi"/>
      <import plugin="org.eclipse.help"/>
      <import plugin="org.eclipse.ui.console"/>
   </requires>


Could you please provide some comments? Do you think this problem related to p2 or not? If it is a p2 problem should I open new bug report or not? If this is not a p2 problem then how we can check what is going wrong at install time?
Comment 13 Susan McCourt CLA 2008-08-12 11:13:14 EDT
>I hope this fix also will be released into the Ganymede 3.4.1. :)
Yes, this fix has recently been committed to the 3.4.1 maintenance stream.

I'll close this bug as a duplicate of bug #233229 now that we've verified that this indeed caused/fixed the problem.

As for the other problem, there's a mismatch in required versions.  The current versions of org.eclipse.ui.editors and org.eclipse.compare are 3.4xxx versions, and it seems that the subversive feature is requiring a different range (0.0.0->1.0.0).  Usually this problem results from the way something was configured rather than a p2 bug.

Unfortunately, this is a bit out of my area of expertise as far as why this happens.  It could be a problem in the way the feature was specified or it could be a problem with the default metadata generation, or it could be something in the way PDE built the feature description. 

Simon, do you have any thoughts on this before I tell Alexander to open a new bug?   



*** This bug has been marked as a duplicate of bug 233229 ***
Comment 14 Simon Kaegi CLA 2008-08-12 11:26:46 EDT
We're investigating the 0->1 problem in bug 243422. Current thinking is that it a regression from the 3.4 behavior may have been introduced. Alexander you might want to add yourself to that bug.
Comment 15 Susan McCourt CLA 2008-08-12 13:39:04 EDT
thanks for the info, Simon.