Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 302580 - [planner] P2 uninstalls core plug-ins during installation of feature patch
Summary: [planner] P2 uninstalls core plug-ins during installation of feature patch
Status: RESOLVED INVALID
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-11 08:59 EST by Natalia Bartol CLA
Modified: 2010-02-16 09:27 EST (History)
1 user (show)

See Also:


Attachments
CorePluginsUnistalledTestCase (3.57 MB, application/zip)
2010-02-11 09:03 EST, Natalia Bartol CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Natalia Bartol CLA 2010-02-11 08:59:04 EST
Build Identifier: Build id: M20090211-1700

Installation of feature patch causes plug-ins like equinox.launcher or p2.reconciler.dropins to be uninstalled.

As a result configuration is broken and environment does not start.

I've tested with Eclipse 3.4 and 3.5. In both cases returned plan is incorrect.

Plan returned:

The plan:
[R]org.eclipse.core.contenttype 3.3.1.R34x_v20090604 will be replaced with
[R]org.eclipse.core.contenttype 3.3.1.R34x_v20090825-1137
[R]org.eclipse.equinox.app 1.1.0.v20080421-2006 will be replaced with
[R]org.eclipse.equinox.app 1.1.1.R34x_v20091203
[R]org.eclipse.osgi 3.4.3.R34x_v20081215-1030 will be replaced with
[R]org.eclipse.osgi 3.4.4.R34x_v20091203
[R]org.eclipse.rcp.R342patch.feature.group 1.0.4 will be replaced with
[R]org.eclipse.rcp.R342patch.feature.group 1.0.11
[R]org.eclipse.rcp.R342patch.feature.jar 1.0.4 will be replaced with
[R]org.eclipse.rcp.R342patch.feature.jar 1.0.11
[R]org.eclipse.swt 3.4.2.v3452d will be replaced with [R]org.eclipse.swt
3.4.2.v3453a
[R]org.eclipse.swt.win32.win32.x86 3.4.1.v3452d will be replaced with
[R]org.eclipse.swt.win32.win32.x86 3.4.1.v3453a
[R]org.eclipse.ui.workbench 3.4.2.M20090127-1700 will be replaced with
[R]org.eclipse.ui.workbench 3.4.2.r342_v20091113-1600
[R]bootstrap 1.0.2.3422I20090915 will be uninstalled
[R]bootstrap.categoryIU 0.0.0 will be uninstalled
config.a.jre 1.6.0 will be uninstalled
[R]org.eclipse.equinox.feature.group
3.4.1.R342_v20090126-7w7TENgETuNblxYRhBOLydU3ADDC will be uninstalled
[R]org.eclipse.launcher_eclipse.exe 1.0.0 will be uninstalled
[R]org.eclipse.launcher_eclipse.exe.eclipse 1.0.0 will be uninstalled
tooling.org.eclipse.update.feature.default 1.0.0 will be uninstalled
tooling.osgi.bundle.default 1.0.0 will be uninstalled
tooling.source.default 1.0.0 will be uninstalled
toolingorg.eclipse.equinox.launcher 1.0.101.R34x_v20081125 will be uninstalled
toolingorg.eclipse.equinox.p2.reconciler.dropins 1.0.5.v20090307-1115 will be
uninstalled
toolingorg.eclipse.equinox.simpleconfigurator 1.0.0.v20080604 will be
uninstalled
[R]toolingorg.eclipse.launcher_eclipse.exe 1.0.0 will be uninstalled


What can be seen in configuration/.log file:

!ENTRY org.eclipse.equinox.p2.reconciler.dropins 4 0 2010-02-04 18:59:39.125
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle

"reference:file:../SDPShared\plugins\org.eclipse.equinox.p2.reconciler.dropins_1.0.5.v20090307-1115.jar"
by thread

"Start Level Event Dispatcher".
       at
org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl.suspendBundle(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(Unknown
Source)
       at java.lang.Thread.run(Unknown Source)
Caused by:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
       ... 8 more
Root exception:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
       at
org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl.suspendBundle(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(Unknown
Source)
       at
org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(Unknown
Source)
       at java.lang.Thread.run(Unknown Source)

!ENTRY org.eclipse.equinox.p2.metadata.repository 4 0 2010-02-04 18:59:46.218
!MESSAGE ProvisioningEventBus could not be obtained. Metadata caches
may not be cleaned up properly.

!ENTRY org.eclipse.equinox.p2.garbagecollector 4 0 2010-02-04 18:59:46.234
!MESSAGE ProvisioningEventBus service could not be obtained,
CoreGarbageCollector will not function properly.

Reproducible: Always

Steps to Reproduce:
1. Add feature patch to dropins.
2. Start environment.
Comment 1 Natalia Bartol CLA 2010-02-11 09:03:39 EST
Created attachment 158847 [details]
CorePluginsUnistalledTestCase

Test case showing this issue attached. It contains also .opb file generated for
this case.
Comment 2 Pascal Rapicault CLA 2010-02-11 09:16:48 EST
The plan does not cause the reconciler IU to be removed, but just the CU to be changed. There are definitely some weird things going on.
I can see that you are using this on top of an install where everything is installed optionally. Could you please write the two following test cases
 - Off the shelf 3.4.2  in which you install the patch optionally.
 - Off the shelf 3.4.2 in which you install the patch not optionally.

Another interesting case would be to see what happens when you install the patch in a non-optional way.
Comment 3 Natalia Bartol CLA 2010-02-12 12:10:32 EST
I performed following tests:


Test#1: Eclipse-based product - install feature patch via UI:

Installation without any problems - just update of previous feature patch.

After restart:

configuration/.log:

java.lang.RuntimeException: Could not find framework
	at org.eclipse.equinox.launcher.Main.getBootPath(Unknown Source)
	at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
	at org.eclipse.equinox.launcher.Main.run(Unknown Source)
	at org.eclipse.equinox.launcher.Main.main(Unknown Source)

Returned provisioning plan is the same as mentioned before for installation with dropins folder, so I am not attaching new test case.


Test#2: Eclipse 3.4.2 - install feature via dropins:
(No previous version of feature patch).

Feature patch installed correctly. 

After removing feature patch from dropins and restart:

configuration/.log:

!ENTRY org.eclipse.equinox.launcher 4 0 2010-02-12 13:55:25.578
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:546)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

I've found that before installation config.ini included line:
osgi.framework=file\:plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar

after installation of patch:
osgi.framework=file\:dropins\\RCPFeaturePatch\\plugins\\org.eclipse.osgi_3.4.4.R34x_v20091203.jar

Changing this back to 
osgi.framework=file\:plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar

does not repair configuration. Unresolved bundles in configuration/.log.

So uninstallation of feature patch from dropins does not revert changes in config.ini.


Test#3: Eclipse 3.4.2 - install feature via UI:
(No previous version of feature patch).

Correct installation and uninstallation of feature patch.
in config.ini after installation:
osgi.framework=file\:plugins\\org.eclipse.osgi_3.4.4.R34x_v20091203.jar

after uninstallation:
osgi.framework=file\:plugins\\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar



So except from problems with osgi.framework in configuration file while installaing via dropins, tested feature patch is applicable for Eclipse 3.4.2. 

The problem occurs in Eclipse-based product. 


Can this weird behavior be caused by bundles org.eclipse.osgi and org.eclipse.equinox.app in feature patch?
Comment 4 John Arthorne CLA 2010-02-12 16:23:22 EST
(In reply to comment #3)
> Can this weird behavior be caused by bundles org.eclipse.osgi and
> org.eclipse.equinox.app in feature patch?

Yes. The product installer you are using does not support patching org.eclipse.osgi in this way. Various paths in the configuration are computed relative to the location of org.eclipse.osgi, so moving that bundle causes all of these relative paths to be broken. Contact the product installer team for further details. I am marking this bug as invalid.
Comment 5 Natalia Bartol CLA 2010-02-15 12:41:23 EST
(In reply to comment #4)
> Yes. The product installer you are using does not support patching
> org.eclipse.osgi in this way. Various paths in the configuration are computed
> relative to the location of org.eclipse.osgi, so moving that bundle causes all
> of these relative paths to be broken. Contact the product installer team for
> further details. I am marking this bug as invalid.

Are there any other bundles that should not be patched in this way?
Comment 6 John Arthorne CLA 2010-02-16 09:27:55 EST
(In reply to comment #5)
> Are there any other bundles that should not be patched in this way?

I don't know. I suggest asking further questions about how patches are treated by Installation Manager directly to the IM team. In the Eclipse platform's normal usage of p2 there are no such limitations.