[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Problems with boostrap installs, mysterious missing jars, and checkCertificates errors.

On 01/01/2013 06:41 PM, ali_anwar wrote:
On 12/28/2012 12:44 PM, ali_anwar wrote:
I have debugged the reported scenario. Following is my finding:

1. The IU is not downloaded as CollectAction > collect( ) function
reported that aggregatedRepositoryView.contains(key), so
ArtifactRepositoryManager.NO_ARTIFACT_REQUEST was returned.

Further debugging revealed that the issue is reproducible only when the aggregatedBundleRepository is fetched from the "result = basicGetRepository(location);". Following is the debug stack:

ArtifactRepositoryManager(AbstractRepositoryManager).loadRepository(URI,
IProgressMonitor, String, int) line: 634
ArtifactRepositoryManager.loadRepository(URI, int, IProgressMonitor)
line: 104
ArtifactRepositoryManager.loadRepository(URI, IProgressMonitor) line: 100
Util.getAggregatedBundleRepository(IProvisioningAgent, IProfile, int)
line: 135
Util.getAggregatedBundleRepository(IProvisioningAgent, IProfile) line: 96
CollectAction.collect(IProvisioningAgent, IProfile, IInstallableUnit)
line: 74
CollectAction.execute(Map) line: 33
Collect(Phase).mainPerform(MultiStatus, EngineSession, Operand[],
SubMonitor) line: 174
Collect(Phase).perform(MultiStatus, EngineSession, Operand[],
IProgressMonitor) line: 92
PhaseSet.perform(EngineSession, Operand[], IProgressMonitor) line: 47
Engine.perform(IProfile, IPhaseSet, Operand[], ProvisioningContext,
IProgressMonitor) line: 75
Engine.perform(IProvisioningPlan, IPhaseSet, IProgressMonitor) line: 44
[snip]


I think that while getting the repository the p2-director is not updating the repository info whereas the repository has changed.

During the normal execution the "*/.eclipseextension" repository is not
found by basicGetRepository(location) and hence we load it manually and
add the repository later in the following function:

s/load it manually and add the repository later in the following function:/load it and add the repository later in the same function at:


"ArtifactRepositoryManager(AbstractRepositoryManager).loadRepository(URI, IProgressMonitor,
String, int) line: 657". After which the artifact.xml/content.xml file
is updated at in the repository and everything works fine.

2. Sometimes the issue is not reproducible specially when I am
debugging. So I am pretty sure it is some kind of race condition as
Carlos mentioned. I am using Ubuntu 12.04 32-bit and it was reproducible
on Windows as well.

I am new to p2 stuff and I have a very basic question, AFAIU
aggregatedRepositoryView.contains(key) means that we already have this
item in cache, right? Where is p2-cache located?

I will keep debugging and will let you know if I determine the exact
cause of the issue.

Thanks,
-Ali

-------------------------------------
Pascal,

Thanks for the help.

The more I work with p2 the clearer things become, but
a pointer or two like this is really invaluable when
starting to debug a problem.

Cheers,
Carlos.

On 10/27/2012 3:02 PM, Pascal Rapicault wrote:
Since you seem to think that the missing file should have been
downloaded, the first thing is to see why it has not been and why it
has not failed. To see what is going on try putting a breakpoint in:
      DownloadManager#start(...) - This is the method that is
responsible for downloading all the necessary artifacts.
      SimpleArtifactRepository#downloadArtifact( ) - This method is
where the actual download is happening.

HTH

Pascal

-----Original Message-----
From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx]
On Behalf Of Carlos O'Donell
Sent: October-27-12 12:35 PM
To: P2 developer discussions
Subject: [p2-dev] Problems with boostrap installs, mysterious missing
jars, and checkCertificates errors.

p2,

Our product upgrade process consists of using the p2 director to tear
down an existing install and then install the new version of our root
IU.

Recently I've started seeing the following failure during the install
process:
~~~
!ENTRY org.eclipse.equinox.p2.engine 4 4 2012-10-27 12:16:57.109
!MESSAGE An error occurred during the
org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2012-10-27 12:16:57.109
!MESSAGE session context was:(profile=SGXXProfile,
phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust,
operand=, action=).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2012-10-27 12:16:57.109
!MESSAGE Error reading signed content.
!STACK 0
java.io.IOException: The file
"C:\Users\carloso\MentorGraphics\Support\CB-1602\install03\eclipse\plugins\gnu.io.rxtx_2.1.7.4_v20071016.jar"

does not exist
      at
org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.<init>(ZipBundleFile.java:61)


at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.<init>(ZipBundleFile.java:55)


at org.eclipse.osgi.internal.signedcontent.SignedBundleHook.getSignedContent(SignedBundleHook.java:253)


at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.checkCertificates(CertificateChecker.java:73)


at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.start(CertificateChecker.java:54)


at org.eclipse.equinox.internal.p2.engine.phases.CheckTrust.completePhase(CheckTrust.java:50)


at org.eclipse.equinox.internal.p2.engine.Phase.postPerform(Phase.java:241) at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:98) at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:47)

      at
org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:75)
      at
org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
      at
org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:41)


at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:23)


at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.executePlan(DirectorApplication.java:767)


at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.planAndExecute(DirectorApplication.java:760)


at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:747)


at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1040)


at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:1222)


at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)


at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)


at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)


at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)


at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414) ~~~

It's true, the file's not there, but that's because it seems like p2
didn't install it and we got to running checkCertificates on a file
that wasn't yet installed. We're using platform 3.8.1.

I've seen this issue before and it appears to be a race, and depending
on the OS it might not reproduce.

Has anyone else seen something like this?

Any pointers on where to start digging?

Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@xxxxxxxxxx
carlos@xxxxxxxxxxxxxxxx
+1 (613) 963 1026
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev




Thanks, -Ali _______________________________________________ p2-dev mailing list p2-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/p2-dev