Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [p2] When bundles aren't loaded
[p2] When bundles aren't loaded [message #122247] Fri, 05 December 2008 23:53 Go to next message
Carsten Pfeiffer is currently offline Carsten PfeifferFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #122284 is a reply to message #122260] Sun, 07 December 2008 20:29 Go to previous messageGo to next message
Carsten Pfeiffer is currently offline Carsten PfeifferFriend
Messages: 34
Registered: July 2009
Member
Lee Anne Kowalski wrote:

Hi Lee Anne,

> 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?

for some strange reason, Eclipse generates a new profile for me on every
start. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=250052

The file size stays the same, but the content is different (according to
diff). Might be just a different sorting, though.

The bundles.info however is not created on every start. So I assume it's
only recreated when the last and current profiles are different.

Cheers,
Carsten
Re: [p2] When bundles aren't loaded [message #122295 is a reply to message #122284] Sun, 07 December 2008 21:43 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
It would be reallly helpful if you could figure out what the differences are
or if they're really just a re-ordering. My guess is that for some reason
the dropin reconciler is forcing a reconcile because the timestamps it
records don't match with the actual folder timestamps. I'd really appreciate
if you could attach a debugger and help figure this out as from this end I'm
really just guessing.
-Simon

"Carsten Pfeiffer" <carsten.pfeiffer@gebit.de> wrote in message
news:ghhboj$16p$1@build.eclipse.org...
> Lee Anne Kowalski wrote:
>
> Hi Lee Anne,
>
>> 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?
>
> for some strange reason, Eclipse generates a new profile for me on every
> start. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=250052
>
> The file size stays the same, but the content is different (according to
> diff). Might be just a different sorting, though.
>
> The bundles.info however is not created on every start. So I assume it's
> only recreated when the last and current profiles are different.
>
> Cheers,
> Carsten
Re: [p2] When bundles aren't loaded [message #122306 is a reply to message #122295] Mon, 08 December 2008 10:30 Go to previous messageGo to next message
Carsten Pfeiffer is currently offline Carsten PfeifferFriend
Messages: 34
Registered: July 2009
Member
Simon Kaegi wrote:

Hi Simon,

> It would be reallly helpful if you could figure out what the differences
> are or if they're really just a re-ordering. My guess is that for some
> reason the dropin reconciler is forcing a reconcile because the timestamps
> it records don't match with the actual folder timestamps. I'd really
> appreciate if you could attach a debugger and help figure this out as from
> this end I'm really just guessing.

here we go. The file contents are the same, except for the timestamp of the
profile itself.

The profile is recreated when -clean is given on the commandline
(because -clean apparently deletes the cache.timestamps file, and thus the
dropins reconciler's Activator.isUpToDate() returns false.

It is also recreated whenever the platform.xml is newer than the saved
timestamp. In my case, PlatformConfiguration.configureExternalLinkSite()
always set the underlying configuration to dirty, because
findConfiguredSite() returned null. This was due to my .link file contained
the following:

path=r /usr/local/eclipse/externalplugins/eclipse3.4/eclipse

while it should have pointed to the parent folder.
PlatformConfiguration.configureExternalLinkSite() adds the eclipse/ path
itself and was then looking for a configured
site /usr/local/eclipse/externalplugins/eclipse3.4/eclipse/eclips e, which
didn't exist.

The rest of the system apparently didn't care for the extraneous eclipse/ in
the link, so everything appeared to work fine.

Cheers,
Carsten
Re: [p2] When bundles aren't loaded [message #122317 is a reply to message #122306] Mon, 08 December 2008 13:43 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Ok. Thanks Carsten for tracking this down. I can live with what you're
seeing here as this is all expected. The one remaining issue is to ensure we
have some sort of policy in place to mange the older profiles so they don't
grow to the ridiculous sizes you were mentioning. I'll also look into
avoiding writing a new profile at all in the circumstances you mention.
These are all things we're planning on doing anyway in 3.5 (likely m5) so
I'll target your bug when we get a moment.

-Simon

"Carsten Pfeiffer" <carsten.pfeiffer@gebit.de> wrote in message
news:ghit17$knp$1@build.eclipse.org...
> Simon Kaegi wrote:
>
> Hi Simon,
>
>> It would be reallly helpful if you could figure out what the differences
>> are or if they're really just a re-ordering. My guess is that for some
>> reason the dropin reconciler is forcing a reconcile because the
>> timestamps
>> it records don't match with the actual folder timestamps. I'd really
>> appreciate if you could attach a debugger and help figure this out as
>> from
>> this end I'm really just guessing.
>
> here we go. The file contents are the same, except for the timestamp of
> the
> profile itself.
>
> The profile is recreated when -clean is given on the commandline
> (because -clean apparently deletes the cache.timestamps file, and thus the
> dropins reconciler's Activator.isUpToDate() returns false.
>
> It is also recreated whenever the platform.xml is newer than the saved
> timestamp. In my case, PlatformConfiguration.configureExternalLinkSite()
> always set the underlying configuration to dirty, because
> findConfiguredSite() returned null. This was due to my .link file
> contained
> the following:
>
> path=r /usr/local/eclipse/externalplugins/eclipse3.4/eclipse
>
> while it should have pointed to the parent folder.
> PlatformConfiguration.configureExternalLinkSite() adds the eclipse/ path
> itself and was then looking for a configured
> site /usr/local/eclipse/externalplugins/eclipse3.4/eclipse/eclips e, which
> didn't exist.
>
> The rest of the system apparently didn't care for the extraneous eclipse/
> in
> the link, so everything appeared to work fine.
>
> Cheers,
> Carsten
Re: [p2] When bundles aren't loaded [message #122328 is a reply to message #122317] Mon, 08 December 2008 13:58 Go to previous messageGo to next message
Carsten Pfeiffer is currently offline Carsten PfeifferFriend
Messages: 34
Registered: July 2009
Member
Simon Kaegi wrote:

> Ok. Thanks Carsten for tracking this down. I can live with what you're
> seeing here as this is all expected. The one remaining issue is to ensure
> we have some sort of policy in place to mange the older profiles so they
> don't grow to the ridiculous sizes you were mentioning. I'll also look
> into avoiding writing a new profile at all in the circumstances you
> mention. These are all things we're planning on doing anyway in 3.5
> (likely m5) so I'll target your bug when we get a moment.

Thanks, I'm looking forward to not debugging missing bundles in 3.5 :-)

I hope you can fix the synchronization between previous profile, current
profile and bundles.info, as this seems to be the root cause for the
missing bundles.

Cheers,
Carsen
Re: [p2] When bundles aren't loaded [message #517490 is a reply to message #122247] Sun, 28 February 2010 17:30 Go to previous messageGo to next message
Ruben Perez is currently offline Ruben PerezFriend
Messages: 10
Registered: February 2010
Junior Member
I had this problem and i tried all previously explained and didn't work.... i got it working by moving the eclipse install dir from the program files folder in windows to the root, since program files folder has special rights and eclipse couldnt write on there...
Re: [p2] When bundles aren't loaded [message #519158 is a reply to message #517490] Sun, 07 March 2010 14:53 Go to previous messageGo to next message
Carsten Pfeiffer is currently offline Carsten PfeifferFriend
Messages: 34
Registered: July 2009
Member
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
Re: [p2] When bundles aren't loaded [message #524295 is a reply to message #519158] Wed, 31 March 2010 13:01 Go to previous messageGo to next message
Giuseppe Montalto is currently offline Giuseppe MontaltoFriend
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?
Re: [p2] When bundles aren't loaded [message #1790072 is a reply to message #524295] Mon, 04 June 2018 12:07 Go to previous message
Christoph Laeubrich is currently offline Christoph LaeubrichFriend
Messages: 12
Registered: September 2011
Junior Member
I have a similar problem with a custom RCP app, I can install things via P2 and see everything is downloaded, but after that the bundles are not installed (I enabled the console).
In the Installation Details I see the feature but not in plugins. Is there any way to debug this?
Previous Topic:HTTP Status 404 - ProxyServlet: /app
Next Topic:Overriding JVM packages declared in org.osgi.framework.system.packages
Goto Forum:
  


Current Time: Sat Nov 09 03:39:42 GMT 2024

Powered by FUDForum. Page generated in 0.03736 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top