-
Notifications
You must be signed in to change notification settings - Fork 214
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 Project randomly fails with "Failed to open file channel '[..]\.m2\repository\.locks\[..].resolverlock" #728
Comments
@cstamas fyi |
Here is the full exception stack log:
|
What version of mvnd, what version/provider of Java, what OS and what FS? |
Without any information, am guessing something along these lines (as very same thing is done by resolver locking as well): https://bugs.openjdk.org/browse/JDK-8252883 Would be good to get information about Java version here. |
I will try to use an updated JDK version and let you know if the issue still occurs. |
The issue still occurs with Java version: 11.0.17, vendor: Eclipse Adoptium |
Ok, mvnd 0.8.2 uses resolver 1.7.3... @fsmherrm If I prep a patched JAR (of affected resolver bit), are you willing (or can you) to try it out? |
I can't stop laughing about crappy file locking on Windows. The "fix" done in the JDK is pointless because it addresses only the symptom in the JUL |
I have something else on my mind (than the fix in Java), and as @fsmherrm reproduces the issue consistently, am eager to try out my assumption.... |
You mean 17 Adoptiun? Or 11 Adoptium? Or? |
Similar issue: https://bugs.openjdk.org/browse/JDK-8150344 |
This is the patch: https://github.com/apache/maven-resolver/pull/211/files ORIGINAL JAR SHA1: PATCHED JAR SHA1: To apply it:
|
Could it be that our handling is incorrect? |
@cstamas: Are you able to upload the patched jar somewhere else e.g. onedrive? |
Is in Google Drive, or is that not reachable to you? There is a link to it above.... |
@cstamas: yes, sorry. Can you provide it via github? |
Sadly no, GH does not allow JAR uploads (was my initial intent and was suprised to see that)... |
You can rename to .txt and upload. |
maven-resolver-named-locks-1.7.3.jar.zip Just remove the |
@fsmherrm any results? |
@cstamas: It seems to work now :) but I need to run it multiple times to be sure as I am not able to always reproduce it before. But as a result, the folder .locks is now populated with more than 2000 .resolverlock files, is this intended? |
Sadly, this is the "price" to make it work on Windows that has very quirky locking semantics, see the patch apache/maven-resolver#211 |
If you are willing to test more, i can prepare a similar patch like the "symptom patch" is in java... Also, let's keep the discussion here. |
@cstamas : I am willing to test more :) |
Roger that, later evening, or tomorrow will prep alternative patch. |
2nd experiment: do what Java folks did: retry and hope the best: Patch JAR: SHA1: 5add45f97a6e37053993652a25d618e134d0c5c7 "Tunables": |
@fsmherrm any results? Sorry for "pressing", but am akin to release resolver 1.9.0 soon, and would like to incorporate these 'tweaks" (probably configurable by some flags) for Windows users..... (or ultimate fix, if it works) |
Cool, thanks @fsmherrm for testing this! Sadly, the order is release resolver 1.9.0 (soon) -> release maven 3.9.0 (that would use fixed resolver) -> release mvnd (that would use released maven that use fixed resolver).... Stay tuned, will figure out something with @gnodet for sure. The final (to be in 1.9.0) resolver change is here apache/maven-resolver#216 |
Hello,
we have a quite huge maven multi project with approx. 150 modules. During project build with "mvnd clean install" it randomly fails with for example followings error (just as an example, as specific error dependency randomly changes):
Failed to open file channel for '[..]\.m2\repository\.locks\commons-codec~commons-codec~1.15.resolverlock'
Unfortunately, I am not able to directly reliablely reproduce it but from my understanding this should not happen as Maven Daemon is designed to support concurrent M2 repository access.
What could be the reason? Is there any configuration that I could adjust to solve this?
Thank you and best regards
Marc
The text was updated successfully, but these errors were encountered: