-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Maven fails to build after ozone ufs upgrade to 1.0.0 #12338
Comments
This reverts commit 118769b to fix Alluxio#12338 otherwise, maven build may stuck in shading Cherry-pick of existing commit. orig-pr-link: Alluxio#12337 orig-commit: Alluxio/alluxio@c1e07c5 orig-commit-author: Bin Fan <fanbin103@gmail.com> pr-link: n/a change-id: cid-64f10e66696d1241496852cbd51ceddf5f1d1a2d
@Xenorith Thank you for report this issue, it seems is the same issue like this https://issues.apache.org/jira/browse/MSHADE-148. I think the root cause of this issue is Shade plugin using the wrong project while building the dependency reduced pom in parallel builds. Reference https://www.mail-archive.com/dev@maven.apache.org/msg122620.html The above screenshot is snapped while I debug the maven shaded plugin under the parallel build, It makes me feel strange that the current project is different with the
After an overview The reason is that there are a class cast in org.apache.hadoop.ipc.ProtobufRpcEngine#invoke final Message theRequest = (Message) args[1]; The |
Thanks for looking into this so quickly @maobaolong I am not familiar enough with maven to help decide which option is best to work around the issue. I would strongly prefer we avoid @apc999 Can you provide some guidance on what is the best way to proceed with this issue? |
@Xenorith Sure, we need to support parallelism build, there are one more option The SPARK project is suffering from this issue too, https://issues.apache.org/jira/browse/SPARK-8819 this is a option to support parallelism build with let |
@maobaolong @Xenorith Thanks for getting to the bottom of this problem! @calvinjia any input? |
@apc999 The dependency reduced pom is relevant when published so I think @maobaolong ’s proposed solution is the best of both worlds. |
I actually think the generated pom in src dir is not relevant to depending modules. There will be a pom in |
Sure, my understanding is with false it will have the original pom |
@apc999 I have checked that if we set |
#12338 This is a workaround for MSHADE-148, which leads to an infinite loop when building Alluxio. There are two scenarios. - Releasing Alluxio Maven build with `-Prelease`. - If using newer than `3.3.x` version of maven, you also have to use sequential build, Like `mvn clean install -Prelease xxxx`. - If using lower version maven before `3.3.x`, you can use parallel build, e.g. `mvn clean install -T 4 -Prelease xxxx` - Not Releasing Alluxio If you are not releasing Alluxio, you can build Alluxio like before, please don't add the `-Prelease` into you build command line. e.g. `mvn clean install -T 4 xxxx` This patch adds a -Prelease. If present, it will set createDependencyReducedPom true. The consequences are: If you are releasing Alluxio with this profile, you are fine as long as before. If you are releasing Alluxio without this profile, the `alluxio-shaded-xxx-yyy.pom` will be the same as the pom.xml under the module directory. If you are not releasing Alluxio but you are using this profile, you may run into #12338 If you are not releasing Alluxio and you did not include this profile, you are fine. This is all documented in pom.xml and tested locally with maven 3.6.3. pr-link: #12367 change-id: cid-2f26f91c9f3198d9dac11633888de0a9f8af2ce6
This issue has been fixed by #12367 |
#12338 This is a workaround for MSHADE-148, which leads to an infinite loop when building Alluxio. There are two scenarios. - Releasing Alluxio Maven build with `-Prelease`. - If using newer than `3.3.x` version of maven, you also have to use sequential build, Like `mvn clean install -Prelease xxxx`. - If using lower version maven before `3.3.x`, you can use parallel build, e.g. `mvn clean install -T 4 -Prelease xxxx` - Not Releasing Alluxio If you are not releasing Alluxio, you can build Alluxio like before, please don't add the `-Prelease` into you build command line. e.g. `mvn clean install -T 4 xxxx` This patch adds a -Prelease. If present, it will set createDependencyReducedPom true. The consequences are: If you are releasing Alluxio with this profile, you are fine as long as before. If you are releasing Alluxio without this profile, the `alluxio-shaded-xxx-yyy.pom` will be the same as the pom.xml under the module directory. If you are not releasing Alluxio but you are using this profile, you may run into #12338 If you are not releasing Alluxio and you did not include this profile, you are fine. This is all documented in pom.xml and tested locally with maven 3.6.3. pr-link: #12367 change-id: cid-2f26f91c9f3198d9dac11633888de0a9f8af2ce6
Alluxio Version:
2.4.0
Describe the bug
After merging the PR to bump ozone ufs version (#12226), the following maven command hangs:
mvn -T 4C clean install -Dmaven.javadoc.skip=true -DskipTests -Dlicense.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true -P'\''!ufs-hadoop-1.2,!ufs-hadoop-2.2,!ufs-hadoop-2.6'\''
When I run jstack on the process, the one running thread approximately has the following stacktrace:
This seems to be an issue with the maven shading plugin. Looking up
at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.insertAtPreferredLocation(MavenJDOMWriter.java:292)
, I found that other people have encountered a similar issue:To Reproduce
See above mvn command
Expected behavior
Maven command completes
Urgency
Offending PR has been reverted to avoid build issues (#12337)
The text was updated successfully, but these errors were encountered: