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
Compilation failure with parallel builds #183
Comments
From the stacktrace this seems to be related to JDT instead. Don't know if JDT Batch compiler is maybe not threadsafe (e.g. using global static state) maybe @mickaelistria can tell more here? |
Yes I think you are right: https://bugs.eclipse.org/bugs/show_bug.cgi?id=574450 We can probably close this now? Or would it be helpful to keep a Tycho issue open until JDT is fixed (and updated here). |
Do you now where the shared state comes from? I can't tell from the stacktrace, ClasspathJep247 seems to be instantiated non-static per invocation. If we do need to restore the lock, can we add an opt-out mechanism? |
See last comment by @joeshannon about https://bugs.eclipse.org/bugs/show_bug.cgi?id=574450 being the root cause.
I think we do need to restore the lock because we don't want people to be stuck against older releases because this bug blocks them; and restoring the lock wouldn't constitute a regression compared to current 2.3 release. |
If we only want to work around this particular bug, we could also use synchronization only if compiled with --release. |
whatever works ;) |
OK, I'll submit a PR tomorrow. |
Seems like Andrey was faster and the JDT bug is already fixed. Would that workaround be part of tycho 2.4.0 or will there be another tycho release before the 2021-09 release? |
@akurtakov can we use the SNAPSHOT Build from JDT that includes the patch? |
Tycho uses https://mvnrepository.com/artifact/org.eclipse.jdt/ecj and until JDT releases new artifact to maven central the answer is no. |
Tycho provides a way to override jdt version used (see https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/tree/eclipse-platform-parent/pom.xml#n429 ) so this can be done if one provides own way to get whatever jdt version he wants like platform does. |
I wonder if it would be possible if JDT releases snapshots to the eclipse-maven server like tycho does? I'm not familiar with this deploy stuff and eclipse-infra but it seems that such a thing would ease much things (e.g. tycho snapshot can always use JDT snapshots to find such problems early before the release). |
Platform releng hat on: JDT snapshots are not autodeployed - it's done manually for milestones and on request by jdt developers for critical fixes. Automating publishing to eclipse maven repo would be nice but even in platform we have never considered using nightly ecj for our nightly builds - it just sounds too risky. Not to mention the fact that changing ecj versions causes comparator issues due to unstable ordering of generated lambdas ( [https://bugs.eclipse.org/bugs/show_bug.cgi?id=561135]). Tycho hat on: Switching tycho snapshots to use JDT snapshot (milestone, critical fix) as used by platform sounds good approach to me if we find a way to compile and run our tests with this snapshot but users of tycho snapshot should still use released jdt version to not decrease general usability of tycho snapshots for the general public. |
Can you trigger/ask/investigate this? I think automatic workflows are always better than manual tasks. Beside that, would this bug qualify as one to make a manual deploy feasible so tycho can use that then?
If I remember right @mickaelistria has setup a build that runs tycho with latest maven-snapshot, maybe something similar would be possible for ecj as well? |
When I say manual I mean deployment is triggered manually but it's jenkins job. It's deployed here so tycho can override to use latest from here. I don't think there is more needed or even wanted to be done from platform side.
That shouldn't be too hard to setup. |
Deployed new ecj as
repository: |
I can confirm also that this ecj version resolves the issue with the builds I was originally testing with. |
@jhonnen Are you planning to submit a PR today? If not, I'll take care of it. |
I wasn't sure if we still need this change in tycho with the fixed ECJ. I have no time for this today, but I'll can submit one first thing tomorrow. |
Tycho usually uses the latest release of ECJ. The provided build is helpful for people who feel comfortable hacking their pom, but not really to use by default. |
Compiler cannot use parallel execution until related bugs is fixed in the version used and provided by default in Tycho.
Submitted #191 |
Compiler cannot use parallel execution until related bugs is fixed in the version used and provided by default in Tycho.
Please try https://oss.sonatype.org/content/repositories/orgeclipsetycho-1068 as new staging repo for 2.4 release, which should include the fix. I hope to release it tomorrow afternoon unless issue is not resolved or other blockers are found. |
Testing the staged 2.4.0 release and seeing issues with parallel builds:
Initially observed with my company's build. To reproduce here I used the Xtext build (just because I saw it referenced in a recent ticket) with
mvn -T2 -DskipTests -Platest clean verify
after switching the "latest" profile to use 2.4.0.I attempted to reproduce with a minimal project but couldn't - I think because the dependency tree was too linear.
The text was updated successfully, but these errors were encountered: