[ https://issues.apache.org/jira/browse/IVY-1454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13852400#comment-13852400 ]
Charles Duffy commented on IVY-1454: ------------------------------------ I'm trying to generate a minimal reproducer and failing thus far. For instance, the following works perfectly: {code} (ns ivy-lock-test.core (:import [org.apache.ivy.plugins.lock NIOFileLockStrategy])) (def strategy (NIOFileLockStrategy. true)) (defn with-lock [file run-fn] (try (.lockArtifact strategy nil file) (run-fn) (finally (.unlockArtifact strategy nil file)))) (defn artificially-slow-fn [] (Thread/sleep 500)) (pmap (partial with-lock (java.io.File. "/tmp/test-lockfile")) (take 100 (repeat artificially-slow-fn))) {code} > OverlappingFileLockException when using artifact-lock-nio > --------------------------------------------------------- > > Key: IVY-1454 > URL: https://issues.apache.org/jira/browse/IVY-1454 > Project: Ivy > Issue Type: Bug > Components: Core > Affects Versions: 2.4.0 > Environment: Debian Linux (Wheezy) > Oracle Java 1.7.0+update45, > ivy_2.4.0.alpha_20131214174343.jar downloaded from > https://builds.apache.org/job/Ivy/446/ > Reporter: Carsten Pfeiffer > Assignee: Charles Duffy > Priority: Minor > > When trying to use {{artifact-lock-nio}} as the lock strategy, I get resolve > errors due to {{OverlappingFileLockException}} being thrown: > {code} > [ivy:resolve] WARN: :: org.hamcrest#hamcrest-core;1.1: > java.nio.channels.OverlappingFileLockException at > sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) > [ivy:resolve] WARN: :: org.glassfish#javax.ejb;3.1: > java.nio.channels.OverlappingFileLockException at > sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) > [ivy:resolve] WARN: :: org.jboss.weld.se#weld-se-core;1.1.10.Final: > java.nio.channels.OverlappingFileLockException at > sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) > {code} > The reason is probably related to our use of the {{<parallel>}} and > {{<antcallback>}} tasks. The documentation of the {{antcallback}} task > is here: http://ant-contrib.sourceforge.net/tasks/tasks/antcallback_task.html > {code} > <parallel threadcount="${tests.maxThreads}"> > <antcallback target="testsomething" return="tests.failed"/> > <antcallback target="testsomeother" return="tests.failed"/> > <antcallback target="testsomemore" return="tests.failed"/> > </parallel> > {code} > All the testxxx targets perform a resolve before running some junit tests in > a separate vm. These resolve calls appear to cause the > {{OverlappingFileLockException}}. -- This message was sent by Atlassian JIRA (v6.1.4#6159)