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

Re: ra_serf bug(s)

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: Fri, 10 Oct 2014 17:41:01 +0200

On Tue, Oct 7, 2014 at 2:57 PM, Conrad Rad <cse.cem_at_gmail.com> wrote:
> Hi all,
>
> I'm working on a thing that links libsvn_ra_serf (default RA in Fedora
> Linux) as well as other pieces of the SVN libraries.
>
> I am using the 'replay' feature to dump edits from a remote repository.
>
> Inadvertently, I requested r0 as my starting_revision. This is my
> mistake, however: nothing in the generic replay or ra_serf-specific
> replay code produced a warning or error. This could be improved if r0
> is always invalid (first bug). (I am less confident about this one
> than the next one.)
>
> ra_serf makes a series of valid requests (200 OK) before finally
> asking the server for REPLAY of r0. In this case the server is
> googlecode.com. In response to the invalid REPLAY it gave a 500 Server
> Error response. I will attach a pcap.

Googlecode returns the 500 Internal Error, svn.apache.org will happily
return the content of r0.
IMO googlecode is doing the wrong thing here, there's nothing special
about r0 (it's empty, but still a valid revision).

> The second bug is: ra_serf ignores the 500 response and then waits
> forever for a valid response that isn't coming. So at this point the
> program is just stuck in svn_ra_replay_range ->
> svn_ra_serf__replay_range -> svn_ra_serf__context_run_wait -> ... ->
> epoll(2) forever, when it should have aborted and returned an error on
> the 500.
>
> I'm guessing that a fix might involve toggling
> no_fail_on_http_failure_status or setting up a response_error()
> handler on the svn_ra_serf__handler_t, but I'm not an expert on SVN
> internals.
>
> I'm using subversion-1.8.10, libserf-1.3.7, and apr-1.5.1 from Fedora 20.

It looks like this issue has been solved on trunk. When I use a
modified svnsync with start_revision set to 0, and sync from a
googlecode repo, I get following error from the 500 error response:

subversion/svnsync/svnsync.c:1558,
subversion/svnsync/svnsync.c:1504,
subversion/libsvn_ra/ra_loader.c:1358,
subversion/libsvn_ra_serf/replay.c:788,
subversion/libsvn_ra_serf/util.c:930,
subversion/libsvn_ra_serf/util.c:895,
subversion/libsvn_ra_serf/multistatus.c:560:
(apr_err=SVN_ERR_FS_NO_SUCH_REVISION)
svnsync: E160006: No such revision -1

Maybe you can try your program with svn trunk libraries to see if it
works for you too?

Lieven

> Thanks,
> Conrad
Received on 2014-10-10 17:41:54 CEST

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.