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

Bug/Undocumented behaviour

From: Philipp Marek <philipp_at_marek.priv.at>
Date: 2007-10-18 19:52:48 CEST

Hello everybody,

Ben suggested on IRC that I ask here.

While debugging FSVS (fsvs.tigris.org) via IRC a user gave me a stack dump,
it that we can see that the svn stream functions get called with
parameters in an undocumented range, ie.
svn_stream_write()/svn_stream_read() with data=NULL - and that for an
unlimited number of times at the end of a file.

In FSVS I resolved that by assuming that data=NULL means more or less the same
as a svn_stream_close(), which fixed the apparent problem.

I'm not sure whether that is a bug in libsvn_ra or below, or whether that is
normal behaviour ... it happens only for http:// and https://, not for file://
or svn+ssh://.

Here's the stackdump ... indented and marked:

  #0 0x001e57a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
  #1 0x002b8c93 in __read_nocancel () from /lib/tls/libc.so.6
  #2 0x0805237b in sigDebug (num=11) at fsvs.c:647
  #3 <signal handler called>
  #4 0x0804bfa8 in cs___update_manber (mb_f=0x8071960, data=0x0, len=0) at checksum.c:660
1-#5 0x0804c1aa in cs___mnbs_write (baton=0x8071960, data=0x0, len=0xbfe72efc) at checksum.c:738
--#6 0x00cea44e in svn_stream_write (stream=0x9cfc348, data=0x0, len=0x0) at subversion/libsvn_subr/stream.c:107
2-#7 0x00c07a41 in get_file_reader (userdata=0xbfe73024, buf=0x0, len=0) at subversion/libsvn_ra_dav/fetch.c:709
  #8 0x00c84f40 in ne_redirect_location () from /usr/lib/libneon.so.24
  #9 0x00c7b420 in ne_read_response_block () from /usr/lib/libneon.so.24
  #10 0x00c7c79b in ne_request_dispatch () from /usr/lib/libneon.so.24
  #11 0x00c1486b in svn_ra_dav__request_dispatch (code_p=0x0, request=0x9ccf6b0, session=0x0, method=0x3287bc "", url=0x3287bc "", okay_1=200, okay_2=226, pool=0x9cfc280) at subversion/libsvn_ra_dav/util.c:978
  #12 0x00c075c0 in custom_get_request (sess=0x9c5c360, url=0x9cfe620 "/fsvs-master/!svn/bc/6/hosts/cobtest/etc/cobbler/centos4-server.ks",relpath=0x9cebd8e "centos4-server.ks", reader=0xc079cb <get_file_reader>, subctx=0xbfe730c4, get_wc_prop=0, cb_baton=0x0, use_base=0, pool=0x9cfc280) at subversion/libsvn_ra_dav/fetch.c:490
  #13 0x00c07d96 in svn_ra_dav__get_file (session=0x9c50480, path=0x9cebd8e "centos4-server.ks", revision=6, stream=0x9cfc348, fetched_rev=0xbfe731dc, props=0xbfe731a8, pool=0x9cfc280) at subversion/libsvn_ra_dav/fetch.c:892
3-#14 0x00adcbc4 in svn_ra_get_file (session=0x3287bc, path=0x0, revision=0, stream=0x0, fetched_rev=0x0, props=0x0, pool=0x0) at subversion/libsvn_ra/ra_loader.c:429
  #15 0x08059cca in rev__get_file (sts=0x9cdcc60, revision=6, fetched=0xbfe731dc, only_tmp=0x0, pool=0x9cdac70) at revert.c:273
  #16 0x0805a6fd in rev__do_changed (session=0x9c50480, dir=0xbfe7329c, pool=0x9c45240) at revert.c:678
  #17 0x0805dcbc in up__work (root=0xbfe7329c, argc=0, argv=0xbfe733cc) at update.c:1363
  #18 0x08052cd0 in main (argc=0, args=0xbfe733c4) at fsvs.c:991
  #19 0x00213de3 in __libc_start_main () from /lib/tls/libc.so.6
  #20 0x0804ac55 in _start ()

In (3) the call into the subversion libraries can be seen ...
svn_ra_get_file() on a https:// URL. In (1) FSVS gets its svn_stream
handler called ... with NULLs propagating from at least (2).

The documentation at
doesn't mention NULL parameters.

Sadly only the FSVS binary was compiled with debug information (the svn
libraries were off-the-shelf from CentOS5).

Any ideas? Thank you in advance.



Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 18 19:53:03 2007

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.