kwin commented on code in PR #1799:
URL: https://github.com/apache/maven-resolver/pull/1799#discussion_r2826513493
##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultTrackingFileManager.java:
##########
@@ -161,9 +161,19 @@ private FileLock fileLock(FileChannel channel, boolean
shared) throws IOExceptio
try {
lock = channel.lock(0, Long.MAX_VALUE, shared);
break;
- } catch (OverlappingFileLockException e) {
+ } catch (OverlappingFileLockException | IOException e) {
+ // For Unix process sun.nio.ch.UnixFileDispatcherImpl.lock0()
is a native method that can throw
+ // IOException
+ // with message "Resource deadlock avoided"
+ // the system call level is involving fcntl() or flock()
+ // If the kernel detects that granting the lock would result
in a deadlock
+ // (where two processes are waiting for each other to release
locks which can happen when two processes
+ // are trying to lock the same file),
+ // it returns an EDEADLK error, which Java throws as an
IOException.
Review Comment:
Even so, how would retrying help in this situation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]