ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <>
Subject [jira] [Commented] (IVY-1388) *.lck files created by "artifact-lock" lock strategy are not cleaned up if ivy quits abruptly
Date Tue, 18 Dec 2012 23:26:12 GMT


Shawn Heisey commented on IVY-1388:

Will this be in a released version soon?  I am guessing that would mean backporting to 2.3.

I contribute to the Lucene (Solr) project, which uses ivy.  Hangs caused by .lck files happen
quite often.  I finally used strace to track down the culprit, which led me here.  The "fix"
currently shared by Lucene developers is to wipe the ~/.ivy2 directory and try again.  That
makes things take longer because it has to re-download a lot of jars.

It would be awesome if the Lucene project could update their ivy-bootstrap target to include
a version with this fix.

> *.lck files created by "artifact-lock" lock strategy are not cleaned up if ivy quits
> ---------------------------------------------------------------------------------------------
>                 Key: IVY-1388
>                 URL:
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.2.0, 2.3.0-RC1, trunk
>            Reporter: Wei Chen
>            Assignee: Nicolas Lalevée
>             Fix For: trunk
>         Attachments:, 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 artifact-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 downloading a big jar, if you Ctrl-C to quit that build process. Those lock files will
remain in the metadatas folder. The same happens too if ivy encounters some error and fails
the build.
> Those uncleaned lock files will cause problem when you start the build again. The build
process will hang while ivy waiting those "locks" to be released, which will never happen
automatically. So eventually the build will fail with an ivy error "impossible to acquire
lock for xxxyyyzzzz". What makes it worse is that ivy doesn't fail-fast on the default 2 miuntes
lock timeout, 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
class. We have implemented the fix and it works well.
> Patch is provided, could anyone quickly apply this one line change?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message