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 Kevin Formsma <ke...@leanlogistics.com> on 2012/09/26 14:14:06 UTC

Ivy Lock files and concurrent resolves

Hello!

I have a large complex build that I'm using Ivy to resolve dependencies for. Within a single build, there are concurrent ivy resolves taking place in separate modules due to the use of Ant's Parallel task. I've updated my cache to use the 'artifact-lock' strategy and I've also disabled the memory cache:

<caches default="lockingcache">
    <cache name="lockingcache" lockStrategy="artifact-lock" memorySize="0"/>
</caches>

I'm running into errors still when these resolves occur at the same time. I've seen two different errors:

1. java.lang.RuntimeException: problem during retrieve of organization#module: java.text.ParseException: failed to parse report: .ivy2/cache/xxxx-xxxx-provided.xml: For input string: ""
2. "impossible to acquire lock for XXXX" occurs because the .lck file doesn't get cleaned up. I'm not sure how to reproduce this every time, but it usually happens due to error #1. Manually deleting the lock file cleans this up. I'm thinking that since I'm running multiple resolves at once, if one of them fails due to #1, the others get killed by ant in leaving some lock files around.

Any ideas on what to try? I don't believe I need separate resolution caches, because I'm not resolving the same module at the same time. It doesn't happen every build, but seems to be intermittent.

Thanks!
-Kevin

Kevin Formsma
Java Architect

LeanLogistics, Inc.
1351 S. Waverly Rd.
Holland, MI 49423
Office: 616-796-7441
Fax: 616-738-6462
kevin.formsma@leanlogistics.com

Visit us at http://www.LEANLOGISTICS.com

Confidentiality Notice: This email may contain privileged and confidential information and is intended for use by the party(s) to which it is addressed. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer.




RE: Ivy Lock files and concurrent resolves

Posted by Arothian <ke...@gmail.com>.
Wolfgang,

I'm sure that is the problem! I looked back and all of my stacktraces were
related to SimpleDateFormat in one way or another. I'm surprised I didn't
notice that sooner - oh well. I've updated to the latest nightly and things
have been smooth so far. Thanks for the help.

-Kevin


Wolfgang Frank wrote:
> 
> Hi Kevin,
> 
> I guess the first error is related to:
> https://issues.apache.org/jira/browse/IVY-1373
> I found this problem in our CI environment, when parsing in one VM
> multiple Ivy files at the same time. Should be solved in current ivy
> source.
> 
> The second problem I only was faced with, when my java process crashed,
> as you describe it.
> 
> Perhabs this helps
> 
> Regards
> 
> Wolfgang
> 
> -----Original Message-----
> From: Kevin Formsma [mailto:kevin.formsma@leanlogistics.com] 
> Sent: Mittwoch, 26. September 2012 14:14
> To: ivy-user@ant.apache.org
> Subject: Ivy Lock files and concurrent resolves
> 
> Hello!
> 
> I have a large complex build that I'm using Ivy to resolve dependencies
> for. Within a single build, there are concurrent ivy resolves taking
> place in separate modules due to the use of Ant's Parallel task. I've
> updated my cache to use the 'artifact-lock' strategy and I've also
> disabled the memory cache:
> 
> <caches default="lockingcache">
>     <cache name="lockingcache" lockStrategy="artifact-lock"
> memorySize="0"/> </caches>
> 
> I'm running into errors still when these resolves occur at the same
> time. I've seen two different errors:
> 
> 1. java.lang.RuntimeException: problem during retrieve of
> organization#module: java.text.ParseException: failed to parse report:
> .ivy2/cache/xxxx-xxxx-provided.xml: For input string: ""
> 2. "impossible to acquire lock for XXXX" occurs because the .lck file
> doesn't get cleaned up. I'm not sure how to reproduce this every time,
> but it usually happens due to error #1. Manually deleting the lock file
> cleans this up. I'm thinking that since I'm running multiple resolves at
> once, if one of them fails due to #1, the others get killed by ant in
> leaving some lock files around.
> 
> Any ideas on what to try? I don't believe I need separate resolution
> caches, because I'm not resolving the same module at the same time. It
> doesn't happen every build, but seems to be intermittent.
> 
> Thanks!
> -Kevin
> 
> 

-- 
View this message in context: http://old.nabble.com/Ivy-Lock-files-and-concurrent-resolves-tp34490053p34499869.html
Sent from the ivy-user mailing list archive at Nabble.com.


RE: Ivy Lock files and concurrent resolves

Posted by Wolfgang Frank <W....@intershop.de>.
Hi Kevin,

I guess the first error is related to:
https://issues.apache.org/jira/browse/IVY-1373
I found this problem in our CI environment, when parsing in one VM
multiple Ivy files at the same time. Should be solved in current ivy
source.

The second problem I only was faced with, when my java process crashed,
as you describe it.

Perhabs this helps

Regards

Wolfgang

-----Original Message-----
From: Kevin Formsma [mailto:kevin.formsma@leanlogistics.com] 
Sent: Mittwoch, 26. September 2012 14:14
To: ivy-user@ant.apache.org
Subject: Ivy Lock files and concurrent resolves

Hello!

I have a large complex build that I'm using Ivy to resolve dependencies
for. Within a single build, there are concurrent ivy resolves taking
place in separate modules due to the use of Ant's Parallel task. I've
updated my cache to use the 'artifact-lock' strategy and I've also
disabled the memory cache:

<caches default="lockingcache">
    <cache name="lockingcache" lockStrategy="artifact-lock"
memorySize="0"/> </caches>

I'm running into errors still when these resolves occur at the same
time. I've seen two different errors:

1. java.lang.RuntimeException: problem during retrieve of
organization#module: java.text.ParseException: failed to parse report:
.ivy2/cache/xxxx-xxxx-provided.xml: For input string: ""
2. "impossible to acquire lock for XXXX" occurs because the .lck file
doesn't get cleaned up. I'm not sure how to reproduce this every time,
but it usually happens due to error #1. Manually deleting the lock file
cleans this up. I'm thinking that since I'm running multiple resolves at
once, if one of them fails due to #1, the others get killed by ant in
leaving some lock files around.

Any ideas on what to try? I don't believe I need separate resolution
caches, because I'm not resolving the same module at the same time. It
doesn't happen every build, but seems to be intermittent.

Thanks!
-Kevin

Kevin Formsma
Java Architect

LeanLogistics, Inc.
1351 S. Waverly Rd.
Holland, MI 49423
Office: 616-796-7441
Fax: 616-738-6462
kevin.formsma@leanlogistics.com

Visit us at http://www.LEANLOGISTICS.com

Confidentiality Notice: This email may contain privileged and
confidential information and is intended for use by the party(s) to
which it is addressed. If you have received this message in error,
please notify us immediately by replying to the message and deleting it
from your computer.