Home » Eclipse Projects » Equinox » [p2] When bundles aren't loaded
[p2] When bundles aren't loaded [message #122247] |
Fri, 05 December 2008 23:53 |
Carsten Pfeiffer Messages: 34 Registered: July 2009 |
Member |
|
|
Hi,
I've been bitten several times by the problem that some bundles are not
loaded at all. No warning, no error, just silence. The p2 UI actually shows
the bundles as being installed, but About -> Plugins doesn't list them.
Here's my findings of debugging this problem, I hope it'll be useful to
someone.
0) The bundles in question were installed via a .link file, but that's quite
the same as if they were installed via the dropins/ folder.
1) There is a directory
eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDK Profile.profile
which contains a bunch of files containing information about all installed
bundles. Only the most recent file will be used for Eclipse startup.
2) On startup, Eclipse scans the dropins/ and links folders for new content,
noting all bundles that are available there.
3) When a change is noticed in there, it creates a new profile based on the
information of the old profile and the currently available bundles.
4) Lots of constraint solving magic happens to resolve dependencies.
5) Unless the new configuration is invalid, the previous profile and the new
profile are compared in order to create the file
eclipse/configuration/org.eclipse.equinox.simpleconfigurator /bundles.info
6) This file is then used by the OSGI runtime to actually launch the
application. *Only* those bundles listed in bundles.info will ever be
loaded. Anything not listed in there will be unknown to the OSGI runtime.
So, when you're missing a bundle that is installed (look in the p2 UI), and
there's nothing in the error log, have a look at bundles.info.
If it's not there, then the reason might be that
- it was previously installed with the same version; thus is listed in the
last p2 profile
- it was removed (e.g. from the dropins or linked folder), but another
bundle is still referencing it; thus it will still be listed in the new
profile
How to fix this? Simply also remove the bundle that still references the
already removed bundle and install both of them again. Make sure to start
Eclipse once *before* installing them again, so that you get a new profile
with those bundles missing.
And what's left?
- IMHO it's a bug in the bundles.info generator, that it doesn't add a
bundle to bundles.info if it was listed in both the previous and the
current p2 profile.
- When using .link files, removing a .link file does *not* uninstall the
bundles. Only removing/renaming the directory of the actual bundles and
restarting eclipse will make them uninstall. This is a regression compared
to Eclipse <= 3.3.
- The behavior of keeping an available bundle *and* its unavailable
dependencies in the profile appears strange to me. I would at least expect
to get an entry in the log about this.
- Also the p2 UI should provide some clues (maybe together with a warning
icon), if an installed bundle is not available, or if an available bundle
has unmet dependencies.
- I didn't check this yet, but maybe this problem would have been avoided,
if we had used different version numbers (at least date/time qualifiers)
for those bundles. Maybe p2 would have realized those as different and
added them to bundles.info.
Cheers,
Carsten
|
|
|
Re: [p2] When bundles aren't loaded [message #122260 is a reply to message #122247] |
Sat, 06 December 2008 18:46 |
Eclipse User |
|
|
|
Originally posted by: nospam_kowalskilee.gmail.com
Hi Carsten,
First, thanks a lot for taking the time to write this up and post it.
The info jives with a lot of the missing-bundles symptoms bundles I am
noticing when I use the dropins folder.
I am wondering: does Eclipse really create a new bundles.info every time
it starts up (your step 5)?
Or does step 5 (creation of a new bundles.info) *only* happen if Eclipse
finds differences between the new profile and the old profile?
Thanks!
--Lee Anne
Carsten Pfeiffer wrote:
> Hi,
>
> I've been bitten several times by the problem that some bundles are not
> loaded at all. No warning, no error, just silence. The p2 UI actually shows
> the bundles as being installed, but About -> Plugins doesn't list them.
>
> Here's my findings of debugging this problem, I hope it'll be useful to
> someone.
>
> 0) The bundles in question were installed via a .link file, but that's quite
> the same as if they were installed via the dropins/ folder.
>
> 1) There is a directory
> eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDK Profile.profile
> which contains a bunch of files containing information about all installed
> bundles. Only the most recent file will be used for Eclipse startup.
>
> 2) On startup, Eclipse scans the dropins/ and links folders for new content,
> noting all bundles that are available there.
>
> 3) When a change is noticed in there, it creates a new profile based on the
> information of the old profile and the currently available bundles.
>
> 4) Lots of constraint solving magic happens to resolve dependencies.
>
> 5) Unless the new configuration is invalid, the previous profile and the new
> profile are compared in order to create the file
> eclipse/configuration/org.eclipse.equinox.simpleconfigurator /bundles.info
>
> 6) This file is then used by the OSGI runtime to actually launch the
> application. *Only* those bundles listed in bundles.info will ever be
> loaded. Anything not listed in there will be unknown to the OSGI runtime.
>
>
> So, when you're missing a bundle that is installed (look in the p2 UI), and
> there's nothing in the error log, have a look at bundles.info.
>
> If it's not there, then the reason might be that
> - it was previously installed with the same version; thus is listed in the
> last p2 profile
> - it was removed (e.g. from the dropins or linked folder), but another
> bundle is still referencing it; thus it will still be listed in the new
> profile
>
> How to fix this? Simply also remove the bundle that still references the
> already removed bundle and install both of them again. Make sure to start
> Eclipse once *before* installing them again, so that you get a new profile
> with those bundles missing.
>
>
> And what's left?
>
> - IMHO it's a bug in the bundles.info generator, that it doesn't add a
> bundle to bundles.info if it was listed in both the previous and the
> current p2 profile.
>
> - When using .link files, removing a .link file does *not* uninstall the
> bundles. Only removing/renaming the directory of the actual bundles and
> restarting eclipse will make them uninstall. This is a regression compared
> to Eclipse <= 3.3.
>
> - The behavior of keeping an available bundle *and* its unavailable
> dependencies in the profile appears strange to me. I would at least expect
> to get an entry in the log about this.
>
> - Also the p2 UI should provide some clues (maybe together with a warning
> icon), if an installed bundle is not available, or if an available bundle
> has unmet dependencies.
>
> - I didn't check this yet, but maybe this problem would have been avoided,
> if we had used different version numbers (at least date/time qualifiers)
> for those bundles. Maybe p2 would have realized those as different and
> added them to bundles.info.
>
> Cheers,
> Carsten
|
|
| | | | | | | |
Re: [p2] When bundles aren't loaded [message #524295 is a reply to message #519158] |
Wed, 31 March 2010 13:01 |
Giuseppe Montalto Messages: 18 Registered: July 2009 |
Junior Member |
|
|
Carsten Pfeiffer wrote on Sun, 07 March 2010 09:53 | lqb@yomolo.com wrote:
A new problem I noticed recently: I use one eclipse installation with
different configuration areas. Sometimes eclipse simply uses the wrong
configuration area, or at least the wrong bundles.info file, despite having
the correct -configuration commandline parameter.
See this strace excerpt:
[pid 13789]
open(" /usr/local/eclipse-3.5/configuration/org.eclipse.equinox.sim pleconfigurator/bundles.info ",
O_RDONLY|O_LARGEFILE) = 109
[pid 13789] open("/usr/local/eclipse-configurations/3.5-
extras/configuration/org.eclipse.equinox.simpleconfigurator/ bundles.info ",
O_RDONLY|O_LARGEFILE) = 109
[pid 13789]
open(" /usr/local/eclipse-3.5/configuration/org.eclipse.equinox.sim pleconfigurator/bundles.info ",
O_RDONLY|O_LARGEFILE) = 109
In line 2 it actually finds the correct bundles.info (from the 3.5-extras
directory) but afterwards it apparently decides to use the one from the base
installation.
Any ideas?
Cheers,
Carsten
|
I have experienced a similar problem too:
In my custom branded product, based on Eclipse 3.5.1 SDK and CDT, If I set
osgi.configuration.area=@user.home/my/configuration
in my configuration/config.ini file (no matter of which the above path actually is), installing something new through p2 doesn't work!
I mean:
1) I run through the "Help->Install New Software..." wizard, "Add..." a remote update site, select some features (whatever) and proceed installing them;
2) The wizard correctly asks me to restart the application;
3) after the restart, the newly installed features are not available!
if I remove the "osgi.configuration.area" key form the config.ini, all what I install actually works.
Attempting to troubleshoot this issue, I've noticed some weird things...
- "Help->About..." doesn't display any icon coming from the new features, while clicking on "Installation Details" I can see those features listed in the "Installed Software" pane but not in the "Features" and "Plug-ins" ones. Moreover, the "Configuration" pane lists them in the "Installable Units in the profile:" section, but not in the "Features" and "Plug-in Registry" sections.
- a brand new "bundles.info" file is created in "<user.home>/my/configuration/org.eclipse.equinox.simpleconfigurator/ " and it contains the reference to the plugins I installed, but it seems that the application is still using the old one.
- the new features and plugins are phisically installed under "<user.home>/my/plugins" and "<user.home>/my/features" respectively; I also find a "<user.home>/my/p2" directory tree and it contains a new profile registry. Incidentally, there is also another "artifacts.xml" there, containing references to the newly installed items only.
just for reference, that's how the "<user.home>/my/" subtree looks like:
+ my
+ configuration
+ .settings
+ org.eclipse.core.runtime
+ .manager
+ org.eclipse.equinox.app
+ .manager
+ org.eclipse.equinox.simpleconfigurator
+ bundles.info
+ org.eclipse.equinox.source
+ org.eclipse.osgi
+ .manager
+ bundles
+ ...
+ org.eclipse.update
+ platform.xml
+ features
+ ...
+ p2
+ org.eclipse.equinox.core
+ cache
+ artifacts.xml
+ org.eclipse.equinox.p2.engine
+ profileRegistry
+ SDKProfile.profile
+ ....
+ 1270029716135.profile.gz
+ org.eclipse.equinox.p2.repository
+ cache
+ plugins
+ ...
+ Artifacts.xml
Any idea on what may be wrong with my configuration?
|
|
| |
Goto Forum:
Current Time: Mon Nov 04 03:02:41 GMT 2024
Powered by FUDForum. Page generated in 0.03958 seconds
|