[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 09:12 PM, ali_anwar wrote:
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.


When the repository is fetched from the basicGetRepository(location), the repository's state is being displayed as initialized. That is why "artifactRepository" was not reloaded.

So the question is why sometimes the repository is fetched via
basicGetRepository(location) and why not?



The exact reason is that the extension location repos are not kept in sync after the garbage collector is invoked. The state of repo is marked as initialized but it is not up to date. I verified this by forcing "ensureInitialized ()" to load repo even if the state of extension repo is marked as initialized.

What is the best place to re initialize/load the repo after the garbage collection?

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:
"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