Skip to content
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

display-plugin-updates goal hang #354 investigation #6

Closed
andrzejj0 opened this issue Sep 3, 2022 · 0 comments
Closed

display-plugin-updates goal hang #354 investigation #6

andrzejj0 opened this issue Sep 3, 2022 · 0 comments

Comments

@andrzejj0
Copy link
Owner

andrzejj0 commented Sep 3, 2022

  1. Stack traces are from maven-compat, not from maven-core
  2. An old version of DisplayPluginUpdatesMojo specifically used the maven-compat interface:

PR mojohaus#538 switch to non-deprecated ModelInterpolator changed that.

The old model interpolator implements recursion using its own stack (interpolationTarget):

while ( !interpolationTargets.isEmpty() )
{
    Object obj = interpolationTargets.removeFirst();

    traverseObjectWithParents( obj.getClass(), obj );
}

The above code removes the currently processed element from interpolationTarget, just like a function call would do, but then places newly found elements to be processed into that collection.

This risks an infinite recursion loop if the analysed model contains cycles. So, it's possible that the function is fed a model with cycles in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant