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 Eu...@gmail.com on 2010/02/24 17:37:48 UTC
Ivy + hudson CI - problems downloading artifacts, please, help
Hi,
I'm not subscribed to the list, so, please, make sure you have my address
in CC for replies.
We are having more than 150 projects in hudson CI with dependencies tracked
by Ivy (2.1.0).
Lately we are having more and more problems with it because ivy cannot
copy/download artifacts correctly.
There are two main errors we are getting:
1. size of source file differs from the size of dest file
2. impossible to move part file to definitive one
In mailing list i found this answer from Xavier Hanin:
When Ivy downloads ivy files from a repository, it first download them to a
temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
file is downloaded to the cache). Then it moves the temporary file to the
final location in the cache, and this is what seems to be failing for your
user. Cleaning the cache should fix the problem, if it happens frequently
you should try to investigate the issue. Maybe it is due to the use of the
same cache by multiple processes concurrently. This use case is supported
only with 2.0 beta 1, with the repository cache locking to avoid such
concurrency issues.
As i mentioned above our version is 2.1.0, but we still have this issue
I also saw the same problem reported before, but there was no answer
http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
Thanks,
Eugene
Re: Re: Re: Ivy + hudson CI - problems downloading artifacts, please,
help
Posted by Eu...@gmail.com.
Hi,
Here is another variant we found:
<caches useOrigin="true" lockstrategy="artifact-lock"/>
Apparently, the default set up is no-lock, therefore in continuous
integration environment it might cause those issues.
see http://ant.apache.org/ivy/history/2.1.0/settings/lock-strategies.html
Artifact-lock seems to be very good for CI env.
We are going to try it out as it seems to be much less intrusive for our
environment.
Did you try it?
Thanks,
Eugene
On Feb 24, 2010 12:29pm, Euguess@gmail.com wrote:
> Thank you for the hint. I gotta see if this approach will work for us.
> Eugene
> On Feb 24, 2010 12:09pm, Willem Verstraeten
> willem.verstraeten@luciad.com> wrote:
> >
> >
> >
> >
> >
> >
> > Hi,
> >
> >
> >
> > The problem is due to concurrent access to the Ivy cache. I was unable
> > to get that working, so I simply configured each Hudson job to have its
> > own cache directory.
> >
> >
> >
> > I did that by adding following line to the settings file used by the
> > Hudson job :
> >
> >
> >
> > ivycache" useOrigin="true"/>
> >
> >
> >
> > This assumes that you invoke Ivy through the ant tasks, in which case
> > the ${basedir} attribute is expanded to the ant build's basedir.
> >
> >
> >
> > Hope this helps,
> >
> > Willem
> >
> >
> >
> >
> >
> > Euguess@gmail.com wrote:
> > Hi,
> >
> >
> >
> >
> > I'm not subscribed to the list, so, please, make sure you have my
> > address in CC for replies.
> >
> >
> >
> >
> > We are having more than 150 projects in hudson CI with dependencies
> > tracked by Ivy (2.1.0).
> >
> >
> >
> >
> > Lately we are having more and more problems with it because ivy cannot
> > copy/download artifacts correctly.
> >
> >
> >
> >
> > There are two main errors we are getting:
> >
> >
> > 1. size of source file differs from the size of dest file
> >
> >
> > 2. impossible to move part file to definitive one
> >
> >
> >
> >
> > In mailing list i found this answer from Xavier Hanin:
> >
> >
> > When Ivy downloads ivy files from a repository, it first download them
> > to a
> >
> >
> > temporary file (used to be in temp directory until 2.0 beta 1, where
> > the ivy
> >
> >
> > file is downloaded to the cache). Then it moves the temporary file to
> > the
> >
> >
> > final location in the cache, and this is what seems to be failing for
> > your
> >
> >
> > user. Cleaning the cache should fix the problem, if it happens
> > frequently
> >
> >
> > you should try to investigate the issue. Maybe it is due to the use of
> > the
> >
> >
> > same cache by multiple processes concurrently. This use case is
> > supported
> >
> >
> > only with 2.0 beta 1, with the repository cache locking to avoid such
> >
> >
> > concurrency issues.
> >
> >
> >
> >
> > As i mentioned above our version is 2.1.0, but we still have this issue
> >
> >
> >
> >
> > I also saw the same problem reported before, but there was no answer
> >
> >
> > http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
> >
> >
> >
> >
> > Thanks,
> >
> >
> > Eugene
> >
> >
> >
> >
> >
> >
> >
Re: Re: Ivy + hudson CI - problems downloading artifacts, please,
help
Posted by Eu...@gmail.com.
Thank you for the hint. I gotta see if this approach will work for us.
Eugene
On Feb 24, 2010 12:09pm, Willem Verstraeten <wi...@luciad.com>
wrote:
> Hi,
> The problem is due to concurrent access to the Ivy cache. I was unable
> to get that working, so I simply configured each Hudson job to have its
> own cache directory.
> I did that by adding following line to the settings file used by the
> Hudson job :
> ivycache" useOrigin="true"/>
> This assumes that you invoke Ivy through the ant tasks, in which case
> the ${basedir} attribute is expanded to the ant build's basedir.
> Hope this helps,
> Willem
> Euguess@gmail.com wrote:
> Hi,
> I'm not subscribed to the list, so, please, make sure you have my
> address in CC for replies.
> We are having more than 150 projects in hudson CI with dependencies
> tracked by Ivy (2.1.0).
> Lately we are having more and more problems with it because ivy cannot
> copy/download artifacts correctly.
> There are two main errors we are getting:
> 1. size of source file differs from the size of dest file
> 2. impossible to move part file to definitive one
> In mailing list i found this answer from Xavier Hanin:
> When Ivy downloads ivy files from a repository, it first download them
> to a
> temporary file (used to be in temp directory until 2.0 beta 1, where
> the ivy
> file is downloaded to the cache). Then it moves the temporary file to
> the
> final location in the cache, and this is what seems to be failing for
> your
> user. Cleaning the cache should fix the problem, if it happens
> frequently
> you should try to investigate the issue. Maybe it is due to the use of
> the
> same cache by multiple processes concurrently. This use case is
> supported
> only with 2.0 beta 1, with the repository cache locking to avoid such
> concurrency issues.
> As i mentioned above our version is 2.1.0, but we still have this issue
> I also saw the same problem reported before, but there was no answer
> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
> Thanks,
> Eugene
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Willem Verstraeten <wi...@luciad.com>.
Hi,
The problem is due to concurrent access to the Ivy cache. I was unable
to get that working, so I simply configured each Hudson job to have its
own cache directory.
I did that by adding following line to the settings file used by the
Hudson job :
<caches defaultCacheDir="${basedir}/ivycache" useOrigin="true"/>
This assumes that you invoke Ivy through the ant tasks, in which case
the ${basedir} attribute is expanded to the ant build's basedir.
Hope this helps,
Willem
Euguess@gmail.com wrote:
> Hi,
>
> I'm not subscribed to the list, so, please, make sure you have my
> address in CC for replies.
>
> We are having more than 150 projects in hudson CI with dependencies
> tracked by Ivy (2.1.0).
>
> Lately we are having more and more problems with it because ivy cannot
> copy/download artifacts correctly.
>
> There are two main errors we are getting:
> 1. size of source file differs from the size of dest file
> 2. impossible to move part file to definitive one
>
> In mailing list i found this answer from Xavier Hanin:
> When Ivy downloads ivy files from a repository, it first download them
> to a
> temporary file (used to be in temp directory until 2.0 beta 1, where
> the ivy
> file is downloaded to the cache). Then it moves the temporary file to the
> final location in the cache, and this is what seems to be failing for
> your
> user. Cleaning the cache should fix the problem, if it happens frequently
> you should try to investigate the issue. Maybe it is due to the use of
> the
> same cache by multiple processes concurrently. This use case is supported
> only with 2.0 beta 1, with the repository cache locking to avoid such
> concurrency issues.
>
> As i mentioned above our version is 2.1.0, but we still have this issue
>
> I also saw the same problem reported before, but there was no answer
> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
>
> Thanks,
> Eugene
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by David Goblirsch <dg...@interactivebrokers.com>.
Maarten Coene wrote:
> Very strange, I don't see a reason why this shouldn't work for IvyDE.
> Don't you see any error messages appear on the Ivy console in your Eclipse?
>
> Maarten
>
>
>
I didn't pursue it because we only need the artifact locking for Hudson
because of the multiple executors.
So I just set the strategy to "artifact-lock" for the Hudson user, and
"no-lock" for others, which matches
how we operate.
>
> ----- Original Message ----
> From: David Goblirsch <dg...@interactivebrokers.com>
> To: ivy-user@ant.apache.org
> Sent: Tue, March 2, 2010 4:24:35 PM
> Subject: Re: Ivy + hudson CI - problems downloading artifacts, please, help
>
> However, we just discovered that having that setting,
>
> <caches lockStrategy="artifact-lock" />
>
> breaks the resolve in IvyDE 2.1 on Eclipse 3.5R1 (JEE version) even using the new pre-release jar.
> That is, clicking on ivy.xml[*] to "Resolve" produces nothing, leaving the build path empty.
>
>
>
>
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Maarten Coene <ma...@yahoo.com>.
Very strange, I don't see a reason why this shouldn't work for IvyDE.
Don't you see any error messages appear on the Ivy console in your Eclipse?
Maarten
----- Original Message ----
From: David Goblirsch <dg...@interactivebrokers.com>
To: ivy-user@ant.apache.org
Sent: Tue, March 2, 2010 4:24:35 PM
Subject: Re: Ivy + hudson CI - problems downloading artifacts, please, help
However, we just discovered that having that setting,
<caches lockStrategy="artifact-lock" />
breaks the resolve in IvyDE 2.1 on Eclipse 3.5R1 (JEE version) even using the new pre-release jar.
That is, clicking on ivy.xml[*] to "Resolve" produces nothing, leaving the build path empty.
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by David Goblirsch <dg...@interactivebrokers.com>.
David Goblirsch wrote:
> Maarten Coene wrote:
>> ok, I've found a place in the Ivy code that could cause the resolve
>> to hang.
>> I've fixed that particular problem in SVN trunk. Could you try again
>> with the latest Ivy code from trunk to see if the problem has been
>> fixed?
>>
>> thanks,
>> Maarten
>>
>>
>
> Fixed! I downloaded the jar 2.2.0.20100227220116.jar from your Hudson
> server, and it worked. Thank you so much.
>
> David
However, we just discovered that having that setting,
<caches lockStrategy="artifact-lock" />
breaks the resolve in IvyDE 2.1 on Eclipse 3.5R1 (JEE version) even
using the new pre-release jar.
That is, clicking on ivy.xml[*] to "Resolve" produces nothing, leaving
the build path empty.
>
>>
>>
>> ----- Original Message ----
>> From: David Goblirsch <dg...@interactivebrokers.com>
>> To: ivy-user@ant.apache.org
>> Sent: Fri, February 26, 2010 12:28:30 AM
>> Subject: Re: Ivy + hudson CI - problems downloading artifacts,
>> please, help
>>
>> Maarten Coene wrote:
>>
>>> I was not aware of any problems with the artifact-lock strategy.
>>> Could you provide more details, like for instance the ant output
>>> when setting the property "ivy.log.locking" to "true"
>>>
>>> Maarten
>>>
>>>
>>>
>> If I put this line
>>
>> <caches lockStrategy="artifact-lock"/>
>>
>> into my Ivy settings file, and then start with a clean slate, i.e,
>> having completely cleared the local cache under .ivy2,
>> and then run ant 1.7.1 with -Divy.log.locking=true as you suggested,
>> I see that
>> ant ends up in an "infinite" loop printing out log messages that say
>>
>> Thread[main,5,main] [large integer] file creation failed [filename]
>>
>>
>
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by David Goblirsch <dg...@interactivebrokers.com>.
Maarten Coene wrote:
> ok, I've found a place in the Ivy code that could cause the resolve to hang.
> I've fixed that particular problem in SVN trunk. Could you try again with the latest Ivy code from trunk to see if the problem has been fixed?
>
> thanks,
> Maarten
>
>
Fixed! I downloaded the jar 2.2.0.20100227220116.jar from your Hudson
server, and it worked. Thank you so much.
David
>
>
> ----- Original Message ----
> From: David Goblirsch <dg...@interactivebrokers.com>
> To: ivy-user@ant.apache.org
> Sent: Fri, February 26, 2010 12:28:30 AM
> Subject: Re: Ivy + hudson CI - problems downloading artifacts, please, help
>
> Maarten Coene wrote:
>
>> I was not aware of any problems with the artifact-lock strategy.
>> Could you provide more details, like for instance the ant output when setting the property "ivy.log.locking" to "true"
>>
>> Maarten
>>
>>
>>
> If I put this line
>
> <caches lockStrategy="artifact-lock"/>
>
> into my Ivy settings file, and then start with a clean slate, i.e,
> having completely cleared the local cache under .ivy2,
> and then run ant 1.7.1 with -Divy.log.locking=true as you suggested, I see that
> ant ends up in an "infinite" loop printing out log messages that say
>
> Thread[main,5,main] [large integer] file creation failed [filename]
>
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Matt Benson <gu...@gmail.com>.
This bit me today... updated to tip Ivy and seems to be resolved--
thanks Maarten!
-Matt
On Feb 26, 2010, at 5:50 PM, Maarten Coene wrote:
> ok, I've found a place in the Ivy code that could cause the resolve
> to hang.
> I've fixed that particular problem in SVN trunk. Could you try
> again with the latest Ivy code from trunk to see if the problem has
> been fixed?
>
> thanks,
> Maarten
>
>
>
>
> ----- Original Message ----
> From: David Goblirsch <dg...@interactivebrokers.com>
> To: ivy-user@ant.apache.org
> Sent: Fri, February 26, 2010 12:28:30 AM
> Subject: Re: Ivy + hudson CI - problems downloading artifacts,
> please, help
>
> Maarten Coene wrote:
>> I was not aware of any problems with the artifact-lock strategy.
>> Could you provide more details, like for instance the ant output
>> when setting the property "ivy.log.locking" to "true"
>>
>> Maarten
>>
>>
> If I put this line
>
> <caches lockStrategy="artifact-lock"/>
>
> into my Ivy settings file, and then start with a clean slate, i.e,
> having completely cleared the local cache under .ivy2,
> and then run ant 1.7.1 with -Divy.log.locking=true as you
> suggested, I see that
> ant ends up in an "infinite" loop printing out log messages that say
>
> Thread[main,5,main] [large integer] file creation failed
> [filename]
>
> where [filename] looks like
>
> [myhomedir]/.ivy2/cache/[organisation]/[module]/metadatas/
> metadata-[sometimestamp].ivy.lck
>
> where [organisation] and [module] above are just placeholds for the
> actual names;
> they are for one of my company's private library jars.
>
> We are on a secure network behind a firewall, so all repositories
> are on our file system, and
> our internal jars do not have version numbers attached. The
> resolve is done with resolveMode="dynamic" in two different ant steps,
> first for conf="compile" and then conf="test", where conf "test"
> extends conf "compile"
> indirectly via another conf called "runtime". That is, "test"
> extends "runtime" extends "compile". The infinite
> loop occurs during the 2nd resolve, for conf="test". This is just a
> build, so "runtime" isn't explicitly resolved for.
>
> There are several dependencies found before this one that work
> fine, i.e., I see many "acquiring lock",
> "lock acquired", "reentrant lock acquired", "reentrant lock
> released", "lock released on" messages
> before it gets to this one. This dependency is correctly resolved
> for conf="compile", i.e., it is not
> a conf="test" only dependency.
>
> If I kill ant with C-c and then ant again, this time the loop
> occurs during the first resolve.
>
> If I remove the line
>
> <caches lockStrategy="artifact-lock"/>
>
> the build completes just fine.
>
> I hope this is enough information. As I said, this build is for
> proprietary software,
> so it would take me a while to duplicate the problem with a
> stripped down setup.
>
> Thanks.
>
>>
>>
>>
>> ----- Original Message ----
>> From: David Goblirsch <dg...@interactivebrokers.com>
>> To: ivy-user@ant.apache.org
>> Sent: Thu, February 25, 2010 7:15:26 PM
>> Subject: Re: Ivy + hudson CI - problems downloading artifacts,
>> please, help
>>
>> Maarten Coene wrote:
>>
>>> Could you confirm that your Ivy cache isn't accessed concurrently?
>>> And if your Ivy cache is accessed by more than 1 Ivy process at a
>>> time, could you check you did enable the artifact locking in your
>>> settings.xml?
>>> Cfr. http://ant.apache.org/ivy/history/latest-milestone/settings/
>>> lock-strategies.html
>>>
>>>
>>> Maarten
>>>
>>>
>>
>> My experience with this is this. We resolve "compile" dependencies
>> in one ant target, and then resolve "test" dependencies in another
>> ant target. If the artifact-lock is "turned on" in the settings
>> file, then the resolving of the "test" conf deadlocks and the ant
>> build process
>> just hangs.
>>
>>> ----- Original Message ----
>>> From: "Euguess@gmail.com" <Eu...@gmail.com>
>>> To: ivy-user@ant.apache.org; Eugene Sajine <eu...@gmail.com>
>>> Sent: Wed, February 24, 2010 5:37:48 PM
>>> Subject: Ivy + hudson CI - problems downloading artifacts,
>>> please, help
>>>
>>> Hi,
>>>
>>> I'm not subscribed to the list, so, please, make sure you have my
>>> address in CC for replies.
>>>
>>> We are having more than 150 projects in hudson CI with
>>> dependencies tracked by Ivy (2.1.0).
>>>
>>> Lately we are having more and more problems with it because ivy
>>> cannot copy/download artifacts correctly.
>>>
>>> There are two main errors we are getting:
>>> 1. size of source file differs from the size of dest file
>>> 2. impossible to move part file to definitive one
>>>
>>> In mailing list i found this answer from Xavier Hanin:
>>> When Ivy downloads ivy files from a repository, it first download
>>> them to a
>>> temporary file (used to be in temp directory until 2.0 beta 1,
>>> where the ivy
>>> file is downloaded to the cache). Then it moves the temporary
>>> file to the
>>> final location in the cache, and this is what seems to be failing
>>> for your
>>> user. Cleaning the cache should fix the problem, if it happens
>>> frequently
>>> you should try to investigate the issue. Maybe it is due to the
>>> use of the
>>> same cache by multiple processes concurrently. This use case is
>>> supported
>>> only with 2.0 beta 1, with the repository cache locking to avoid
>>> such
>>> concurrency issues.
>>>
>>> As i mentioned above our version is 2.1.0, but we still have this
>>> issue
>>>
>>> I also saw the same problem reported before, but there was no answer
>>> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
>>>
>>> Thanks,
>>> Eugene
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Maarten Coene <ma...@yahoo.com>.
ok, I've found a place in the Ivy code that could cause the resolve to hang.
I've fixed that particular problem in SVN trunk. Could you try again with the latest Ivy code from trunk to see if the problem has been fixed?
thanks,
Maarten
----- Original Message ----
From: David Goblirsch <dg...@interactivebrokers.com>
To: ivy-user@ant.apache.org
Sent: Fri, February 26, 2010 12:28:30 AM
Subject: Re: Ivy + hudson CI - problems downloading artifacts, please, help
Maarten Coene wrote:
> I was not aware of any problems with the artifact-lock strategy.
> Could you provide more details, like for instance the ant output when setting the property "ivy.log.locking" to "true"
>
> Maarten
>
>
If I put this line
<caches lockStrategy="artifact-lock"/>
into my Ivy settings file, and then start with a clean slate, i.e,
having completely cleared the local cache under .ivy2,
and then run ant 1.7.1 with -Divy.log.locking=true as you suggested, I see that
ant ends up in an "infinite" loop printing out log messages that say
Thread[main,5,main] [large integer] file creation failed [filename]
where [filename] looks like
[myhomedir]/.ivy2/cache/[organisation]/[module]/metadatas/metadata-[sometimestamp].ivy.lck
where [organisation] and [module] above are just placeholds for the actual names;
they are for one of my company's private library jars.
We are on a secure network behind a firewall, so all repositories are on our file system, and
our internal jars do not have version numbers attached. The
resolve is done with resolveMode="dynamic" in two different ant steps,
first for conf="compile" and then conf="test", where conf "test" extends conf "compile"
indirectly via another conf called "runtime". That is, "test" extends "runtime" extends "compile". The infinite
loop occurs during the 2nd resolve, for conf="test". This is just a build, so "runtime" isn't explicitly resolved for.
There are several dependencies found before this one that work fine, i.e., I see many "acquiring lock",
"lock acquired", "reentrant lock acquired", "reentrant lock released", "lock released on" messages
before it gets to this one. This dependency is correctly resolved for conf="compile", i.e., it is not
a conf="test" only dependency.
If I kill ant with C-c and then ant again, this time the loop occurs during the first resolve.
If I remove the line
<caches lockStrategy="artifact-lock"/>
the build completes just fine.
I hope this is enough information. As I said, this build is for proprietary software,
so it would take me a while to duplicate the problem with a stripped down setup.
Thanks.
>
>
>
> ----- Original Message ----
> From: David Goblirsch <dg...@interactivebrokers.com>
> To: ivy-user@ant.apache.org
> Sent: Thu, February 25, 2010 7:15:26 PM
> Subject: Re: Ivy + hudson CI - problems downloading artifacts, please, help
>
> Maarten Coene wrote:
>
>> Could you confirm that your Ivy cache isn't accessed concurrently?
>> And if your Ivy cache is accessed by more than 1 Ivy process at a time, could you check you did enable the artifact locking in your settings.xml?
>> Cfr. http://ant.apache.org/ivy/history/latest-milestone/settings/lock-strategies.html
>>
>>
>> Maarten
>>
>>
>
> My experience with this is this. We resolve "compile" dependencies in one ant target, and then resolve "test" dependencies in another
> ant target. If the artifact-lock is "turned on" in the settings file, then the resolving of the "test" conf deadlocks and the ant build process
> just hangs.
>
>> ----- Original Message ----
>> From: "Euguess@gmail.com" <Eu...@gmail.com>
>> To: ivy-user@ant.apache.org; Eugene Sajine <eu...@gmail.com>
>> Sent: Wed, February 24, 2010 5:37:48 PM
>> Subject: Ivy + hudson CI - problems downloading artifacts, please, help
>>
>> Hi,
>>
>> I'm not subscribed to the list, so, please, make sure you have my address in CC for replies.
>>
>> We are having more than 150 projects in hudson CI with dependencies tracked by Ivy (2.1.0).
>>
>> Lately we are having more and more problems with it because ivy cannot copy/download artifacts correctly.
>>
>> There are two main errors we are getting:
>> 1. size of source file differs from the size of dest file
>> 2. impossible to move part file to definitive one
>>
>> In mailing list i found this answer from Xavier Hanin:
>> When Ivy downloads ivy files from a repository, it first download them to a
>> temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
>> file is downloaded to the cache). Then it moves the temporary file to the
>> final location in the cache, and this is what seems to be failing for your
>> user. Cleaning the cache should fix the problem, if it happens frequently
>> you should try to investigate the issue. Maybe it is due to the use of the
>> same cache by multiple processes concurrently. This use case is supported
>> only with 2.0 beta 1, with the repository cache locking to avoid such
>> concurrency issues.
>>
>> As i mentioned above our version is 2.1.0, but we still have this issue
>>
>> I also saw the same problem reported before, but there was no answer
>> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
>>
>> Thanks,
>> Eugene
>>
>>
>>
>>
>>
>
>
>
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by David Goblirsch <dg...@interactivebrokers.com>.
Maarten Coene wrote:
> I was not aware of any problems with the artifact-lock strategy.
> Could you provide more details, like for instance the ant output when setting the property "ivy.log.locking" to "true"
>
> Maarten
>
>
If I put this line
<caches lockStrategy="artifact-lock"/>
into my Ivy settings file, and then start with a clean slate, i.e,
having completely cleared the local cache under .ivy2,
and then run ant 1.7.1 with -Divy.log.locking=true as you suggested, I
see that
ant ends up in an "infinite" loop printing out log messages that say
Thread[main,5,main] [large integer] file creation failed [filename]
where [filename] looks like
[myhomedir]/.ivy2/cache/[organisation]/[module]/metadatas/metadata-[sometimestamp].ivy.lck
where [organisation] and [module] above are just placeholds for the
actual names;
they are for one of my company's private library jars.
We are on a secure network behind a firewall, so all repositories are on
our file system, and
our internal jars do not have version numbers attached. The
resolve is done with resolveMode="dynamic" in two different ant steps,
first for conf="compile" and then conf="test", where conf "test" extends
conf "compile"
indirectly via another conf called "runtime". That is, "test" extends
"runtime" extends "compile". The infinite
loop occurs during the 2nd resolve, for conf="test". This is just a
build, so "runtime" isn't explicitly resolved for.
There are several dependencies found before this one that work fine,
i.e., I see many "acquiring lock",
"lock acquired", "reentrant lock acquired", "reentrant lock released",
"lock released on" messages
before it gets to this one. This dependency is correctly resolved for
conf="compile", i.e., it is not
a conf="test" only dependency.
If I kill ant with C-c and then ant again, this time the loop occurs
during the first resolve.
If I remove the line
<caches lockStrategy="artifact-lock"/>
the build completes just fine.
I hope this is enough information. As I said, this build is for
proprietary software,
so it would take me a while to duplicate the problem with a stripped
down setup.
Thanks.
>
>
>
> ----- Original Message ----
> From: David Goblirsch <dg...@interactivebrokers.com>
> To: ivy-user@ant.apache.org
> Sent: Thu, February 25, 2010 7:15:26 PM
> Subject: Re: Ivy + hudson CI - problems downloading artifacts, please, help
>
> Maarten Coene wrote:
>
>> Could you confirm that your Ivy cache isn't accessed concurrently?
>> And if your Ivy cache is accessed by more than 1 Ivy process at a time, could you check you did enable the artifact locking in your settings.xml?
>> Cfr. http://ant.apache.org/ivy/history/latest-milestone/settings/lock-strategies.html
>>
>>
>> Maarten
>>
>>
>>
>
> My experience with this is this. We resolve "compile" dependencies in
> one ant target, and then resolve "test" dependencies in another
> ant target. If the artifact-lock is "turned on" in the settings file,
> then the resolving of the "test" conf deadlocks and the ant build process
> just hangs.
>
>> ----- Original Message ----
>> From: "Euguess@gmail.com" <Eu...@gmail.com>
>> To: ivy-user@ant.apache.org; Eugene Sajine <eu...@gmail.com>
>> Sent: Wed, February 24, 2010 5:37:48 PM
>> Subject: Ivy + hudson CI - problems downloading artifacts, please, help
>>
>> Hi,
>>
>> I'm not subscribed to the list, so, please, make sure you have my address in CC for replies.
>>
>> We are having more than 150 projects in hudson CI with dependencies tracked by Ivy (2.1.0).
>>
>> Lately we are having more and more problems with it because ivy cannot copy/download artifacts correctly.
>>
>> There are two main errors we are getting:
>> 1. size of source file differs from the size of dest file
>> 2. impossible to move part file to definitive one
>>
>> In mailing list i found this answer from Xavier Hanin:
>> When Ivy downloads ivy files from a repository, it first download them to a
>> temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
>> file is downloaded to the cache). Then it moves the temporary file to the
>> final location in the cache, and this is what seems to be failing for your
>> user. Cleaning the cache should fix the problem, if it happens frequently
>> you should try to investigate the issue. Maybe it is due to the use of the
>> same cache by multiple processes concurrently. This use case is supported
>> only with 2.0 beta 1, with the repository cache locking to avoid such
>> concurrency issues.
>>
>> As i mentioned above our version is 2.1.0, but we still have this issue
>>
>> I also saw the same problem reported before, but there was no answer
>> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
>>
>> Thanks,
>> Eugene
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Maarten Coene <ma...@yahoo.com>.
I was not aware of any problems with the artifact-lock strategy.
Could you provide more details, like for instance the ant output when setting the property "ivy.log.locking" to "true"
Maarten
----- Original Message ----
From: David Goblirsch <dg...@interactivebrokers.com>
To: ivy-user@ant.apache.org
Sent: Thu, February 25, 2010 7:15:26 PM
Subject: Re: Ivy + hudson CI - problems downloading artifacts, please, help
Maarten Coene wrote:
> Could you confirm that your Ivy cache isn't accessed concurrently?
> And if your Ivy cache is accessed by more than 1 Ivy process at a time, could you check you did enable the artifact locking in your settings.xml?
> Cfr. http://ant.apache.org/ivy/history/latest-milestone/settings/lock-strategies.html
>
>
> Maarten
>
>
My experience with this is this. We resolve "compile" dependencies in
one ant target, and then resolve "test" dependencies in another
ant target. If the artifact-lock is "turned on" in the settings file,
then the resolving of the "test" conf deadlocks and the ant build process
just hangs.
> ----- Original Message ----
> From: "Euguess@gmail.com" <Eu...@gmail.com>
> To: ivy-user@ant.apache.org; Eugene Sajine <eu...@gmail.com>
> Sent: Wed, February 24, 2010 5:37:48 PM
> Subject: Ivy + hudson CI - problems downloading artifacts, please, help
>
> Hi,
>
> I'm not subscribed to the list, so, please, make sure you have my address in CC for replies.
>
> We are having more than 150 projects in hudson CI with dependencies tracked by Ivy (2.1.0).
>
> Lately we are having more and more problems with it because ivy cannot copy/download artifacts correctly.
>
> There are two main errors we are getting:
> 1. size of source file differs from the size of dest file
> 2. impossible to move part file to definitive one
>
> In mailing list i found this answer from Xavier Hanin:
> When Ivy downloads ivy files from a repository, it first download them to a
> temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
> file is downloaded to the cache). Then it moves the temporary file to the
> final location in the cache, and this is what seems to be failing for your
> user. Cleaning the cache should fix the problem, if it happens frequently
> you should try to investigate the issue. Maybe it is due to the use of the
> same cache by multiple processes concurrently. This use case is supported
> only with 2.0 beta 1, with the repository cache locking to avoid such
> concurrency issues.
>
> As i mentioned above our version is 2.1.0, but we still have this issue
>
> I also saw the same problem reported before, but there was no answer
> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
>
> Thanks,
> Eugene
>
>
>
>
>
>
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by David Goblirsch <dg...@interactivebrokers.com>.
Maarten Coene wrote:
> Could you confirm that your Ivy cache isn't accessed concurrently?
> And if your Ivy cache is accessed by more than 1 Ivy process at a time, could you check you did enable the artifact locking in your settings.xml?
> Cfr. http://ant.apache.org/ivy/history/latest-milestone/settings/lock-strategies.html
>
>
> Maarten
>
>
My experience with this is this. We resolve "compile" dependencies in
one ant target, and then resolve "test" dependencies in another
ant target. If the artifact-lock is "turned on" in the settings file,
then the resolving of the "test" conf deadlocks and the ant build process
just hangs.
> ----- Original Message ----
> From: "Euguess@gmail.com" <Eu...@gmail.com>
> To: ivy-user@ant.apache.org; Eugene Sajine <eu...@gmail.com>
> Sent: Wed, February 24, 2010 5:37:48 PM
> Subject: Ivy + hudson CI - problems downloading artifacts, please, help
>
> Hi,
>
> I'm not subscribed to the list, so, please, make sure you have my address in CC for replies.
>
> We are having more than 150 projects in hudson CI with dependencies tracked by Ivy (2.1.0).
>
> Lately we are having more and more problems with it because ivy cannot copy/download artifacts correctly.
>
> There are two main errors we are getting:
> 1. size of source file differs from the size of dest file
> 2. impossible to move part file to definitive one
>
> In mailing list i found this answer from Xavier Hanin:
> When Ivy downloads ivy files from a repository, it first download them to a
> temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
> file is downloaded to the cache). Then it moves the temporary file to the
> final location in the cache, and this is what seems to be failing for your
> user. Cleaning the cache should fix the problem, if it happens frequently
> you should try to investigate the issue. Maybe it is due to the use of the
> same cache by multiple processes concurrently. This use case is supported
> only with 2.0 beta 1, with the repository cache locking to avoid such
> concurrency issues.
>
> As i mentioned above our version is 2.1.0, but we still have this issue
>
> I also saw the same problem reported before, but there was no answer
> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
>
> Thanks,
> Eugene
>
>
>
>
>
>
Re: Re: Ivy + hudson CI - problems downloading artifacts, please,
help
Posted by Eu...@gmail.com.
We do have concurrent access to ivy cache as we are using CI and the latest
experiment shown that the artifact locking doesn't work for us.
It seems to produce a deadlock.
OTOH we have experimented with resolve mode - set it to dynamic and it
seems to help with the issue, but we don't have enough statistics yet.
I will update if the issue will be really gone after a week with this fix
or so...
PS I'm sorry that the information I'm providing is so spotty. I understand
the difficulty to try to fix the software/resolve the issue "by ear"
without logs.
That's why probably the only thing i can ask for is to revisit the ivy
cache mechanism at some point, if possible, with heavy concurrency in mind.
With best regards,
Eugene
On Feb 24, 2010 5:26pm, Maarten Coene <ma...@yahoo.com> wrote:
> Could you confirm that your Ivy cache isn't accessed concurrently?
> And if your Ivy cache is accessed by more than 1 Ivy process at a time,
> could you check you did enable the artifact locking in your settings.xml?
> Cfr.
> http://ant.apache.org/ivy/history/latest-milestone/settings/lock-strategies.html
> Maarten
> ----- Original Message ----
> From: "Euguess@gmail.com" Euguess@gmail.com>
> To: ivy-user@ant.apache.org; Eugene Sajine euguess@gmail.com>
> Sent: Wed, February 24, 2010 5:37:48 PM
> Subject: Ivy + hudson CI - problems downloading artifacts, please, help
> Hi,
> I'm not subscribed to the list, so, please, make sure you have my address
> in CC for replies.
> We are having more than 150 projects in hudson CI with dependencies
> tracked by Ivy (2.1.0).
> Lately we are having more and more problems with it because ivy cannot
> copy/download artifacts correctly.
> There are two main errors we are getting:
> 1. size of source file differs from the size of dest file
> 2. impossible to move part file to definitive one
> In mailing list i found this answer from Xavier Hanin:
> When Ivy downloads ivy files from a repository, it first download them to
> a
> temporary file (used to be in temp directory until 2.0 beta 1, where the
> ivy
> file is downloaded to the cache). Then it moves the temporary file to the
> final location in the cache, and this is what seems to be failing for your
> user. Cleaning the cache should fix the problem, if it happens frequently
> you should try to investigate the issue. Maybe it is due to the use of the
> same cache by multiple processes concurrently. This use case is supported
> only with 2.0 beta 1, with the repository cache locking to avoid such
> concurrency issues.
> As i mentioned above our version is 2.1.0, but we still have this issue
> I also saw the same problem reported before, but there was no answer
> http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
> Thanks,
> Eugene
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Maarten Coene <ma...@yahoo.com>.
Could you confirm that your Ivy cache isn't accessed concurrently?
And if your Ivy cache is accessed by more than 1 Ivy process at a time, could you check you did enable the artifact locking in your settings.xml?
Cfr. http://ant.apache.org/ivy/history/latest-milestone/settings/lock-strategies.html
Maarten
----- Original Message ----
From: "Euguess@gmail.com" <Eu...@gmail.com>
To: ivy-user@ant.apache.org; Eugene Sajine <eu...@gmail.com>
Sent: Wed, February 24, 2010 5:37:48 PM
Subject: Ivy + hudson CI - problems downloading artifacts, please, help
Hi,
I'm not subscribed to the list, so, please, make sure you have my address in CC for replies.
We are having more than 150 projects in hudson CI with dependencies tracked by Ivy (2.1.0).
Lately we are having more and more problems with it because ivy cannot copy/download artifacts correctly.
There are two main errors we are getting:
1. size of source file differs from the size of dest file
2. impossible to move part file to definitive one
In mailing list i found this answer from Xavier Hanin:
When Ivy downloads ivy files from a repository, it first download them to a
temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
file is downloaded to the cache). Then it moves the temporary file to the
final location in the cache, and this is what seems to be failing for your
user. Cleaning the cache should fix the problem, if it happens frequently
you should try to investigate the issue. Maybe it is due to the use of the
same cache by multiple processes concurrently. This use case is supported
only with 2.0 beta 1, with the repository cache locking to avoid such
concurrency issues.
As i mentioned above our version is 2.1.0, but we still have this issue
I also saw the same problem reported before, but there was no answer
http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
Thanks,
Eugene
Re: Re: Ivy + hudson CI - problems downloading artifacts, please,
help
Posted by Eu...@gmail.com.
Unfortunately, I cannot do that - everything is on secure network...
Thanks,
Eugene
On Feb 24, 2010 2:44pm, Maarten Coene <ma...@yahoo.com> wrote:
> Please create a JIRA issue and attach your settings.xml and the output
> when running ant in verbose mode.
> https://issues.apache.org/jira/browse/IVY
Re: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Maarten Coene <ma...@yahoo.com>.
Please create a JIRA issue and attach your settings.xml and the output when running ant in verbose mode.
https://issues.apache.org/jira/browse/IVY
thanks,
Maarten
----- Original Message ----
From: "Euguess@gmail.com" <Eu...@gmail.com>
To: ivy-user@ant.apache.org; Eugene Sajine <eu...@gmail.com>
Sent: Wed, February 24, 2010 5:37:48 PM
Subject: Ivy + hudson CI - problems downloading artifacts, please, help
Hi,
I'm not subscribed to the list, so, please, make sure you have my address in CC for replies.
We are having more than 150 projects in hudson CI with dependencies tracked by Ivy (2.1.0).
Lately we are having more and more problems with it because ivy cannot copy/download artifacts correctly.
There are two main errors we are getting:
1. size of source file differs from the size of dest file
2. impossible to move part file to definitive one
In mailing list i found this answer from Xavier Hanin:
When Ivy downloads ivy files from a repository, it first download them to a
temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
file is downloaded to the cache). Then it moves the temporary file to the
final location in the cache, and this is what seems to be failing for your
user. Cleaning the cache should fix the problem, if it happens frequently
you should try to investigate the issue. Maybe it is due to the use of the
same cache by multiple processes concurrently. This use case is supported
only with 2.0 beta 1, with the repository cache locking to avoid such
concurrency issues.
As i mentioned above our version is 2.1.0, but we still have this issue
I also saw the same problem reported before, but there was no answer
http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
Thanks,
Eugene
AW: Ivy + hudson CI - problems downloading artifacts, please, help
Posted by Klaas Prause <kl...@blau.de>.
Hi,
is it possible that the Cache is located on a different harddrive? I don't know when we had an issue like this with moving files. Maybe it was buildr and not Ivy related. It boiled down to: The move did not work, because it is not implemented as copy/delete but as a real move, this fails for temp dir on a different drive.
This may be complete non sense, but was the first thing that came to my mind.
Regards
Klaas
-----Ursprüngliche Nachricht-----
Von: Euguess@gmail.com [mailto:Euguess@gmail.com]
Gesendet: Mittwoch, 24. Februar 2010 17:38
An: ivy-user@ant.apache.org; Eugene Sajine
Betreff: Ivy + hudson CI - problems downloading artifacts, please, help
Hi,
I'm not subscribed to the list, so, please, make sure you have my address
in CC for replies.
We are having more than 150 projects in hudson CI with dependencies tracked
by Ivy (2.1.0).
Lately we are having more and more problems with it because ivy cannot
copy/download artifacts correctly.
There are two main errors we are getting:
1. size of source file differs from the size of dest file
2. impossible to move part file to definitive one
In mailing list i found this answer from Xavier Hanin:
When Ivy downloads ivy files from a repository, it first download them to a
temporary file (used to be in temp directory until 2.0 beta 1, where the ivy
file is downloaded to the cache). Then it moves the temporary file to the
final location in the cache, and this is what seems to be failing for your
user. Cleaning the cache should fix the problem, if it happens frequently
you should try to investigate the issue. Maybe it is due to the use of the
same cache by multiple processes concurrently. This use case is supported
only with 2.0 beta 1, with the repository cache locking to avoid such
concurrency issues.
As i mentioned above our version is 2.1.0, but we still have this issue
I also saw the same problem reported before, but there was no answer
http://www.mail-archive.com/ivy-user@ant.apache.org/msg03152.html
Thanks,
Eugene