[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Recursion of copy_source_ops() causes stack overflow in Apache

From: Robin Boerdijk <robin_boerdijk_at_yahoo.com>
Date: 2007-01-26 12:01:46 CET

--- Malcolm Rowe <malcolm-svn-dev@farside.org.uk> wrote:

> On Mon, Jan 22, 2007 at 01:07:20AM -0800, Robin Boerdijk wrote:
> > I have instrumented my copy of the SVN 1.4.2 source code tree to
> trace
> > this problem, all the way from dav_svn_deliver_report() in
> mod_dav_svn
> > to copy_source_ops() in libsvn_delta. My conclusion is that the
> > recursion of copy_source_ops() causes the stack overflow. In my
> case,
> > the stack overflow occurred at a recursion depth of 2183.
> >
> > My question: Is this a bug or is it normal for copy_source_ops() to
> > recurse so deep?
> >
> It seems likely you've found a bug in the delta combiner. I've spent
> a little time looking at the code, and while it's a little.. complex
> in
> some places, there's nothing immediate that springs out as a problem.
> If you aren't able to make the contents public (or semi-public), you
> could
> also help by giving us more details about the recursion. For
> example,
> which one of the three (IIRC) recursive calls to copy_source_ops()
> is being used? Are the local variables at the point of recursion the
> same for every iteration? Whether they are or not, could you give us
> a sample of their values in a few consecutive iterations?

Someone on the #svn-dev IRC channel thought that the deep recursive
behaviour of copy_source_ops() was perhaps exceptional but not a bug.
But what I'm afraid of is that copy_source_ops() does not have a
theoretically maximum recursion depth.

BTW. I managed to make the problem go away by rebuilding Apache with a
stack size of 1MB (instead of the 256KB used by the stock Apache
build). I will post some more detailed tracing data from this
environment next week.


Robin Boerdijk

Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 26 12:02:01 2007

This is an archived mail posted to the Subversion Dev mailing list.