Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326682 - simpleconfigurator.Activator.start() does not start after update
Summary: simpleconfigurator.Activator.start() does not start after update
Status: CLOSED DUPLICATE of bug 329583
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 11:04 EDT by Andrew Mak CLA
Modified: 2010-11-11 17:05 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mak CLA 2010-09-30 11:04:31 EDT
Our adopter product is built on eclipse 3.6.x.  We are seeing the following exception in the log after an update from 3.6 to 3.6.1:

org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.simpleconfigurator.Activator.start() of bundle org.eclipse.equinox.simpleconfigurator.
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(Unknown Source)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(Unknown Source)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
	at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:71)
	at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
	at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
	at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Unknown Source)
	... 12 more

This exception in turns affect the startup of other plugins in the product.  A search of bugzilla turned up bug 294834 which reports the same exception in a slightly different scenario.  In that bug it was suggested that the problem might be due to the existence of 2 system bundles.  In our product we can indeed find the following bundles:

org.eclipse.osgi_3.6.0.v20100517.jar
org.eclipse.osgi_3.6.1.R36x_v20100806.jar

We tried deleteing the older bundle but that caused the product to fail to start entirely.
Comment 1 DJ Houghton CLA 2010-09-30 11:56:06 EDT
How are you performing the update? Via the UI? Through the drop-ins folder? etc.
Comment 2 Andrew Mak CLA 2010-09-30 15:28:17 EDT
Hi, I've received further information about the problem.  It seems like it might be permissions related.  Here is the scenario:

1.  The product is started as non-admin user.  As non-admin does not have write permission to install_dir, it saves the eclipse configuration under $HOME/.eclipse

2.  The product is updated using IBM Installation Manager.

3a. Starting the updated product as admin user, the exceptions do not occur.

3b. Starting the updated product as non-admin user, the Eclipse configuration under $HOME/.eclipse need to be refreshed but somehow it cannot.  If we delete $HOME/.eclipse first, the the startup seems to be ok.
Comment 3 Andrew Mak CLA 2010-10-14 16:01:05 EDT
Hi, did the information in comment #2 shed any light on the issue?  For scenario 3b, is deleting the .eclipse folder something the user is expected to do?  Thanks.
Comment 4 Andrew Mak CLA 2010-10-20 16:41:08 EDT
Hi, is there any update?
Comment 5 DJ Houghton CLA 2010-11-04 17:27:22 EDT
We have debugged this problem further and know what is going on. It is unclear why this is happening though so further investigation is required.

When we are in shared mode and the user does something which adds content to the config.ini file, a config.ini file is written in the user's local config area and it should contain a pointer to the shared location's config.ini file, as well as any new data. It should NOT continue everything from the shared area or be a copy of it, but this seems to be the case in your situation. 

I will investigate further why this is happening.

In the meantime I was able to get the user's install to start correctly and recognize the update to 3.6.1 by editing the config.ini file in the user area and removing unnecessary entries like osgi.bundles, osgi.framework, etc.
Comment 6 DJ Houghton CLA 2010-11-05 15:30:45 EDT
Your osgi.bundles list in your config.ini in the shared area has the org.eclipse.equinox.event bundle listed. Is this something that p2 has done or something that the installer did?
Comment 7 Nicolas Bros CLA 2010-11-08 07:52:04 EST
Hi, suddenly I am getting the same error in the MoDisco build on hudson.eclipse.org :
java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change

What I find strange, is that Buckminster (which is started as an headless Eclipse) is called several times (for setpref, import, resolve, build, junit, perform), and it fails only on "junit".

I looked in the hudson workspace, and Buckminster hasn't even created the junit workspace.

I am seeing the error message in the main workspace:
https://hudson.eclipse.org/hudson/job/modisco-nightly/ws/buildroot/buckminster.workspace/.metadata/.plugins/org.eclipse.pde.core/AllTests/1289212644797.log
Comment 8 DJ Houghton CLA 2010-11-11 15:28:26 EST
(In reply to comment #6)
> Your osgi.bundles list in your config.ini in the shared area has the
> org.eclipse.equinox.event bundle listed. Is this something that p2 has done or
> something that the installer did?

I talked to the install team and the event bundle is being added to the osgi.bundles list by the installer. That being said, p2 still needs to be able to handle extra bundles on that list.
Comment 9 DJ Houghton CLA 2010-11-11 17:05:07 EST
The start() method won't complete because we detect a difference between the framework version in the user area and the one in the shared area. I'm going to mark this as a dup of bug 329583 and we can track progress there.

Nicolas, I'm not sure how the Hudson and Buckminster interact with each other. I would recommend opening a bug with those teams or opening a new one against p2 and getting someone from there to comment further so we can investigate. Do you have the name of a contact person there? Would that be Thomas Hallgren?

*** This bug has been marked as a duplicate of bug 329583 ***