You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Sam Berlin <sb...@gmail.com> on 2009/03/25 22:38:08 UTC

Artifact Lock Failures

Hi All,

The artifact-lock strategy seems to be broken right now if an ivy
process is killed while a lock is held.  The lockfile is left around
and any subsequent attempt (in later ivy processes) fails, because the
lock will never be deleted.  The only way to continue is to delete the
cache or manually delete the lockfiles.

I'm not sure if simply adding 'file.deleteOnExit' will work.  The
javadoc says it doesn't run on abnormal termination, and has some
pretty strong warnings about not using it for file-locking.  Perhaps a
shutdown hook that deletes all in-use locks?  Will shutdown hooks be
run on abnormal termination?

I'd think the NIO Lock strategy is the only safe one if none of the
above workarounds (or other workarounds) can be used.

Sam

Re: Artifact Lock Failures

Posted by Sam Berlin <sb...@gmail.com>.
It appears to be "path/to/artifact/in/cache/name-of-artifact.lck".

Sam

On Thu, Mar 26, 2009 at 10:06 AM, Brown, Carlton
<Ca...@compucredit.com> wrote:
> I did not know there is an actual lockfile, where is it located?
>
> This might explain some selective lock failures I have been experiencing
> during resolve.
>
> -----Original Message-----
> From: Sam Berlin [mailto:sberlin@gmail.com]
> Sent: Wednesday, March 25, 2009 5:38 PM
> To: ivy-user@ant.apache.org
> Subject: Artifact Lock Failures
>
> Hi All,
>
> The artifact-lock strategy seems to be broken right now if an ivy
> process is killed while a lock is held.  The lockfile is left around and
> any subsequent attempt (in later ivy processes) fails, because the lock
> will never be deleted.  The only way to continue is to delete the cache
> or manually delete the lockfiles.
>
> I'm not sure if simply adding 'file.deleteOnExit' will work.  The
> javadoc says it doesn't run on abnormal termination, and has some pretty
> strong warnings about not using it for file-locking.  Perhaps a shutdown
> hook that deletes all in-use locks?  Will shutdown hooks be run on
> abnormal termination?
>
> I'd think the NIO Lock strategy is the only safe one if none of the
> above workarounds (or other workarounds) can be used.
>
> Sam
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================
>

RE: Artifact Lock Failures

Posted by "Brown, Carlton" <Ca...@compucredit.com>.
I did not know there is an actual lockfile, where is it located?

This might explain some selective lock failures I have been experiencing
during resolve. 

-----Original Message-----
From: Sam Berlin [mailto:sberlin@gmail.com] 
Sent: Wednesday, March 25, 2009 5:38 PM
To: ivy-user@ant.apache.org
Subject: Artifact Lock Failures

Hi All,

The artifact-lock strategy seems to be broken right now if an ivy
process is killed while a lock is held.  The lockfile is left around and
any subsequent attempt (in later ivy processes) fails, because the lock
will never be deleted.  The only way to continue is to delete the cache
or manually delete the lockfiles.

I'm not sure if simply adding 'file.deleteOnExit' will work.  The
javadoc says it doesn't run on abnormal termination, and has some pretty
strong warnings about not using it for file-locking.  Perhaps a shutdown
hook that deletes all in-use locks?  Will shutdown hooks be run on
abnormal termination?

I'd think the NIO Lock strategy is the only safe one if none of the
above workarounds (or other workarounds) can be used.

Sam

-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the 
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on 
the contents of this message is prohibited. In such
case please notify us and destroy and delete all 
copies of this transmission.  Thank you.
====================================================

Re: Artifact Lock Failures

Posted by Klaas1979 <kl...@gmx.de>.
Hi,

is there any progress on this issue, maybe a Jira Ticket or something? We
have problems with concurrent use of the ivy cache on our build server and
the artifact-lock strategy does not work. When I am using it local with an
empty cache the resolve + retrieve does not even finish after 1 hour(!!!).
It makes very slow progress as if some looks time out or something :(

Regards Klaas


Sam Berlin wrote:
> 
> The artifact-lock strategy seems to be broken right now if an ivy
> process is killed while a lock is held.
> [...]
> 

-- 
View this message in context: http://www.nabble.com/Artifact-Lock-Failures-tp22714285p23409674.html
Sent from the ivy-user mailing list archive at Nabble.com.