felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Watson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5648) ResolverImpl infinite loop
Date Mon, 29 May 2017 17:50:04 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16028537#comment-16028537
] 

Thomas Watson commented on FELIX-5648:
--------------------------------------

Equinox does first try to resolve all the bundles in one resolve operation where each resource
is considered a optional resource in the resolve operation such that the resolver will try
to resolve as many as possible.  But this usually results in a much larger problem set for
the resolver to deal with and it may lead to more situations where the resolver seems to take
forever.

We do implement a timeout, but when it timesout we revert back to attempting to resolve bundles
one bundle at a time which usually can result in the resolve operation completing.  This does
give the resolver less options and can result in unresolvable bundles which would have resolved
with one big resolve.  It is unclear how equinox would resolve this faster than felix.  One
thought is that the order equinox resolves the bundles may be slightly different which allows
the resolver to take more optimal path to resolution.  In Equinox you could try to disable
the big bundle resolve with the following framework launch option, just in case that is what
leads to the endless resolve:

equinox.resolver.revision.batch.size=1

If this leads to an endless resolve then it would point to resolving bundles one at a time
causes the issue.

> ResolverImpl infinite loop
> --------------------------
>
>                 Key: FELIX-5648
>                 URL: https://issues.apache.org/jira/browse/FELIX-5648
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework, Resolver
>    Affects Versions: framework-5.4.0, framework-5.6.0, framework-5.6.4, resolver-1.14.0
>         Environment: java 1.8
> win10
> bndtools 3.4.0
>            Reporter: Stefan bischof
>            Priority: Blocker
>
> If i run the following bundles felix did not start properly.. cpu went up. nothing happened.
> equinox can handle it
> JaxpXercesXalanBatic.bndrun:
> -runbundles: \
>     my.sandbox.batikonly;version=snapshot,\
>     org.apache.felix.scr;version='[2.0.6,2.0.7)',\
>     org.apache.felix.configadmin;version='[1.8.12,1.8.13)',\
>     org.apache.felix.gogo.command;version='[0.16.0,0.16.1)',\
>     org.apache.felix.gogo.runtime;version='[0.16.2,0.16.3)',\
>     org.apache.felix.metatype;version='[1.1.2,1.1.3)',\
>     org.apache.servicemix.bundles.batik;version='[1.9.0,1.9.1)',\
>     org.apache.servicemix.bundles.bcel;version='[5.2.0,5.2.1)',\
>     org.apache.servicemix.bundles.xalan;version='[2.7.2,2.7.3)',\
>     org.apache.servicemix.bundles.xerces;version='[2.11.0,2.11.1)',\
>     org.apache.servicemix.bundles.xmlresolver;version='[1.2.0,1.2.1)',\
>     org.apache.servicemix.specs.jaxp-api-1.4;version='[2.7.0,2.7.1)'
> if i remove
> org.apache.servicemix.bundles.batik;version='[1.9.0,1.9.1)',\
> it will work.
> I debugged the bnd launcher
> Launcher asks the deprecated PackageAdmin
> // Get the resolved status
> if (padmin != null && padmin.resolveBundles(null) == false) {
> From here it is felix
> there is a loop at:
> ResolverImpl.resolve(ResolveContext, Executor) line: 347    
> ResolverImpl.resolve(ResolveContext) line: 158    
> StatefulResolver.resolve(Set<BundleRevision>, Set<BundleRevision>) line:
431    
> Felix.resolveBundles(Collection<Bundle>) line: 4070    
> FrameworkWiringImpl.resolveBundles(Collection<Bundle>) line: 133    
> PackageAdminImpl.resolveBundles(Bundle[]) line: 263    
> Launcher.update(long) line: 472    
> Launcher.activate() line: 400    
> Launcher.run(String[]) line: 283    
> Launcher.main(String[]) line: 138    
> https://github.com/JohneDoe/Jasperreport-Osgi/tree/master/my.sandbox.batikonly
> https://groups.google.com/forum/#!topic/bndtools-users/CoTHIy5ONgQ



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message