-
Notifications
You must be signed in to change notification settings - Fork 194
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
concurrent extracting of nested jars fails #917
Comments
What Tycho version are you using? Please keep in mind that sharing the same maven repository with different processes can always cause corruption because maven repository is not thread safe! |
2.5. I'm not able to upgrade to 2.7.x due to Java 15 still being in use and the upgrade to 17 taking more time. Looking at the Tycho source I also don't think the DefaultBundleReader has changed there, or why do you think the version matters? This is not related to the ConcurrentModificationException that was fixed via P2 upstream changes, right? |
I must confess I'm not up to date with all that java versions still using java 11 :-) |
Ah, that is the exact same exception, but the use case is slightly different. The fix is for one multi module build with parallel builder, and there using concurrent data structures etc. should be sufficient. In my case it's two separate tycho builds, therefore the check using the cache will not be successful, and the second build still tries to extract the file and will fail at the file copy operation as before. If I'm reading the code correctly, then we would need to check for the physical jar file existing (independent of the cache) before entering line 136: https://github.com/eclipse/tycho/blob/master/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DefaultBundleReader.java#L136, similar to how this is already done for directories in line 118: https://github.com/eclipse/tycho/blob/master/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DefaultBundleReader.java#L118. |
As mentioned before, running two tycho processes that operate on the same maven-repository is highly discouraged as the maven-repository is not multi process safe! |
I think we can close this one as no work is planned or even could be done on tycho side. |
I just had an error where two parallel tycho builds tried to extract the same nested jar, and the second build failed. Tycho does the extracting by replacing an existing target file, therefore this fails while the file is locked.
However, in my case it would have been the exact same file and version, so it would not have been necessary to try and replace the file, but just use the existing file in the second of the two builds. Can we eventually improve the logic there to skip extracting if the identical version is already there? Or can we eventually use different folders for extracting from different running processes?
The text was updated successfully, but these errors were encountered: