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

Bug 317656

Summary: Error : "The copies of profile SDKProfile are not in sync."
Product: [Eclipse Project] Equinox Reporter: Kostadin Kostadinov <Kostadin.Kostadinov>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: david_williams, martin.skorsky, nboldt, nicolas.bros, pascal, romain.castell, udo.hafermann
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The log file none

Description Kostadin Kostadinov CLA 2010-06-23 03:23:38 EDT
Build Identifier: Eclipse 3.6M6 and 3.6 RC4

This problem happens also on Red Hat Enterprise 4 and Windows Vista.

I'm having the problem :

!MESSAGE The copies of profile SDKProfile are not in sync.

But I do not use anywhere the parameter :

-Declipse.p2.data.area


I tried with 3.6 M6 and RC4 and no luck.

The log file is truncated for proprietary data please be noted.

Please see the attachment file Eclipse3.6.RC4_P2_BUG_REPORT.log.

The problem is in method:
org.eclipse.equinox.internal.p2.director.SimplePlanner.createInstallerPlan(IProfile,
ProfileChangeRequest, Collection<IInstallableUnit>,
Collection<IInstallableUnit>, IProvisioningPlan, ProvisioningContext,
IProgressMonitor)

line:
475

Where you can see:
if (profile.getTimestamp() != installerProfile.getTimestamp()) {
                        IProvisioningPlan plan =
engine.createPlan(initialRequest.getProfile(), initialContext);
                        plan.setStatus(new Status(IStatus.ERROR,
DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_profile_out_of_sync,
profile.getProfileId())));
                        return plan;
                    }


The "installerProfile.getTimestamp()" returns 0 (zero value) as not initialized
perhaps.





The log is truncated for proprietary data.

Reproducible: Sometimes

Steps to Reproduce:
1.Convert and old and big plugin using :
java -jar C:\eclipse\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar 
-application org.eclipse.equinox.p2.publisher.UpdateSitePublisher 
-metadataRepository file:/..... -artifactRepository file:/....
-source C:\com.sample.plugin -publishArtifacts -compress reusePackedFiles 

2.Install it using P2 - see the log
3.Observe the error message with exit code 13 - see description of this big and the log.

I install about 5 plugins using this test case and some times the first one is installed with no problems but the other 4 doesn't at all. This bug as I reviewed the source appears to be somewhere the Agents' profile creation and is detected during install of plugin.

I also created plugin using Eclipse 3.6 M6. The plugin was very simple using the template for a sample view. This plugin is installed with no problems.
Unfortunately I cannot provide the plugins that are having this problem, bug as a last resort this could be negotiated I think. The plugins are property of our company.
NOTE: The log is truncated for proprietary data.
Comment 1 Kostadin Kostadinov CLA 2010-06-23 03:25:06 EDT
Created attachment 172483 [details]
The log file

This is log file.
Comment 2 Nick Boldt CLA 2010-06-29 16:10:54 EDT
I get this about half the time when installing b3 aggregator into classic eclipse on 32- and 64-bit linux. Here's the script / steps to repro:

http://anonsvn.jboss.org/repos/jbosstools/trunk/build/aggregate/aggregateRepos.xml
http://anonsvn.jboss.org/repos/jbosstools/trunk/build/aggregate/aggregateRepos.jbosstools.properties

To run:

svn co http://anonsvn.jboss.org/repos/jbosstools/trunk/build
cd build/aggregate
ant -f aggregateRepos.xml

   [p2.dir] Installing org.eclipse.b3.aggregator.engine.feature.feature.group 0.1.0.r01001.
   [p2.dir] Installation failed.
   [p2.dir] !SESSION 2010-06-29 12:57:52.573 -----------------------------------------------
   [p2.dir] eclipse.buildId=I20100608-0911
   [p2.dir] java.version=1.6.0_20
   [p2.dir] java.vendor=Sun Microsystems Inc.
   [p2.dir] BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
   [p2.dir] Framework arguments:  -application org.eclipse.equinox.p2.director -flavor tooling -roaming -profile SDKProfile -installIU org.eclipse.b3.aggregator.engine.feature.feature.group -destination /mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/eclipse -bundlepool /mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/eclipse -metadataRepository jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/b3.aggregator-repo-0.1.0.r01001_e36.zip!/,http://download.eclipse.org/eclipse/updates/3.6milestones/,http://download.eclipse.org/releases/helios/,jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/buckminster-repo-1.3.0.r11439_e36.zip!/ -artifactRepository jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/b3.aggregator-repo-0.1.0.r01001_e36.zip!/,http://download.eclipse.org/eclipse/updates/3.6milestones/,http://download.eclipse.org/releases/helios/,jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/buckminster-repo-1.3.0.r11439_e36.zip!/ -profileProperties org.eclipse.update.install.features=true
   [p2.dir] Command-line arguments:  -os linux -ws gtk -arch x86_64 -application org.eclipse.equinox.p2.director -consoleLog -flavor tooling -roaming -profile SDKProfile -installIU org.eclipse.b3.aggregator.engine.feature.feature.group -destination /mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/eclipse -bundlepool /mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/eclipse -metadataRepository jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/b3.aggregator-repo-0.1.0.r01001_e36.zip!/,http://download.eclipse.org/eclipse/updates/3.6milestones/,http://download.eclipse.org/releases/helios/,jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/buckminster-repo-1.3.0.r11439_e36.zip!/ -artifactRepository jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/b3.aggregator-repo-0.1.0.r01001_e36.zip!/,http://download.eclipse.org/eclipse/updates/3.6milestones/,http://download.eclipse.org/releases/helios/,jar:file:/mnt/hudson_workspace/workspace/jbosstools-3.2.0.M1.aggregate/b3aggr/p2repos/buckminster-repo-1.3.0.r11439_e36.zip!/ -profileProperties org.eclipse.update.install.features=true
   [p2.dir] !ENTRY org.eclipse.equinox.p2.director 4 0 2010-06-29 13:00:06.431
   [p2.dir] !MESSAGE The copies of profile SDKProfile are not in sync.
   [p2.dir] The copies of profile SDKProfile are not in sync.
Comment 3 Nick Boldt CLA 2010-06-29 16:30:45 EDT
Correction. Have had this happen 5 times in a row for the same director provisioning script, both in Hudson (linux 64 bit) and commandline (linux 32 bit). Not sure if it happens for Win/Mac yet.
Comment 4 David Williams CLA 2010-09-23 10:42:06 EDT
I've seen this now a couple of times in WTP builds ... not sure if there's a pattern ... busy server? busy network?
Comment 5 David Williams CLA 2010-09-23 12:19:21 EDT
Any chance this is related to exact times on multiple systems or file systems? I just ask because I've seen on the new build machine even ant copy task sometimes says "warning: you are copying a file created in the future". No idea why ... but ... thought I'd mention it.
Comment 6 Martin Skorsky CLA 2010-09-24 03:32:33 EDT
This happens when p2 is creating meta-data from a site.xml on the fly before installing IUs from a repository without p2 meta-data.
Comment 7 Romain Castell CLA 2011-02-22 08:20:38 EST
Any known workaround to this bug? I just cannot install CDT followed by RSE headlessly on Windows... I get "The copies of profile SDKProfile are not in sync." 9/10.

Thanks.
Comment 8 Kostadin Kostadinov CLA 2011-02-22 08:58:30 EST
There is no workaround.
Well for get rid of this problem:
Create a new plugin of feature using the latest Eclipse and put there all your sources from the old one.
Then repack and install it should work.
However you might need some changes to do to preserve the functionality.
Please do it carefully, I don't think  this bug will be fixed at all.
Comment 9 Romain Castell CLA 2011-02-22 13:13:38 EST
Thanks for your reply Kostadin, however I don't think this applies to what I want to achieve (which I should have made clearer)

I am using the headless software updater to prepare Eclipse with all the plug-ins required for our project. I therefore install several features in sequence into Eclipse 3.6. On Windows (never failed on linux so far), I almost always get the error this bug is about.

Installing from the GUI works fine on the same platform. Not all the features I'm after are available as archives, so getting the "stuff" without going through the Eclipse software update isn't trivial.

Any further ideas?
Comment 10 Pascal Rapicault CLA 2011-02-22 23:35:32 EST
Romain (or anybody else) could you please provide the sequence of steps that you are using to run into this issue? Also are you using the director app to install these bundles or something else? Thx
Comment 11 Romain Castell CLA 2011-02-23 06:07:00 EST
OK, here are the steps:

  - use Windows XP SP3 (I don't have this problem on linux but the platform is probably a red herring)

  - download Eclipse Classic 3.6.1

  - copy JRE 1.6.0.4 to eclipse\jre (can't be coming from this, but for completeness)

  - run "eclipse\jre\bin\java.exe -jar eclipse\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/tools/cdt/releases/helios -installIU org.eclipse.cdt.sdk.feature.group/7.0.1.201009241320" (takes forever - from Cambridge, UK - but passes)

  - run "eclipse\jre\bin\java.exe -jar eclipse\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/helios -installIU org.eclipse.rse.feature.group/3.2.1.v201008191400-7L78FA-8wqbPcNj4qa8R0eViy7vZ"

This last step will pass or fail depending on your luck.

I will try to investigate what "luck" involves...
Comment 12 Romain Castell CLA 2011-02-23 10:45:59 EST
Any recommendation as for which debug options I could use to give more useful information about this problem? Also, I'm running off a network filer, so I wouldn't trust file timestamps to be accurate. Could this be an issue?
Comment 13 Nicolas Bros CLA 2011-03-28 06:10:26 EDT
I'm also getting this error simply by doing (using Cygwin on Windows, with $ECLIPSE set to the path to eclipsec.exe):

"$ECLIPSE" -nosplash \
-application org.eclipse.equinox.p2.director \
-repository \
http://download.eclipse.org/releases/indigo/,\
http://download.eclipse.org/tools/orbit/downloads/drops/S20110304120314/repository/,\
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site,\
http://eclipse-cs.sf.net/update/,\
"jar:file:org.eclipse.releng.tools-3.7M6.zip\!/" \
-installIU \
org.eclipse.birt.feature.group,\
org.eclipse.mylyn.wikitext_feature.feature.group,\
org.eclipse.acceleo.sdk.feature.group,\
org.eclipse.m2m.atl.sdk.feature.group,\
org.eclipse.emf.cdo.sdk.feature.group,\
org.eclipse.emf.ecoretools.sdk.feature.group,\
org.eclipse.emf.sdk.feature.group,\
org.eclipse.emf.compare.sdk.feature.group,\
org.eclipse.emf.query.sdk.feature.group,\
org.eclipse.emf.validation.sdk.feature.group,\
org.eclipse.jet.sdk.feature.group,\
org.eclipse.net4j.sdk.feature.group,\
org.eclipse.ocl.all.sdk.feature.group,\
org.eclipse.m2m.qvt.oml.sdk.feature.group,\
org.eclipse.uml2.sdk.feature.group,\
org.antlr.runtime,\
org.apache.derby,\
org.apache.derby.source,\
org.apache.log4j,\
org.apache.log4j.source,\
org.apache.commons.lang,\
org.apache.commons.lang.source,\
org.apache.commons.jxpath,\
org.apache.commons.jxpath.source,\
net.sourceforge.nattable.core,\
net.sourceforge.nattable.core.source,\
org.prefuse,\
org.prefuse.source,\
org.eclipse.releng.tools.feature.group,\
org.eclipse.swtbot.eclipse.feature.group,\
org.eclipse.swtbot.feature.group,\
net.sf.eclipsecs.feature.group
Comment 14 Pascal Rapicault CLA 2011-06-12 20:04:26 EDT
I've tried to reproduce this using the last command provided and it works for me. The only way I can see this happening is if there are multiple versions of the same install of eclipse running and one of them holds an in memory cache of a profile (e.g. the install dialog is opened) while the other is being modified.

If the situation where this happens only involves one instance up and running please reopen.