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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build hang and CPU skyrocket with sisu-index:indexMojo #527

Closed
cstamas opened this issue Dec 10, 2021 · 2 comments 路 Fixed by #532
Closed

Build hang and CPU skyrocket with sisu-index:indexMojo #527

cstamas opened this issue Dec 10, 2021 · 2 comments 路 Fixed by #532
Milestone

Comments

@cstamas
Copy link
Member

cstamas commented Dec 10, 2021

Unsure (yet 馃槃 ) who to blame, so just linking the issue here as well:
eclipse-sisu/sisu-project#38

@cstamas
Copy link
Member Author

cstamas commented Dec 11, 2021

Would be thankful for some pointers, but this seems mvnd related issue.

Using: Linux, mvn 3.8.4, mvnd 0.7.1, java11-temurin

Facts in short: on a closed source project, one module (that uses sisu-index:index mojo) build takes 9 seconds with vanilla mvn, while it takes 2:20 with mvnd, and mvnd build is stuck on sisu-index:index mojo for 2 minutes.

The setup of project is somewhat similar to test project https://github.com/cstamas/sisu-index-test but test project is trivial and cannot reproduce the issue for now with it (or the execution times are so small that issue is invisible): several plain JAR modules w/ sisu components and then a war-like module (not using war packaging but m-assembly-p) that re-indexes all sisu components in included JARs).

By using (locally patched) sisu-maven-plugin verified that in both cases (executing with mvn and with mvnd) they "do same thing" -- the indexPath and classPath are 100% same (made these two methods dump their list of URLs https://github.com/eclipse/sisu.mojos/blob/master/src/main/java/org/eclipse/sisu/mojos/IndexMojo.java#L176 and https://github.com/eclipse/sisu.mojos/blob/master/src/main/java/org/eclipse/sisu/mojos/IndexMojo.java#L188).

Still, for some reason while running in mvnd, this takes 2:20 total time, while in mvn it finishes in 9 seconds.

@cstamas
Copy link
Member Author

cstamas commented Dec 11, 2021

Found the culprit:
https://github.com/mvndaemon/mvnd/blob/master/common/src/main/java/org/mvndaemon/mvnd/common/MavenDaemon.java#L31

Adding same change to mvn/index mojo makes vanilla mvn run same goal for 2:20 as well...

@gnodet gnodet mentioned this issue Dec 14, 2021
gnodet added a commit that referenced this issue Jan 3, 2022
@gnodet gnodet added this to the 0.7.2 milestone Jan 3, 2022
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

Successfully merging a pull request may close this issue.

2 participants