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

[BUG]: 1.0.1 svn_ra_dav seems to have a mem allocation problem

From: Dominik Westner <lists_at_logicunited.com>
Date: 2004-03-19 19:08:50 CET

Hi,

I spent hours trying to debug this, but I am feeling like this might be
a bug in svn_ra_dav. I am using svn 1.0.1 (but the problem also occured
with 1.0).

For my Mac OS X svn client Sven I am using the svn C-API. I am running
into the problem that any (e.g. update, commit, status, log) operation
which will access the svn_ra_dav layer crashes with a EXC_BAD_ACCESS.
I also get warnings about double freed memory shortly before the crash.
I suspected incorrect pool usage from my side. Usually for every svn
operation I use a temporary subpool from my global application pool,
which gets cleared after the operation has finished. I disabled the
clearing, no help. I used a global pool for everything, no help. I used
a mutex for memory allocation of the pools, no help. I disabled
multithreading, no help.

Funny enough it works better on my slow G4 Powerbook, but it always
crashes on my Dual G5. So I disabled one CPU, but it did not help.

If I am using a local repository everything works just fine. I did not
try ra_svn schema, though.

Here is a typical back trace:

(gdb) bt
#0 0x94a5bd9c in xmlHashFree ()
#1 0x01285474 in xmlFreeParserCtxt (ctxt=0x11d9470) at
parserInternals.c:1697
#2 0x0047c334 in ne_xml_destroy ()
#3 0x0066aad8 in parsed_request (sess=0x2838400, method=0x66d5b0
"PROPFIND", url=0x28918e8 "/trunk/sven", body=0x287baa8 "PROPFIND of
'/trunk/sven'", body_file=0x28f6e00, set_parser=0x667f60 <set_parser>,
elements=0x66e8e4, use_neon_shim=42729472, validate_compat_cb=0x667b24
<validate_element>, startelm_compat_cb=0x667bf4 <start_element>,
endelm_compat_cb=0x667d24 <end_element>, startelm_cb=0, cdata_cb=0,
endelm_cb=0, baton=0xbfffe890, extra_headers=0x28918f8,
status_code=0x0, pool=0x2856218) at subversion/libsvn_ra_dav/util.c:658
#4 0x0066abf8 in svn_ra_dav__parsed_request_compat (sess=0x3,
method=0x90001000 "\277A\377\350|{\ey|\b\002\246B\237", url=0x3e8
<Address 0x3e8 out of bounds>, body=0x80808080 <Address 0x80808080 out
of bounds>, body_file=0x1, set_parser=0x7, elements=0xa00011ac,
validate_cb=0xdee, startelm_cb=0x667bf4 <start_element>,
endelm_cb=0x667d24 <end_element>, baton=0xbfffe890,
extra_headers=0x28918f8, status_code=0x0, pool=0x2856218) at
subversion/libsvn_ra_dav/util.c:707
#5 0x00668168 in svn_ra_dav__get_props (results=0x667f60,
sess=0x2856218, url=0x2891810
"\002\205b\030\002\211\030P\001\034|\360\001\035\023P", depth=42449576,
label=0x28f6800 "", which_props=0x1345268, pool=0x28f6e00) at
subversion/libsvn_ra_dav/props.c:525
#6 0x00668224 in svn_ra_dav__get_props_resource (rsrc=0xbfffea40,
sess=0x2838400, url=0x28918c8 "/trunk/sven", label=0x0,
which_props=0x66e7b4, pool=0x2856218) at
subversion/libsvn_ra_dav/props.c:552
#7 0x0066842c in svn_ra_dav__search_for_starting_props
(rsrc=0xbfffea40, missing_path=0xbfffea44, sess=0x2838400,
url=0x80808080 <Address 0x80808080 out of bounds>, pool=0x2856218) at
subversion/libsvn_ra_dav/props.c:653
#8 0x00668618 in svn_ra_dav__get_baseline_props
(bc_relative=0xbfffeab0, bln_rsrc=0xbfffeac0, sess=0x2838400,
url=0x80808080 <Address 0x80808080 out of bounds>, revision=-1,
which_props=0x66e7dc, pool=0x2856218) at
subversion/libsvn_ra_dav/props.c:762
#9 0x006687d8 in svn_ra_dav__get_baseline_info (is_dir=0xbfffeb30,
bc_url=0x0, bc_relative=0x0, latest_rev=0x0, sess=0x2838400, url=0x7
<Address 0x7 out of bounds>, revision=-1610608212, pool=0x2856218) at
subversion/libsvn_ra_dav/props.c:887
#10 0x00668cf0 in svn_ra_dav__do_check_path (session_baton=0x2891810,
path=0x90001000 "\277A\377\350|{\ey|\b\002\246B\237", revision=-1,
kind=0xbfffebfc, pool=0x2856218) at
subversion/libsvn_ra_dav/props.c:1127
#11 0x00283e50 in svn_client_status (result_rev=0x28918e8,
path=0x2856250 "/Users/dominik/Developer/Sven", revision=0x66d5b0,
status_func=0x27c0a98 <wc_status_callback>, status_baton=0x118cf90,
descend=0, get_all=6744292, update=1, no_ignore=0, ctx=0x2847250,
pool=0x2856218) at subversion/libsvn_client/status.c:182
<<<<<<<< below is Sven specific code>>>>>>>
#12 0x027c2c58 in -[SVNClient
statusDictionaryForPath:descend:mode:all:] (self=0x118c1c0,
_cmd=0x27c46f8, aPath=0x11d9ca0, descend=0 '\0',
mode=svn_update_mode_update, all=1 '\001') at
/Users/dominik/Developer/Sven/svn/SVNClient.m:557
#13 0x027c2ab8 in -[SVNClient reloadPath:descend:mode:]
(self=0x118c1c0, _cmd=0x1268b8c, path=0x11d9ca0, descend=0 '\0',
mode=svn_update_mode_update) at
/Users/dominik/Developer/Sven/svn/SVNClient.m:537
#14 0x0126748c in -[SVNDocument statusForPath:descend:mode:]
(self=0x118a910, _cmd=0x1268660, path=0x0, descend=0 '\0',
mode=svn_update_mode_update) at
/Users/dominik/Developer/Sven/SVNDocument.m:319
#15 0x012672ac in -[SVNDocument statusForPath:descend:update:]
(self=0x118a910, _cmd=0x126869c, aPath=0x0, descend=1 '\001', update=1
'\001') at /Users/dominik/Developer/Sven/SVNDocument.m:303
#16 0x027e2a7c in -[SVNWindowController refreshStatus:]
(self=0x11a2540, _cmd=0x27e4780, sender=0x11b5980) at
/Users/dominik/Developer/Sven/SVNWindowController.m:217
#17 0x92f2a89c in -[NSToolbarButton sendAction:to:] ()
#18 0x92f2a83c in -[NSToolbarButton sendAction] ()
#19 0x92eaa6a0 in -[NSToolbarItemViewer mouseDown:] ()
#20 0x92e02c60 in -[NSWindow sendEvent:] ()
#21 0x92df5324 in -[NSApplication sendEvent:] ()
#22 0x92dfd73c in -[NSApplication run] ()
#23 0x92eb9b80 in NSApplicationMain ()
#24 0x00016f74 in main (argc=1, argv=0xbffffd20) at
/Users/dominik/Developer/Sven/main.m:14

It looks like the svn_ra_session_t does not contain a valid url have no
idea why...

Any help appreciated.

Thanks

Dominik

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 19 19:09:06 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.