Dependabot detected a tag for JGit 5.13.0. I've updated the Jenkins git client plugin to use JGit 5.13.0 in my test environment.
A new logging stack trace is being reported in the Jenkins git client plugin automated tests. The stack trace is:
Sep 13, 2021 11:15:23 PM org.eclipse.jgit.internal.storage.file.LockFile unlock
SEVERE: Unlocking LockFile '/tmp/junit14445476736651226115/junit15588760822522442699/.git/gc.log.lock' failed
java.io.IOException: Could not delete file /tmp/junit14445476736651226115/junit15588760822522442699/.git/gc.log.lock
at org.eclipse.jgit.util.FileUtils.handleDeleteException(FileUtils.java:232)
at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:194)
at org.eclipse.jgit.internal.storage.file.LockFile.unlock(LockFile.java:545)
at org.eclipse.jgit.internal.storage.file.GcLog.unlock(GcLog.java:110)
at org.eclipse.jgit.internal.storage.file.GC.lambda$0(GC.java:250)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.nio.file.NoSuchFileException: /tmp/junit14445476736651226115/junit15588760822522442699/.git/gc.log.lock
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:249)
at java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
at java.base/java.nio.file.Files.delete(Files.java:1142)
at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:191)
... 8 more
The stack trace surprises me, since a "no such file exception" when attempting to remove a lock file seems like it should not be logged as SEVERE. If the lock file is gone, the lock has been released. The logic at that location in org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java in the delete(File f, int options) method is more than I'm able to immediately understand. Anyone have any insights to offer?