Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4AAD11762E for ; Sun, 26 Oct 2014 03:02:34 +0000 (UTC) Received: (qmail 49757 invoked by uid 500); 26 Oct 2014 03:02:34 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 49709 invoked by uid 500); 26 Oct 2014 03:02:34 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 49694 invoked by uid 99); 26 Oct 2014 03:02:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Oct 2014 03:02:34 +0000 Date: Sun, 26 Oct 2014 03:02:33 +0000 (UTC) From: "Anurag Sharma (JIRA)" To: notifications@ant.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IVY-1388) *.lck files created by "artifact-lock" lock strategy are not cleaned up if ivy quits abruptly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IVY-1388?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D141843= 71#comment-14184371 ]=20 Anurag Sharma commented on IVY-1388: ------------------------------------ I am also facing the same issue. Here is detailed when running in verbose m= ode(ant compile -verbose) {code} Overriding previous definition of property "ivy.version" [ivy:retrieve] no resolved descriptor found: launching default resolve Overriding previous definition of property "ivy.version" [ivy:retrieve] using ivy parser to parse file:/C:/work/trunk/solr/example/i= vy.xml [ivy:retrieve] :: resolving dependencies :: org.apache.solr#example;working= @dev-pc [ivy:retrieve] confs: [logging] [ivy:retrieve] validate =3D true [ivy:retrieve] refresh =3D false [ivy:retrieve] resolving dependencies for configuration 'logging' [ivy:retrieve] =3D=3D resolving dependencies for org.apache.solr#example;wo= rking@dev-pc [logging] [ivy:retrieve] =3D=3D resolving dependencies org.apache.solr#example;workin= g@dev-pc->log4j#log4j;1.2.17 [logging->master] [ivy:retrieve] default: Checking cache for: dependency: log4j#log4j;1.2.17 = {logging=3D[master]} [ivy:retrieve] don't use cache for log4j#log4j;1.2.17: checkModified=3Dtrue [ivy:retrieve] tried C:\Users\user1.dev-pc\.ivy2\local\log4j\log4j= \1.2.17\ivys\ivy.xml [ivy:retrieve] tried C:\Users\user1.dev-pc\.ivy2\local\log4j\log4j= \1.2.17\jars\log4j.jar [ivy:retrieve] local: no ivy file nor artifact found for log4j#log4j;1.2.1= 7 [ivy:retrieve] main: Checking cache for: dependency: log4j#log4j;1.2.17 {lo= gging=3D[master]} [ivy:retrieve] main: module revision found in cache: log4j#log4j;1.2.17 [ivy:retrieve] found log4j#log4j;1.2.17 in public [ivy:retrieve] =3D=3D resolving dependencies org.apache.solr#example;workin= g@dev-pc->org.slf4j#slf4j-api;1.7.6 [logging->master] [ivy:retrieve] default: Checking cache for: dependency: org.slf4j#slf4j-api= ;1.7.6 {logging=3D[master]} [ivy:retrieve] don't use cache for org.slf4j#slf4j-api;1.7.6: checkModified= =3Dtrue [ivy:retrieve] ERROR: impossible to acquire lock for org.slf4j#slf4j-api;1.= 7.6 [ivy:retrieve] tried C:\Users\user1.dev-pc\.ivy2\local\org.slf4j\s= lf4j-api\1.7.6\ivys\ivy.xml [ivy:retrieve] tried C:\Users\user1.dev-pc\.ivy2\local\org.slf4j\s= lf4j-api\1.7.6\jars\slf4j-api.jar [ivy:retrieve] local: no ivy file nor artifact found for org.slf4j#slf4j-a= pi;1.7.6 [ivy:retrieve] main: Checking cache for: dependency: org.slf4j#slf4j-api;1.= 7.6 {logging=3D[master]} [ivy:retrieve] ERROR: impossible to acquire lock for org.slf4j#slf4j-api;1.= 7.6 [ivy:retrieve] ERROR: impossible to acquire lock for org.slf4j#slf4j-api;1.= 7.6 [ivy:retrieve] tried C:\Users\user1.dev-pc\.ivy2\shared\org.slf4j\= slf4j-api\1.7.6\ivys\ivy.xml [ivy:retrieve] tried C:\Users\user1.dev-pc\.ivy2\shared\org.slf4j\= slf4j-api\1.7.6\jars\slf4j-api.jar [ivy:retrieve] shared: no ivy file nor artifact found for org.slf4j#slf4j-= api;1.7.6 {code} "ant clean" also doesn't make a difference. Deleting the directory ".ivy\cache\org.slf4j\slf4j-api" resolves the issue. > *.lck files created by "artifact-lock" lock strategy are not cleaned up i= f ivy quits abruptly > -------------------------------------------------------------------------= -------------------- > > Key: IVY-1388 > URL: https://issues.apache.org/jira/browse/IVY-1388 > Project: Ivy > Issue Type: Bug > Affects Versions: 2.2.0, 2.3.0-RC1, trunk > Reporter: Wei Chen > Assignee: Nicolas Lalev=C3=A9e > Fix For: 2.3.0 > > Attachments: FileBasedLockStrategy.java.patch, patch1.patch > > Original Estimate: 0.5m > Remaining Estimate: 0.5m > > We have a few build processes running in parallel, all of which share the= same ivy cache. In order not to run into any parallel downloading problems= , we enabled artifact-lock lock strategy. An annoying problem with the arti= fact-lock strategy is that the *.lck files which are created as a lock are = not cleaned up if the build exits abruptly. For example, while ivy is downl= oading a big jar, if you Ctrl-C to quit that build process. Those lock file= s will remain in the metadatas folder. The same happens too if ivy encounte= rs some error and fails the build. > Those uncleaned lock files will cause problem when you start the build ag= ain. The build process will hang while ivy waiting those "locks" to be rele= ased, which will never happen automatically. So eventually the build will f= ail with an ivy error "impossible to acquire lock for xxxyyyzzzz". What mak= es it worse is that ivy doesn't fail-fast on the default 2 miuntes lock tim= eout, it seems trying it a few times. In worst scenarios, we have seen the = build hangs for 12 minutes and then timeout'd and failed. > We believe this can be fixed by setting deleteOnExit() for the FileBasedL= ockStrategy.java class. We have implemented the fix and it works well. > Patch is provided, could anyone quickly apply this one line change? -- This message was sent by Atlassian JIRA (v6.3.4#6332)