You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lieven Govaerts <lg...@mobsol.be> on 2006/06/25 06:49:07 UTC

[BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk (was: Crash in 1.4 with "svn commit -N . something")

Hi, 


a few days ago Nicolás reported a bug on this list
(http://svn.haxx.se/dev/archive-2006-06/0689.shtml) that seems to be a
regression compared to 1.3. I'm reposting it to make sure we solve it in
1.4.

The problem:
1. checkout a branch in /tmp/trunk
2. alter a file test in the trunk wc
3. svn commit -N /tmp/trunk /tmp/trunk/test

On my machine (windows xp) with svn 1.4_RC1 and trunk, the svn process will
start using huge amounts of memory (increasing 100MB per sec) before it
crashes. Server is apache 2.0.55 with svn trunk modules.

Attached is a python test that triggers this problem. Please do not commit
this to the repository before the issue is solved! The original mail from
Nicolás also contains a short analysis of the problem and a patch.

Nicolás, can you report this in the issue tracker? Otherwise I'll do it.

regards,

Lieven.

[[[
Test committing two overlapping targets non-recursively.

* subversion/tests/cmdline/commit_tests.py
  (commit_same_folder_in_targets): New test
  (test_list): Run the new commit test.
]]]

Re: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/27/06, Lieven Govaerts <lg...@mobsol.be> wrote:
>
>
> > -----Original Message-----
> > From: rooneg@gmail.com [mailto:rooneg@gmail.com] On Behalf Of
> > Garrett Rooney
> ...
> > Oh, and for what it's worth, I'm not seeing the huge amounts
> > of memory behavior here.  I get crashes, but it crashes
> > quickly, with no sign of spiraling out of control memory use
> > or anything like that...
> >
> > -garrett
>
> Well, maybe you should read my next mail, in which I describe the reason why
> you (probably on Linux) see a crash and I (on Windows) see huge memory
> usage. It's all in there ;)
>
> http://svn.haxx.se/dev/archive-2006-06/0872.shtml

Ahh, I looked in the issue, but didn't see anything about that part ;-)

Will review the patch now, thanks!

-garrett

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

RE: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk

Posted by Lieven Govaerts <lg...@mobsol.be>.

> -----Original Message-----
> From: rooneg@gmail.com [mailto:rooneg@gmail.com] On Behalf Of 
> Garrett Rooney
...
> Oh, and for what it's worth, I'm not seeing the huge amounts 
> of memory behavior here.  I get crashes, but it crashes 
> quickly, with no sign of spiraling out of control memory use 
> or anything like that...
> 
> -garrett

Well, maybe you should read my next mail, in which I describe the reason why
you (probably on Linux) see a crash and I (on Windows) see huge memory
usage. It's all in there ;)

http://svn.haxx.se/dev/archive-2006-06/0872.shtml

Lieven. 

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

Re: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/27/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 6/27/06, C. Michael Pilato <cm...@collab.net> wrote:
> > Garrett Rooney wrote:
> > >> On my machine (windows xp) with svn 1.4_RC1 and trunk, the svn process
> > >> will
> > >> start using huge amounts of memory (increasing 100MB per sec) before it
> > >> crashes. Server is apache 2.0.55 with svn trunk modules.
> > >>
> > >> Attached is a python test that triggers this problem. Please do not
> > >> commit
> > >> this to the repository before the issue is solved! The original mail from
> > >> Nicolás also contains a short analysis of the problem and a patch.
> > >
> > >
> > > Is there any reason not to commit this as XFail?
> >
> > Did you miss the part about the problem causing the svn process to use "huge
> > amounts of memory (increasing 100MB per sec) before it crashes"?
> >
> > If anything, we should commit it as a *skipped* test.
>
> Ahh, yeah, sorry, must have missed that part ;-)

Oh, and for what it's worth, I'm not seeing the huge amounts of memory
behavior here.  I get crashes, but it crashes quickly, with no sign of
spiraling out of control memory use or anything like that...

-garrett

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


Re: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/27/06, C. Michael Pilato <cm...@collab.net> wrote:
> Garrett Rooney wrote:
> >> On my machine (windows xp) with svn 1.4_RC1 and trunk, the svn process
> >> will
> >> start using huge amounts of memory (increasing 100MB per sec) before it
> >> crashes. Server is apache 2.0.55 with svn trunk modules.
> >>
> >> Attached is a python test that triggers this problem. Please do not
> >> commit
> >> this to the repository before the issue is solved! The original mail from
> >> Nicolás also contains a short analysis of the problem and a patch.
> >
> >
> > Is there any reason not to commit this as XFail?
>
> Did you miss the part about the problem causing the svn process to use "huge
> amounts of memory (increasing 100MB per sec) before it crashes"?
>
> If anything, we should commit it as a *skipped* test.

Ahh, yeah, sorry, must have missed that part ;-)

-garrett

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


Re: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk

Posted by "C. Michael Pilato" <cm...@collab.net>.
Garrett Rooney wrote:
>> On my machine (windows xp) with svn 1.4_RC1 and trunk, the svn process
>> will
>> start using huge amounts of memory (increasing 100MB per sec) before it
>> crashes. Server is apache 2.0.55 with svn trunk modules.
>>
>> Attached is a python test that triggers this problem. Please do not
>> commit
>> this to the repository before the issue is solved! The original mail from
>> Nicolás also contains a short analysis of the problem and a patch.
> 
> 
> Is there any reason not to commit this as XFail?

Did you miss the part about the problem causing the svn process to use "huge
amounts of memory (increasing 100MB per sec) before it crashes"?

If anything, we should commit it as a *skipped* test.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk (was: Crash in 1.4 with "svn commit -N . something")

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/25/06, Lieven Govaerts <lg...@mobsol.be> wrote:
> Hi,
>
>
> a few days ago Nicolás reported a bug on this list
> (http://svn.haxx.se/dev/archive-2006-06/0689.shtml) that seems to be a
> regression compared to 1.3. I'm reposting it to make sure we solve it in
> 1.4.
>
> The problem:
> 1. checkout a branch in /tmp/trunk
> 2. alter a file test in the trunk wc
> 3. svn commit -N /tmp/trunk /tmp/trunk/test
>
> On my machine (windows xp) with svn 1.4_RC1 and trunk, the svn process will
> start using huge amounts of memory (increasing 100MB per sec) before it
> crashes. Server is apache 2.0.55 with svn trunk modules.
>
> Attached is a python test that triggers this problem. Please do not commit
> this to the repository before the issue is solved! The original mail from
> Nicolás also contains a short analysis of the problem and a patch.

Is there any reason not to commit this as XFail?

-garrett

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


Re: [PATCH] fix for issue 2576 ( was: RE: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/26/06, Lieven Govaerts <lg...@mobsol.be> wrote:
> Hi,
>
> this issue is now known as issue #2576:
> http://subversion.tigris.org/issues/show_bug.cgi?id=2576.
>
> I think what happens is this:
>
> example: svn ci -m "log msg" -N commit_tests-35 commit_tests-35\iota
> commit_tests-35\A.
>
> Normally (without -N) svn will calculate the shared base folder
> (commit_tests-35), lock that folder and automatically lock all subfolders. A
> and iota are considered as relative paths, and svn just checks if there need
> to be other locks set.
>
> With the -N option, that calculation of the shared base folder is not
> executed, so svn will see three 'relative' paths:
> commit_tests-35, commit_tests-35\iota and commit_tests-35\A. svn will add
> both commit_tests-35 and commit_tests-35\A to the list of to-be-locked
> folders. Problem is that folder commit_tests-35 is already locked (because
> it's the base folder) and then locked again because it's in the list
> dirs_to_lock. Locking a folder twice fails.
>
> To make it worse, the safety measure that aborts the while loop to find the
> parent folders doesn't work on Windows, because the root folder '/' is not
> recognized. So on Linux this code just aborts, on Windows it will loop until
> we get a stack overflow:
> if (target[0] == '/' && target[1] == '\0')
>   abort();
>
> Attached is a patch that solves this issue. Please review thoroughly,
> because I'm not familiar with this code.

Seems fine to me.  Applied in r20276.  Thanks!

-garrett

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

[PATCH] fix for issue 2576 ( was: RE: [BUG] regression: 'svn commit -N folder folder' will crash svn 1.4 and trunk)

Posted by Lieven Govaerts <lg...@mobsol.be>.
Hi, 

this issue is now known as issue #2576:
http://subversion.tigris.org/issues/show_bug.cgi?id=2576.

I think what happens is this:

example: svn ci -m "log msg" -N commit_tests-35 commit_tests-35\iota
commit_tests-35\A.

Normally (without -N) svn will calculate the shared base folder
(commit_tests-35), lock that folder and automatically lock all subfolders. A
and iota are considered as relative paths, and svn just checks if there need
to be other locks set.

With the -N option, that calculation of the shared base folder is not
executed, so svn will see three 'relative' paths:
commit_tests-35, commit_tests-35\iota and commit_tests-35\A. svn will add
both commit_tests-35 and commit_tests-35\A to the list of to-be-locked
folders. Problem is that folder commit_tests-35 is already locked (because
it's the base folder) and then locked again because it's in the list
dirs_to_lock. Locking a folder twice fails.

To make it worse, the safety measure that aborts the while loop to find the
parent folders doesn't work on Windows, because the root folder '/' is not
recognized. So on Linux this code just aborts, on Windows it will loop until
we get a stack overflow:
if (target[0] == '/' && target[1] == '\0')                    
  abort();

Attached is a patch that solves this issue. Please review thoroughly,
because I'm not familiar with this code. 

regards,

Lieven.
[[[
Fix for issue 2576: Don't lock the base folder twice when
committing overlapping targets non-recursively.

* subversion/libsvn_client/commit.c
  (svn_client_commit3): add extra checks to avoid adding the
   base folder to dirs_to_lock. 
   Catch a potential stack overflow on Windows, abort()
   instead.

* subversion/tests/cmdline/commit_tests.py
  (commit_same_folder_in_targets): New test
  (test_list): Run the new commit test.

]]]

> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@mobsol.be] 
> Sent: zondag 25 juni 2006 8:49
> To: dev@subversion.tigris.org
> Cc: 'Nicolás Lichtmaier'
> Subject: [BUG] regression: 'svn commit -N folder folder' will 
> crash svn 1.4 and trunk (was: Crash in 1.4 with "svn commit 
> -N . something")
> 
> Hi, 
> 
> 
> a few days ago Nicolás reported a bug on this list
> (http://svn.haxx.se/dev/archive-2006-06/0689.shtml) that 
> seems to be a regression compared to 1.3. I'm reposting it to 
> make sure we solve it in 1.4.
> 
> The problem:
> 1. checkout a branch in /tmp/trunk
> 2. alter a file test in the trunk wc
> 3. svn commit -N /tmp/trunk /tmp/trunk/test
> 
> On my machine (windows xp) with svn 1.4_RC1 and trunk, the 
> svn process will start using huge amounts of memory 
> (increasing 100MB per sec) before it crashes. Server is 
> apache 2.0.55 with svn trunk modules.
> 
> Attached is a python test that triggers this problem. Please 
> do not commit this to the repository before the issue is 
> solved! The original mail from Nicolás also contains a short 
> analysis of the problem and a patch.
> 
> Nicolás, can you report this in the issue tracker? Otherwise 
> I'll do it.
> 
> regards,
> 
> Lieven.
> 
> [[[
> Test committing two overlapping targets non-recursively.
> 
> * subversion/tests/cmdline/commit_tests.py
>   (commit_same_folder_in_targets): New test
>   (test_list): Run the new commit test.
> ]]]
>