Git plugin infinite loops

View: New views
17 Messages — Rating Filter:   Alert me  

Git plugin infinite loops

by R. Tyler Ballance-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm wondering if the maintainers of the Git plugin are lurking on this
list. We have a Git repository here tracking the past three years of our
development history (~96k revisions in SVN) and it clocks in at about
6GB (before `git gc` packs lots of the refs).

When integrating Hudson with our Git repository, for some reason the
plugin gets stuck in an infinite loop of `git rev-parse` calls on the
same revision. After letting it run for a couple hours I found out the
console that it generated (before I aborted the job) was ~292MB large.
Full of this sort of mess:

        [workspace] $ git tag -l
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^
        [workspace] $ git rev-parse
        e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^
       
As you might assume the ^^^^^ stuff went on infinitely. There appear to
be two potentially infinite loops in the code.


Note, this is using Git 1.6.0, so the line parsing goop in the
revParse() function probably got broken in the latest release


Any ideas? :)


(p.s. Hi Hudson devs! Keep up the good work
http://unethicalblogger.com/posts/2008/08/oneline_automated_testing)

--
-R. Tyler Ballance
Slide, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Git plugin infinite loops

by kohsuke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Maybe you should file an issue and that might get an attention.

Or better yet, perhaps would you be interested in hacking this plugin by
yourself? :-)

R. Tyler Ballance wrote:

> I'm wondering if the maintainers of the Git plugin are lurking on this
> list. We have a Git repository here tracking the past three years of our
> development history (~96k revisions in SVN) and it clocks in at about
> 6GB (before `git gc` packs lots of the refs).
>
> When integrating Hudson with our Git repository, for some reason the
> plugin gets stuck in an infinite loop of `git rev-parse` calls on the
> same revision. After letting it run for a couple hours I found out the
> console that it generated (before I aborted the job) was ~292MB large.
> Full of this sort of mess:
>
>         [workspace] $ git tag -l
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^
>         [workspace] $ git rev-parse
>         e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^
>        
> As you might assume the ^^^^^ stuff went on infinitely. There appear to
> be two potentially infinite loops in the code.
>
>
> Note, this is using Git 1.6.0, so the line parsing goop in the
> revParse() function probably got broken in the latest release
>
>
> Any ideas? :)
>
>
> (p.s. Hi Hudson devs! Keep up the good work
> http://unethicalblogger.com/posts/2008/08/oneline_automated_testing)
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/


smime.p7s (4K) Download Attachment

Re: Git plugin infinite loops

by David Calavera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think I found the problem, whether "git tag -l" returns nothing the plugin falls into an infinite loop.

I've created a ticket and I've submitted a patch to plugins/git/GitSCM.java rev 11758:

https://hudson.dev.java.net/issues/show_bug.cgi?id=2274

On Mon, Aug 25, 2008 at 9:42 PM, Kohsuke Kawaguchi <Kohsuke.Kawaguchi@...> wrote:

Maybe you should file an issue and that might get an attention.

Or better yet, perhaps would you be interested in hacking this plugin by yourself? :-)


R. Tyler Ballance wrote:
I'm wondering if the maintainers of the Git plugin are lurking on this
list. We have a Git repository here tracking the past three years of our
development history (~96k revisions in SVN) and it clocks in at about
6GB (before `git gc` packs lots of the refs).

When integrating Hudson with our Git repository, for some reason the
plugin gets stuck in an infinite loop of `git rev-parse` calls on the
same revision. After letting it run for a couple hours I found out the
console that it generated (before I aborted the job) was ~292MB large.
Full of this sort of mess:

       [workspace] $ git tag -l
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^
       [workspace] $ git rev-parse
       e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^
       As you might assume the ^^^^^ stuff went on infinitely. There appear to
be two potentially infinite loops in the code.


Note, this is using Git 1.6.0, so the line parsing goop in the
revParse() function probably got broken in the latest release


Any ideas? :)


(p.s. Hi Hudson devs! Keep up the good work
http://unethicalblogger.com/posts/2008/08/oneline_automated_testing)



--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/



--
David Calavera
http://www.thinkincode.net

Re: Git plugin infinite loops

by R. Tyler Ballance-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

----- "David Calavera" wrote:
>
I think I found the problem, whether "git tag -l" returns nothing the plugin falls into an infinite loop.
>
> I've created a ticket and I've submitted a patch to plugins/git/GitSCM.java rev 11758:
>
> https://hudson.dev.java.net/issues/show_bug.cgi?id=2274 


Wow good catch, I'm somewhat disappointed that that didn't register with me when I was looking through the code ;)

About how soon do you think this patch will make it into the main plugin repo?



Cheers

On Mon, Aug 25, 2008 at 9:42 PM, Kohsuke Kawaguchi < Kohsuke.Kawaguchi@... > wrote:
>


> Maybe you should file an issue and that might get an attention.
>
> Or better yet, perhaps would you be interested in hacking this plugin by yourself? :-)



>
> R. Tyler Ballance wrote:
>

I'm wondering if the maintainers of the Git plugin are lurking on this

> list. We have a Git repository here tracking the past three years of our
> development history (~96k revisions in SVN) and it clocks in at about
> 6GB (before `git gc` packs lots of the refs).
>
> When integrating Hudson with our Git repository, for some reason the
> plugin gets stuck in an infinite loop of `git rev-parse` calls on the
> same revision. After letting it run for a couple hours I found out the
> console that it generated (before I aborted the job) was ~292MB large.
> Full of this sort of mess:
>
> [workspace] $ git tag -l
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^
> [workspace] $ git rev-parse
> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^
> As you might assume the ^^^^^ stuff went on infinitely. There appear to
> be two potentially infinite loops in the code.
>
>
> Note, this is using Git 1.6.0, so the line parsing goop in the
> revParse() function probably got broken in the latest release
>
>
> Any ideas? :)
>
>
> (p.s. Hi Hudson devs! Keep up the good work
> http://unethicalblogger.com/posts/2008/08/oneline_automated_testing )
>
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems http://weblogs.java.net/blog/kohsuke/ 
>
>

> --
> David Calavera
> http://www.thinkincode.net 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Git plugin infinite loops

by R. Tyler Ballance-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I spoke too soon, i'm not entirely sure if this is the issue. A friend of mine (Toad on the #hudson channel on freenode) tried adding a tag into his Git repository and re-running his Git-job with the following results:

[workspace] $ git rev-parse HEAD
Nothing to do (no unbuilt branches) - rebuilding HEAD Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
Checking out Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
[workspace] $ git checkout -f 32d47a124c0727f8c5f1ca6747562e776792d787
HEAD is now at 32d47a1... New algorithm for externalizing order ids, as well as display code for it
[workspace] $ git tag -l
[workspace] $ git rev-parse hudson_needs_a_tag
[workspace] $ git cat-file -p 32d47a124c0727f8c5f1ca6747562e776792d787
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^^^


I don't have a Java development environment set up, so if somebody has a build of the Git plugin with your patch, I can try that as well?


Cheers


Sent from Zimbra

----- "R. Tyler Ballance" <tyler@...> wrote:

> ----- "David Calavera" wrote:
> >
> I think I found the problem, whether "git tag -l" returns nothing the
> plugin falls into an infinite loop.
> >
> > I've created a ticket and I've submitted a patch to
> plugins/git/GitSCM.java rev 11758:
> >
> > https://hudson.dev.java.net/issues/show_bug.cgi?id=2274 
>
>
> Wow good catch, I'm somewhat disappointed that that didn't register
> with me when I was looking through the code ;)
>
> About how soon do you think this patch will make it into the main
> plugin repo?
>
>
>
> Cheers
>
> On Mon, Aug 25, 2008 at 9:42 PM, Kohsuke Kawaguchi <
> Kohsuke.Kawaguchi@... > wrote:
> >
>
>
> > Maybe you should file an issue and that might get an attention.
> >
> > Or better yet, perhaps would you be interested in hacking this
> plugin by yourself? :-)
>
>
>
> >
> > R. Tyler Ballance wrote:
> >
>
> I'm wondering if the maintainers of the Git plugin are lurking on this
>
> > list. We have a Git repository here tracking the past three years of
> our
> > development history (~96k revisions in SVN) and it clocks in at
> about
> > 6GB (before `git gc` packs lots of the refs).
> >
> > When integrating Hudson with our Git repository, for some reason the
>
> > plugin gets stuck in an infinite loop of `git rev-parse` calls on
> the
> > same revision. After letting it run for a couple hours I found out
> the
> > console that it generated (before I aborted the job) was ~292MB
> large.
> > Full of this sort of mess:
> >
> > [workspace] $ git tag -l
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^
> > [workspace] $ git rev-parse
> > e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^
> > As you might assume the ^^^^^ stuff went on infinitely. There appear
> to
> > be two potentially infinite loops in the code.
> >
> >
> > Note, this is using Git 1.6.0, so the line parsing goop in the
> > revParse() function probably got broken in the latest release
> >
> >
> > Any ideas? :)
> >
> >
> > (p.s. Hi Hudson devs! Keep up the good work
> > http://unethicalblogger.com/posts/2008/08/oneline_automated_testing
> )
> >
> >
> >
> > --
> > Kohsuke Kawaguchi
> > Sun Microsystems http://weblogs.java.net/blog/kohsuke/ 
> >
> >
>
> > --
> > David Calavera
> > http://www.thinkincode.net 
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Git plugin infinite loops

by Aleksandar Kostadinov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/plugins/git/src/main/java/hudson/plugins/git/GitSCM.java?r1=10953&r2=11758

Actually if setOfThingsBuilt.contains(rev) never gets true, the loop
will be infinite as well. I entirely don't know about the code but this
loop seems very suspicious to me. Probably some other escape condition
must be added. setOfThingsBuilt.isEmpty() seems not strong enough.

R. Tyler Ballance wrote, On 08/27/2008 02:41 AM (EEST):

> I spoke too soon, i'm not entirely sure if this is the issue. A friend of mine (Toad on the #hudson channel on freenode) tried adding a tag into his Git repository and re-running his Git-job with the following results:
>
> [workspace] $ git rev-parse HEAD
> Nothing to do (no unbuilt branches) - rebuilding HEAD Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
> Checking out Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
> [workspace] $ git checkout -f 32d47a124c0727f8c5f1ca6747562e776792d787
> HEAD is now at 32d47a1... New algorithm for externalizing order ids, as well as display code for it
> [workspace] $ git tag -l
> [workspace] $ git rev-parse hudson_needs_a_tag
> [workspace] $ git cat-file -p 32d47a124c0727f8c5f1ca6747562e776792d787
> [workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787
> [workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^
> [workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^
> [workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^
> [workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^^
> [workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^^^
>
>
> I don't have a Java development environment set up, so if somebody has a build of the Git plugin with your patch, I can try that as well?
>
>
> Cheers
>
>
> Sent from Zimbra
>
> ----- "R. Tyler Ballance" <tyler@...> wrote:
>
>> ----- "David Calavera" wrote:
>> I think I found the problem, whether "git tag -l" returns nothing the
>> plugin falls into an infinite loop.
>>> I've created a ticket and I've submitted a patch to
>> plugins/git/GitSCM.java rev 11758:
>>> https://hudson.dev.java.net/issues/show_bug.cgi?id=2274 
>>
>> Wow good catch, I'm somewhat disappointed that that didn't register
>> with me when I was looking through the code ;)
>>
>> About how soon do you think this patch will make it into the main
>> plugin repo?
>>
>>
>>
>> Cheers
>>
>> On Mon, Aug 25, 2008 at 9:42 PM, Kohsuke Kawaguchi <
>> Kohsuke.Kawaguchi@... > wrote:
>>
>>> Maybe you should file an issue and that might get an attention.
>>>
>>> Or better yet, perhaps would you be interested in hacking this
>> plugin by yourself? :-)
>>
>>
>>
>>> R. Tyler Ballance wrote:
>>>
>> I'm wondering if the maintainers of the Git plugin are lurking on this
>>
>>> list. We have a Git repository here tracking the past three years of
>> our
>>> development history (~96k revisions in SVN) and it clocks in at
>> about
>>> 6GB (before `git gc` packs lots of the refs).
>>>
>>> When integrating Hudson with our Git repository, for some reason the
>>> plugin gets stuck in an infinite loop of `git rev-parse` calls on
>> the
>>> same revision. After letting it run for a couple hours I found out
>> the
>>> console that it generated (before I aborted the job) was ~292MB
>> large.
>>> Full of this sort of mess:
>>>
>>> [workspace] $ git tag -l
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^
>>> [workspace] $ git rev-parse
>>> e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^
>>> As you might assume the ^^^^^ stuff went on infinitely. There appear
>> to
>>> be two potentially infinite loops in the code.
>>>
>>>
>>> Note, this is using Git 1.6.0, so the line parsing goop in the
>>> revParse() function probably got broken in the latest release
>>>
>>>
>>> Any ideas? :)
>>>
>>>
>>> (p.s. Hi Hudson devs! Keep up the good work
>>> http://unethicalblogger.com/posts/2008/08/oneline_automated_testing
>> )
>>>
>>>
>>> --
>>> Kohsuke Kawaguchi
>>> Sun Microsystems http://weblogs.java.net/blog/kohsuke/ 
>>>
>>>
>>> --
>>> David Calavera
>>> http://www.thinkincode.net 
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Git plugin infinite loops

by David Calavera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I agree, indeed I don't know what it's trying to do. what does it add "^" in a loop? perhaps the revParse() method returns null if "git rev-parse" fails. I'm sorry but I'm newbie with git.

On Wed, Aug 27, 2008 at 8:49 AM, Aleksandar Kostadinov <akostadi@...> wrote:
http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/plugins/git/src/main/java/hudson/plugins/git/GitSCM.java?r1=10953&r2=11758

Actually if setOfThingsBuilt.contains(rev) never gets true, the loop will be infinite as well. I entirely don't know about the code but this loop seems very suspicious to me. Probably some other escape condition must be added. setOfThingsBuilt.isEmpty() seems not strong enough.

R. Tyler Ballance wrote, On 08/27/2008 02:41 AM (EEST):

I spoke too soon, i'm not entirely sure if this is the issue. A friend of mine (Toad on the #hudson channel on freenode) tried adding a tag into his Git repository and re-running his Git-job with the following results:

[workspace] $ git rev-parse HEAD
Nothing to do (no unbuilt branches) - rebuilding HEAD Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
Checking out Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
[workspace] $ git checkout -f 32d47a124c0727f8c5f1ca6747562e776792d787
HEAD is now at 32d47a1... New algorithm for externalizing order ids, as well as display code for it
[workspace] $ git tag -l
[workspace] $ git rev-parse hudson_needs_a_tag
[workspace] $ git cat-file -p 32d47a124c0727f8c5f1ca6747562e776792d787
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^^
[workspace] $ git rev-parse 32d47a124c0727f8c5f1ca6747562e776792d787^^^^^


I don't have a Java development environment set up, so if somebody has a build of the Git plugin with your patch, I can try that as well?


Cheers


Sent from Zimbra
----- "R. Tyler Ballance" <tyler@...> wrote:

----- "David Calavera" wrote: I think I found the problem, whether "git tag -l" returns nothing the
plugin falls into an infinite loop.
I've created a ticket and I've submitted a patch to
plugins/git/GitSCM.java rev 11758:
https://hudson.dev.java.net/issues/show_bug.cgi?id=2274

Wow good catch, I'm somewhat disappointed that that didn't register
with me when I was looking through the code ;)

About how soon do you think this patch will make it into the main
plugin repo?



Cheers

On Mon, Aug 25, 2008 at 9:42 PM, Kohsuke Kawaguchi <
Kohsuke.Kawaguchi@... > wrote:
Maybe you should file an issue and that might get an attention.
Or better yet, perhaps would you be interested in hacking this
plugin by yourself? :-)


R. Tyler Ballance wrote:
I'm wondering if the maintainers of the Git plugin are lurking on this

list. We have a Git repository here tracking the past three years of
our
development history (~96k revisions in SVN) and it clocks in at
about
6GB (before `git gc` packs lots of the refs).
When integrating Hudson with our Git repository, for some reason the
plugin gets stuck in an infinite loop of `git rev-parse` calls on
the
same revision. After letting it run for a couple hours I found out
the
console that it generated (before I aborted the job) was ~292MB
large.
Full of this sort of mess:
[workspace] $ git tag -l [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^ As you might assume the ^^^^^ stuff went on infinitely. There appear
to
be two potentially infinite loops in the code.

Note, this is using Git 1.6.0, so the line parsing goop in the revParse() function probably got broken in the latest release

Any ideas? :)

(p.s. Hi Hudson devs! Keep up the good work http://unethicalblogger.com/posts/2008/08/oneline_automated_testing
)


--
Kohsuke Kawaguchi Sun Microsystems http://weblogs.java.net/blog/kohsuke/

--
David Calavera http://www.thinkincode.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...




--
David Calavera
http://www.thinkincode.net

Re: Git plugin infinite loops

by R. Tyler Ballance-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2008-08-27 at 10:14 +0200, David Calavera wrote:
> I agree, indeed I don't know what it's trying to do. what does it add
> "^" in a loop? perhaps the revParse() method returns null if "git
> rev-parse" fails. I'm sorry but I'm newbie with git.


>From the git-rev-parse(1) manpage:

               o   A suffix ^ to a revision parameter means the first parent of that commit object. ^<n> means the <n>th parent (i.e. rev^ is equivalent to
                   rev^1). As a special rule, rev^0 means the commit itself and is used when rev is the object name of a tag object that refers to a commit
                   object.
       
               o   A suffix ~<n> to a revision parameter means the commit object that is the <n>th generation grand-parent of the named commit object, following
                   only the first parent. I.e. rev~3 is equivalent to rev^^^ which is equivalent to rev^1^1^1. See below for a illustration of the usage of this
                   form.


So what it looks like revParse() is trying to walk the revision history
list for some ungodly reason, my entirely uneducated guess is that it's
trying to walk the rev history .in order to fill out the "people" page
or something similarly silly, as I can't imagine why it would need to do
that for normal Hudson operation.

I'm wondering if the setOfThingsBuilt.contains code depends on having a
fully parsed revision history? (still can't imagine why that'd be
necessary).

Suffice to say between my friend Toad (from Amie Street) and myself,
we've got some pretty large Git repositories, and requiring a full
revision history parse to build inside of Hudson definitely won't scale.

Is the Git plugin maintainer around and conscious (feel like chiming
in?).

If not, i'll sit down and get a Hudson build environment set up this
weekend and see if I can get my hands dirty with the plugin ;)


Cheers
       

>
> On Wed, Aug 27, 2008 at 8:49 AM, Aleksandar Kostadinov
> <akostadi@...> wrote:
>         http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/plugins/git/src/main/java/hudson/plugins/git/GitSCM.java?r1=10953&r2=11758
>        
>         Actually if setOfThingsBuilt.contains(rev) never gets true,
>         the loop will be infinite as well. I entirely don't know about
>         the code but this loop seems very suspicious to me. Probably
>         some other escape condition must be added.
>         setOfThingsBuilt.isEmpty() seems not strong enough.
>        
>         R. Tyler Ballance wrote, On 08/27/2008 02:41 AM (EEST):
>        
>        
>                 I spoke too soon, i'm not entirely sure if this is the
>                 issue. A friend of mine (Toad on the #hudson channel
>                 on freenode) tried adding a tag into his Git
>                 repository and re-running his Git-job with the
>                 following results:
>                
>                 [workspace] $ git rev-parse HEAD
>                 Nothing to do (no unbuilt branches) - rebuilding HEAD
>                 Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
>                 Checking out Branch
>                 HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
>                 [workspace] $ git checkout -f
>                 32d47a124c0727f8c5f1ca6747562e776792d787
>                 HEAD is now at 32d47a1... New algorithm for
>                 externalizing order ids, as well as display code for
>                 it
>                 [workspace] $ git tag -l
>                 [workspace] $ git rev-parse hudson_needs_a_tag
>                 [workspace] $ git cat-file -p
>                 32d47a124c0727f8c5f1ca6747562e776792d787
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^^^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^^^^
>                
>                
>                 I don't have a Java development environment set up, so
>                 if somebody has a build of the Git plugin with your
>                 patch, I can try that as well?
>                
>                
>                 Cheers
>                
>                
>                 Sent from Zimbra
>                 ----- "R. Tyler Ballance" <tyler@...> wrote:
>                
>                         ----- "David Calavera" wrote: I think I found
>                         the problem, whether "git tag -l" returns
>                         nothing the
>                         plugin falls into an infinite loop.
>                                 I've created a ticket and I've
>                                 submitted a patch to
>                         plugins/git/GitSCM.java rev 11758:
>                                 https://hudson.dev.java.net/issues/show_bug.cgi?id=2274 
>                        
>                         Wow good catch, I'm somewhat disappointed that
>                         that didn't register
>                         with me when I was looking through the code ;)
>                        
>                         About how soon do you think this patch will
>                         make it into the main
>                         plugin repo?
>                        
>                        
>                        
>                         Cheers
>                        
>                         On Mon, Aug 25, 2008 at 9:42 PM, Kohsuke
>                         Kawaguchi <
>                         Kohsuke.Kawaguchi@... > wrote:
>                                 Maybe you should file an issue and
>                                 that might get an attention.
>                                 Or better yet, perhaps would you be
>                                 interested in hacking this
>                         plugin by yourself? :-)
>                        
>                        
>                                 R. Tyler Ballance wrote:
>                         I'm wondering if the maintainers of the Git
>                         plugin are lurking on this
>                        
>                                 list. We have a Git repository here
>                                 tracking the past three years of
>                         our
>                                 development history (~96k revisions in
>                                 SVN) and it clocks in at
>                         about
>                                 6GB (before `git gc` packs lots of the
>                                 refs).
>                                 When integrating Hudson with our Git
>                                 repository, for some reason the
>                                 plugin gets stuck in an infinite loop
>                                 of `git rev-parse` calls on
>                         the
>                                 same revision. After letting it run
>                                 for a couple hours I found out
>                         the
>                                 console that it generated (before I
>                                 aborted the job) was ~292MB
>                         large.
>                                 Full of this sort of mess:
>                                 [workspace] $ git tag -l [workspace] $
>                                 git rev-parse
>                                 e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^ [workspace] $ git rev-parse e4b506b9d4d0052aaf6e17b8c0afd21b5db8d6dd^^^^^^^ As you might assume the ^^^^^ stuff went on infinitely. There appear
>                         to
>                                 be two potentially infinite loops in
>                                 the code.
>                                
>                                 Note, this is using Git 1.6.0, so the
>                                 line parsing goop in the revParse()
>                                 function probably got broken in the
>                                 latest release
>                                
>                                 Any ideas? :)
>                                
>                                 (p.s. Hi Hudson devs! Keep up the good
>                                 work
>                                 http://unethicalblogger.com/posts/2008/08/oneline_automated_testing
>                         )
>                                
>                                
>                                 --
>                                 Kohsuke Kawaguchi Sun Microsystems
>                                 http://weblogs.java.net/blog/kohsuke/ 
>                                
>                                 --
>                                 David Calavera
>                                 http://www.thinkincode.net 
>                         ---------------------------------------------------------------------
>                         To unsubscribe, e-mail:
>                         dev-unsubscribe@...
>                         For additional commands, e-mail:
>                         dev-help@...
>                
>                 ---------------------------------------------------------------------
>                 To unsubscribe, e-mail:
>                 dev-unsubscribe@...
>                 For additional commands, e-mail:
>                 dev-help@...
>                
>        
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: dev-unsubscribe@...
>         For additional commands, e-mail: dev-help@...
>        
>        
>
>
>
> --
> David Calavera
> http://www.thinkincode.net
>
--
-R. Tyler Ballance
Slide, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Git plugin infinite loops

by nigelm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi guys - I've been on holiday (& I'm not sure I'm on hudson-dev - must have missed that - I'll subscribe now)

The rev-parse part you're seeing is indeed for building up the change log and reporting what's in the particular build. It's possible that 1.6.0 returns a different result causing it to not fail - I'll update my server and see. It shouldn't be infinite though, it should reach the start of the repository and then stop.

It's probably also broken if you have a huge repo that has never been built by hudson - it'll look all the way back to the beginning and then generate a change based on that (which is effectively going to be everything). It should probably return a log of 'new project build' rather than a pointless delta-of-everything. It should happen only the 1st build - but it will be slow - I'm hoping to incorporate the native Java JGit some time soon however.

Coming back to it having used git a bit more, I'm not even sure what a 'change log' ought to report when two branches that themselves have been building in hudson are merged - probably all the changes up to the common ancestor (which isn't what it's currently doing).

The quick-fix is to add a tag starting with 'hudson' on the branch that is failing. I'll try pushing a quick fix out in the next couple of hours.

R. Tyler Ballance-5 wrote:
On Wed, 2008-08-27 at 10:14 +0200, David Calavera wrote:
> I agree, indeed I don't know what it's trying to do. what does it add
> "^" in a loop? perhaps the revParse() method returns null if "git
> rev-parse" fails. I'm sorry but I'm newbie with git.


>From the git-rev-parse(1) manpage:

               o   A suffix ^ to a revision parameter means the first parent of that commit object. ^<n> means the <n>th parent (i.e. rev^ is equivalent to
                   rev^1). As a special rule, rev^0 means the commit itself and is used when rev is the object name of a tag object that refers to a commit
                   object.
       
               o   A suffix ~<n> to a revision parameter means the commit object that is the <n>th generation grand-parent of the named commit object, following
                   only the first parent. I.e. rev~3 is equivalent to rev^^^ which is equivalent to rev^1^1^1. See below for a illustration of the usage of this
                   form.


So what it looks like revParse() is trying to walk the revision history
list for some ungodly reason, my entirely uneducated guess is that it's
trying to walk the rev history .in order to fill out the "people" page
or something similarly silly, as I can't imagine why it would need to do
that for normal Hudson operation.

I'm wondering if the setOfThingsBuilt.contains code depends on having a
fully parsed revision history? (still can't imagine why that'd be
necessary).

Suffice to say between my friend Toad (from Amie Street) and myself,
we've got some pretty large Git repositories, and requiring a full
revision history parse to build inside of Hudson definitely won't scale.

Is the Git plugin maintainer around and conscious (feel like chiming
in?).

If not, i'll sit down and get a Hudson build environment set up this
weekend and see if I can get my hands dirty with the plugin ;)


Cheers
       
>
> On Wed, Aug 27, 2008 at 8:49 AM, Aleksandar Kostadinov
> <akostadi@redhat.com> wrote:
>         http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/plugins/git/src/main/java/hudson/plugins/git/GitSCM.java?r1=10953&r2=11758
>        
>         Actually if setOfThingsBuilt.contains(rev) never gets true,
>         the loop will be infinite as well. I entirely don't know about
>         the code but this loop seems very suspicious to me. Probably
>         some other escape condition must be added.
>         setOfThingsBuilt.isEmpty() seems not strong enough.
>        
>         R. Tyler Ballance wrote, On 08/27/2008 02:41 AM (EEST):
>        
>        
>                 I spoke too soon, i'm not entirely sure if this is the
>                 issue. A friend of mine (Toad on the #hudson channel
>                 on freenode) tried adding a tag into his Git
>                 repository and re-running his Git-job with the
>                 following results:
>                
>                 [workspace] $ git rev-parse HEAD
>                 Nothing to do (no unbuilt branches) - rebuilding HEAD
>                 Branch HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
>                 Checking out Branch
>                 HEAD(32d47a124c0727f8c5f1ca6747562e776792d787)
>                 [workspace] $ git checkout -f
>                 32d47a124c0727f8c5f1ca6747562e776792d787
>                 HEAD is now at 32d47a1... New algorithm for
>                 externalizing order ids, as well as display code for
>                 it
>                 [workspace] $ git tag -l
>                 [workspace] $ git rev-parse hudson_needs_a_tag
>                 [workspace] $ git cat-file -p
>                 32d47a124c0727f8c5f1ca6747562e776792d787
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^^^
>                 [workspace] $ git rev-parse
>                 32d47a124c0727f8c5f1ca6747562e776792d787^^^^^
>                
>                
>                 I don't have a Java development environment set up, so
>                 if somebody has a build of the Git plugin with your
>                 patch, I can try that as well?
>                
>                
>                 Cheers
>                
>                
>                 Sent from Zimbra
>                 ----- "R. Tyler Ballance" <tyler@slide.com> wrote:
>                
>                         ----- "David Calavera" wrote: I think I found
>                         the problem, whether "git tag -l" returns
>                         nothing the
>                         plugin falls into an infinite loop.
>                                 I've created a ticket and I've
>                                 submitted a patch to
>                         plugins/git/GitSCM.java rev 11758:
>                                 https://hudson.dev.java.net/issues/show_bug.cgi?id=2274 
>                        
>                         Wow good catch, I'm somewhat disappointed that
>                         that didn't register
>                         with me when I was looking through the code ;)
>                        
>                         About how soon do you think this patch will
>                         make it into the main
>                         plugin repo?
>                        
>                        
>                        
>                         Cheers
>                        
>                         On Mon, Aug 25, 2008 at 9:42 PM, Kohsuke
>                         Kawaguchi <
>                         Kohsuke.Kawaguchi@sun.com > wrote:
>                                 Maybe you should file an issue and
>                                 that might get an attention.
>                                 Or better yet, perhaps would you be
>                                 interested in hacking this
>                         plugin by yourself? :-)
>                        
>                        
>                                 R. Tyler Ballance wrote:
>                         I'm wondering if the maintainers of the Git
>                         plugin are lurking on this
>                        
>                                 list. We have a Git repository here
>                                 tracking the past three years of
>                         our
>                                 development history (~96k revisions in
>                                 SVN) and it clocks in at
>                         about
>                                 6GB (before `git gc` packs lots of the
>                                 refs).
>                                 Wh