-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolver runs in circles till it eats all the memory #4172
Comments
After comparing a few resolver logs I may have found some clues. The resolver stumbles seems to run circles with requirements for the package org.osgi.util.function and org.osgi.util.promise because they are included and exported in a lot of bundles. I've seen thousends of entries with:
|
I've got my issues resolved, by systematically blacklisting bundles that cause the errors from above. Right now, the log is a bit hidden and it is quite cumbersome to find the offending bundles in the mass of log entries. At the moment the wizard comes up, when the resolve job finished with any kind of result. I'd like to change this and want to get the wizard up, while the job is running, With this, we can show such messages directly to the user. If I can get the information via the |
@bjhargrave could you assign the issue to me? |
I think the approach should be to sort the candidates we provide from the context to the resolve. Could we come up with some heuristic that puts the official bundle at the front and the alternatives at the back? If you're not extremely careful, blacklisting quickly make the resolver deteriorate into assembling a plain old -runbundles :-( Just way slower. |
@pkriens I would prefere a automated solution as well, but giving additional statistics, a human can read and understand would help as well. If we provide such information, we can aether solve it via deny listing the bundles or even better throw out the offending dependencies at all. In my cases they have been there by accident anyway. |
I plan setting my resident astro physics phd up, so she can analyse the issue. She is the right person to come up with heuristics for this. |
👍 I'd like to add to this wish list:
|
If we make the window non-modal we could even start multiple resolutions. |
Just adding a couple more data points to this: Like @juergen-albert suggested, I think this issue occurs when you have multiple bundles exporting the same or nearly the same set of bundles. One clear case where I keep stumbling into this is when trying to resolve a runtime for iDempiere. There are at least two different pairs of culprits:
The interesting thing is that although the resolver takes a long time to resolve the full set of runbundles (I've actually never seen it finish), when you start the framework with the manually-entered list of runbundles it starts normally & quickly. |
Maybe this is related: https://issues.apache.org/jira/browse/FELIX-6358 Short summary: The same bundle from two repositories (in the given case with different jar names) caused the resolver to run in circles. If the same thing happens all the time 2 identical bundles from different repositories are around we could have another candidate. BTW: Usually I try to solve this issue by removing one of the candiates from the repositories or if this is not possible, by blacklisting one in the bndrun. In my case one came from p2 and one as a transitive dependency of a BOM so black listing is the only option. I tried to put the GAV in the bnd.identity but that did not work. BSN and Version is no option, because then I would blacklist both bundles. Any idea? |
Strangely, I am debugging a fix for this problem right now! The specific issue I am working in is the same exact file visible from multiple repositories. That is, the Resource objects are
|
See #4409 for a resolve context fix about duplicate capabilities. This will help when the resources are equal such an index of .m2 and a maven ImplicitFileSetRepository. |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Bnd/Bndtools or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request. |
Taking the discussion from #4154 to a new Bug, so we can look at this independently. This may end up becoming a bug for the resolver, but we can do the analysis first.
The current assumption is, that the resolver tears itself apart, when
a. it has two many candidates for certain requirements
b. the Repositories have Artifacts with "unclean" Metadata (like Require Bundle)
An example of a failing resolve is: https://gitlab.com/gecko.io/geckoEMF-Tooling/-/tree/failing_resolve
Here the resolve dies for https://gitlab.com/gecko.io/geckoEMF-Tooling/-/blob/failing_resolve/org.gecko.emf.osgi.codegen/codegen.bndrun if we remove the runblacklist the resolve works just fine.
The text was updated successfully, but these errors were encountered: