[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] Duration for resolving uses-conflicts

Hi Dani,

thanks for your reply! I tried to distill the problem and opened a Bug here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=512166

As far as I know, when resolving bundles, the OSGI framework needs to resolve uses-conflicts [1]. As far as I could find out, this takes place in org.eclipse.osgi.internal.module.ResolverImpl.checkUsesConstraints and produces the following debug output:

[...]
[2017-02-14 11:36:18.895] Combination is not better than current best: 172>=172
[2017-02-14 11:36:18.895] [1,1,1,1,1,0,2,0,0]
[2017-02-14 11:36:18.939] Combination is not better than current best: 176>=172
[2017-02-14 11:36:18.939] [0,2,1,1,1,0,2,0,0]
[2017-02-14 11:36:18.986] Combination is not better than current best: 172>=172
[2017-02-14 11:36:18.986] Uses constraint check has timedout. Using the best solution found so far.
[2017-02-14 11:36:18.986] Best combination found: [0,0,0,0,0,0,0,0,0]


It seems that the resolver still has 172 conflicts, but could not find any better combination - so it gives up and just tries to resolve with the configuration given above. The same output should be reproducible with the setup I have attached to the Bug.

Cheers,
Stefan

[1] http://spring.io/blog/2008/11/22/diagnosing-osgi-uses-conflicts/


On 13.02.2017 21:34, dmarthaler@xxxxxxx wrote:
Hi Stefan

Could you please open a Bug on Bugzilla against 3.7.0.RC01, including a simple set-up how we can reproduce this behavior? In the best case you can attach an example which we can use to deploy and test.

Please also elaborate a bit more about your statement: "... after a certain duration the resolver gives up and just returns the configuration with the least conflicts". In my experience the bundles are resolved or fail to resolve, I don't know anything about a good or a less good conflict resolution mechanism in Virgo. So my guess is I do not fully understand what you mean by that?

Regards,
Dani


On 02/08/2017 10:04 AM, Stefan Zugal wrote:
Hi all,

I am also looking forward to Virgo 3.7.0 - thanks for all the effort! We are currently testing our software on the newest build and facing troubles with resolving bundles:

When starting Virgo with our bundles added, everything resolves fine and Virgo starts nicely. As soon as we add the Snaps plan (which we need) to the "initialArtifacts" in org.eclipse.virgo.kernel.userregion.properties, the startup hangs for 30-90 seconds and proceeds afterwards. After some digging we found out that the time is spent in resolving uses-conflicts - after a certain duration the resolver gives up and just returns the configuration with the least conflicts. These remaining conflicts seem fine enough for resolving the bundles. When the Snaps plan is not included in the initialArtifacts, also uses-conflicts can be found, but those are quickly resolved.

We found that the resolving of uses-conflicts can be turned off using option "osgi.resolver.usesMode=ignore" (however, that causes Virgo to fail at all). Does anybody have experience in debugging these uses-conflicts? As far as I understand, this is more an OSGI issue than a Virgo issue, but I hoped that perhaps someone of you might have an idea.

Cheers,
Stefan

_______________________________________________
virgo-dev mailing list
virgo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/virgo-dev

_______________________________________________
virgo-dev mailing list
virgo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/virgo-dev