You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2013/02/07 21:30:01 UTC
svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Author: cmpilato
Date: Thu Feb 7 20:30:01 2013
New Revision: 1443705
URL: http://svn.apache.org/r1443705
Log:
Followup to r1443578, hopefully fixing some segfaults triggered on
certain buildbots.
* subversion/libsvn_ra_serf/commit.c
(checkout_node): Canonicalize the parsed Location header URI as a urlpath.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/commit.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1443705&r1=1443704&r2=1443705&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Thu Feb 7 20:30:01 2013
@@ -326,8 +326,8 @@ checkout_node(const char **working_url,
if (status)
return svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
_("Error parsing Location header value"));
-
- *working_url = apr_pstrdup(result_pool, uri.path);
+
+ *working_url = svn_urlpath__canonicalize(uri.path, result_pool);
return SVN_NO_ERROR;
}
Re: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
>> The RFC's defining a new header don't always tell what users do on
>> their servers, nor what older apache httpd versions implemented.
>
> The buildbot runs apache 2.2.3.
Thanks for tracking this down, guys!
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development
Re: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:
>> -----Original Message-----
>> From: C. Michael Pilato [mailto:cmpilato@collab.net]
>> Sent: vrijdag 8 februari 2013 15:22
>> To: dev@subversion.apache.org
>> Cc: Bert Huijben; commits@subversion.apache.org
>> Subject: Re: svn commit: r1443705 -
>> /subversion/trunk/subversion/libsvn_ra_serf/commit.c
>>
>> On 02/07/2013 05:23 PM, Bert Huijben wrote:
>> > Could this be caused by the difference between redirecting to
>> > /some/subdir and http://server/some/subdir ?
>>
>> RFC2616 states that the value of the Location header as an "absoluteURI".
>> So, I *hope* that's not the difference.
>
> As philip's mail confirmed this *was* the problem.
>
> The RFC's defining a new header don't always tell what users do on
> their servers, nor what older apache httpd versions implemented.
The buildbot runs apache 2.2.3.
--
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
RE: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: C. Michael Pilato [mailto:cmpilato@collab.net]
> Sent: vrijdag 8 februari 2013 15:22
> To: dev@subversion.apache.org
> Cc: Bert Huijben; commits@subversion.apache.org
> Subject: Re: svn commit: r1443705 -
> /subversion/trunk/subversion/libsvn_ra_serf/commit.c
>
> On 02/07/2013 05:23 PM, Bert Huijben wrote:
> > Could this be caused by the difference between redirecting to
> > /some/subdir and http://server/some/subdir ?
>
> RFC2616 states that the value of the Location header as an "absoluteURI".
> So, I *hope* that's not the difference.
As philip's mail confirmed this *was* the problem.
The RFC's defining a new header don't always tell what users do on their servers, nor what older apache httpd versions implemented.
(Recent versions fix the location header if a wrong value is supplied... older versions didn't)
See r1443906, which fixed the failure on the buildbot.
And I know that every common browser allows at least server root relative urls in this header, but I think even normal relative paths.
Bert
Re: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/07/2013 05:23 PM, Bert Huijben wrote:
> Could this be caused by the difference between redirecting to
> /some/subdir and http://server/some/subdir ?
RFC2616 states that the value of the Location header as an "absoluteURI".
So, I *hope* that's not the difference.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development
Re: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/07/2013 05:23 PM, Bert Huijben wrote:
> Could this be caused by the difference between redirecting to
> /some/subdir and http://server/some/subdir ?
RFC2616 states that the value of the Location header as an "absoluteURI".
So, I *hope* that's not the difference.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development
Re: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by Philip Martin <co...@ntlworld.com>.
Philip Martin <co...@ntlworld.com> writes:
>> $ gdb -arg ../../svn/.libs/lt-svn info http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1 --config-dir /home/bt/packages/subversion-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
>> (gdb) b response_get_location
>> (gdb) r
>> Breakpoint 1, response_get_location (response=0xeb580f8, repos_root_url=0x0,
>> pool=0xeb3bfa8) at subversion/libsvn_ra_serf/util.c:1000
>> 1000 headers = serf_bucket_response_get_headers(response);
>> (gdb) n
>> 1001 location = serf_bucket_headers_get(headers, "Location");
>> (gdb)
>> 1002 if (location == NULL)
>> (gdb)
>> 1007 if (*location == '/')
>> (gdb)
>> 1009 const char *root_url = repos_root_url;
>> (gdb) p *location
>> $2 = 47 '/'
>> (gdb) n
>> 1011 while (! svn_uri_is_root(root_url, strlen(root_url)))
>> (gdb) n
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00002b82e9c48951 in response_get_location (response=0xeb580f8,
>> repos_root_url=0x0, pool=0xeb3bfa8)
>> at subversion/libsvn_ra_serf/util.c:1011
>> 1011 while (! svn_uri_is_root(root_url, strlen(root_url)))
>
> What I should have printed:
>
> (gdb) p location
> $3 = 0x16d36de8 "/svn-test-work/repositories/redirect_tests-1"
> (gdb) p root_url
> $4 = 0x0
> (gdb) p repos_root_url
> $5 = 0x0
Comparing to my own machine with serf 1.2 and apr 1.4.6 I get
(gdb) p location
$1 = 0x6642a8 "http://localhost:8888/svn-test-work/repositories/redirect_tests-1"
(gdb) p repos_root_url
$2 = 0x0
So the different location avoids the code that uses the NULL
repos_root_url.
--
Philip
Re: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by Philip Martin <co...@ntlworld.com>.
Philip Martin <ph...@wandisco.com> writes:
> "Bert Huijben" <be...@qqmail.nl> writes:
>
>>> -----Original Message-----
>>> From: cmpilato@apache.org [mailto:cmpilato@apache.org]
>>> Sent: donderdag 7 februari 2013 21:30
>>> To: commits@subversion.apache.org
>>> Subject: svn commit: r1443705 -
>>> /subversion/trunk/subversion/libsvn_ra_serf/commit.c
>>>
>>> Author: cmpilato
>>> Date: Thu Feb 7 20:30:01 2013
>>> New Revision: 1443705
>>>
>>> URL: http://svn.apache.org/r1443705
>>> Log:
>>> Followup to r1443578, hopefully fixing some segfaults triggered on
>>> certain buildbots.
>>
>> Could this be caused by the difference between redirecting to
>> /some/subdir and http://server/some/subdir ?
>>
>> The Windows buildbot uses the configuration written by win-tests.py;
>> I'm not sure which httpd configuration the centos buildbot uses.
>
> The centos buildbot uses serf 1.0.3, APR 1.2.7 and APR-Util 1.2.7.
>
> $ gdb -arg ../../svn/.libs/lt-svn info http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1 --config-dir /home/bt/packages/subversion-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
> (gdb) b response_get_location
> (gdb) r
> Breakpoint 1, response_get_location (response=0xeb580f8, repos_root_url=0x0,
> pool=0xeb3bfa8) at subversion/libsvn_ra_serf/util.c:1000
> 1000 headers = serf_bucket_response_get_headers(response);
> (gdb) n
> 1001 location = serf_bucket_headers_get(headers, "Location");
> (gdb)
> 1002 if (location == NULL)
> (gdb)
> 1007 if (*location == '/')
> (gdb)
> 1009 const char *root_url = repos_root_url;
> (gdb) p *location
> $2 = 47 '/'
> (gdb) n
> 1011 while (! svn_uri_is_root(root_url, strlen(root_url)))
> (gdb) n
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00002b82e9c48951 in response_get_location (response=0xeb580f8,
> repos_root_url=0x0, pool=0xeb3bfa8)
> at subversion/libsvn_ra_serf/util.c:1011
> 1011 while (! svn_uri_is_root(root_url, strlen(root_url)))
What I should have printed:
(gdb) p location
$3 = 0x16d36de8 "/svn-test-work/repositories/redirect_tests-1"
(gdb) p root_url
$4 = 0x0
(gdb) p repos_root_url
$5 = 0x0
--
Philip
Re: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:
>> -----Original Message-----
>> From: cmpilato@apache.org [mailto:cmpilato@apache.org]
>> Sent: donderdag 7 februari 2013 21:30
>> To: commits@subversion.apache.org
>> Subject: svn commit: r1443705 -
>> /subversion/trunk/subversion/libsvn_ra_serf/commit.c
>>
>> Author: cmpilato
>> Date: Thu Feb 7 20:30:01 2013
>> New Revision: 1443705
>>
>> URL: http://svn.apache.org/r1443705
>> Log:
>> Followup to r1443578, hopefully fixing some segfaults triggered on
>> certain buildbots.
>
> Could this be caused by the difference between redirecting to
> /some/subdir and http://server/some/subdir ?
>
> The Windows buildbot uses the configuration written by win-tests.py;
> I'm not sure which httpd configuration the centos buildbot uses.
The centos buildbot uses serf 1.0.3, APR 1.2.7 and APR-Util 1.2.7.
$ gdb -arg ../../svn/.libs/lt-svn info http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1 --config-dir /home/bt/packages/subversion-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
(gdb) b response_get_location
(gdb) r
Breakpoint 1, response_get_location (response=0xeb580f8, repos_root_url=0x0,
pool=0xeb3bfa8) at subversion/libsvn_ra_serf/util.c:1000
1000 headers = serf_bucket_response_get_headers(response);
(gdb) n
1001 location = serf_bucket_headers_get(headers, "Location");
(gdb)
1002 if (location == NULL)
(gdb)
1007 if (*location == '/')
(gdb)
1009 const char *root_url = repos_root_url;
(gdb) p *location
$2 = 47 '/'
(gdb) n
1011 while (! svn_uri_is_root(root_url, strlen(root_url)))
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x00002b82e9c48951 in response_get_location (response=0xeb580f8,
repos_root_url=0x0, pool=0xeb3bfa8)
at subversion/libsvn_ra_serf/util.c:1011
1011 while (! svn_uri_is_root(root_url, strlen(root_url)))
(gdb) bt
#0 0x00002b562cceb951 in response_get_location (response=0xd1820f8,
repos_root_url=0x0, pool=0xd165fa8)
at subversion/libsvn_ra_serf/util.c:1011
#1 0x00002b562cced83a in handle_response (request=0xd175e98,
response=0xd1820f8, handler=0xd166400, serf_status=0x7fff7f681e84,
scratch_pool=0xd183ef8) at subversion/libsvn_ra_serf/util.c:1909
#2 0x00002b562ccede00 in handle_response_cb (request=0xd175e98,
response=0xd1820f8, baton=0xd166400, scratch_pool=0xd183ef8)
at subversion/libsvn_ra_serf/util.c:2076
#3 0x00002b562cf07eca in handle_response () from /usr/local/lib/libserf-1.so.0
#4 0x00002b562cf0813d in read_from_connection ()
from /usr/local/lib/libserf-1.so.0
#5 0x00002b562cf082cf in serf__process_connection ()
from /usr/local/lib/libserf-1.so.0
#6 0x00002b562cf0631d in serf_event_trigger ()
from /usr/local/lib/libserf-1.so.0
#7 0x00002b562cf06480 in serf_context_run ()
from /usr/local/lib/libserf-1.so.0
#8 0x00002b562cceb136 in svn_ra_serf__context_run_wait (done=0xd16641c,
sess=0xd1660b0, scratch_pool=0xd165fa8)
at subversion/libsvn_ra_serf/util.c:742
#9 0x00002b562cceb35e in svn_ra_serf__context_run_one (handler=0xd166400,
scratch_pool=0xd165fa8) at subversion/libsvn_ra_serf/util.c:812
#10 0x00002b562ccd9bd0 in svn_ra_serf__exchange_capabilities (
serf_sess=0xd1660b0, corrected_url=0x7fff7f682348, pool=0xd165fa8)
at subversion/libsvn_ra_serf/options.c:458
#11 0x00002b562cce0296 in svn_ra_serf__open (session=0xd166088,
corrected_url=0x7fff7f682348,
session_URL=0xd164008 "http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1", callbacks=0xd164078, callback_baton=0xd164058,
config=0xd15ae48, pool=0xd165fa8) at subversion/libsvn_ra_serf/serf.c:482
#12 0x00002b562b9928cd in svn_ra_open4 (session_p=0x7fff7f682648,
corrected_url_p=0x7fff7f682558,
repos_URL=0xd164008 "http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1", uuid=0x0, callbacks=0xd164078,
callback_baton=0xd164058, config=0xd15ae48, pool=0xd163f98)
at subversion/libsvn_ra/ra_loader.c:479
#13 0x00002b562b492e4e in svn_client__open_ra_session_internal (
ra_session=0x7fff7f682648, corrected_url=0x7fff7f682638,
base_url=0xd164008 "http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1", base_dir_abspath=0x0, commit_items=0x0, use_admin=0,
read_only_wc=1, ctx=0xd15b2d0, pool=0xd163f98)
at subversion/libsvn_client/ra.c:362
#14 0x00002b562b4932d2 in svn_client__ra_session_from_path2 (
ra_session_p=0x7fff7f682730, resolved_loc_p=0x7fff7f682728,
path_or_url=0xd15c490 "http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1", base_dir_abspath=0x0,
peg_revision=0x7fff7f6827f0, revision=0x7fff7f682a48, ctx=0xd15b2d0,
pool=0xd163f98) at subversion/libsvn_client/ra.c:493
#15 0x00002b562b467f24 in svn_client_info3 (
abspath_or_url=0xd15c490 "http://localhost:1531/svn-test-work/repositories/REDIRECT-TEMP-redirect_tests-1", peg_revision=0x7fff7f6827f0,
revision=0x7fff7f682a48, depth=svn_depth_empty, fetch_excluded=1,
fetch_actual_only=1, changelists=0xd15abd0,
receiver=0x412943 <print_info>, receiver_baton=0xd15c628, ctx=0xd15b2d0,
pool=0xd163f98) at subversion/libsvn_client/info.c:298
#16 0x00000000004144c9 in svn_cl__info (os=0xd15a990, baton=0x7fff7f682a20,
pool=0xd15a748) at subversion/svn/info-cmd.c:641
#17 0x0000000000428211 in sub_main (argc=10, argv=0x7fff7f682ed8,
pool=0xd15a748) at subversion/svn/svn.c:2788
#18 0x0000000000428408 in main (argc=10, argv=0x7fff7f682ed8)
at subversion/svn/svn.c:2843
--
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
RE: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: cmpilato@apache.org [mailto:cmpilato@apache.org]
> Sent: donderdag 7 februari 2013 21:30
> To: commits@subversion.apache.org
> Subject: svn commit: r1443705 -
> /subversion/trunk/subversion/libsvn_ra_serf/commit.c
>
> Author: cmpilato
> Date: Thu Feb 7 20:30:01 2013
> New Revision: 1443705
>
> URL: http://svn.apache.org/r1443705
> Log:
> Followup to r1443578, hopefully fixing some segfaults triggered on
> certain buildbots.
>
> * subversion/libsvn_ra_serf/commit.c
> (checkout_node): Canonicalize the parsed Location header URI as a urlpath.
>
> Modified:
> subversion/trunk/subversion/libsvn_ra_serf/commit.c
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/
> commit.c?rev=1443705&r1=1443704&r2=1443705&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Thu Feb 7
> 20:30:01 2013
> @@ -326,8 +326,8 @@ checkout_node(const char **working_url,
> if (status)
> return svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
> _("Error parsing Location header value"));
> -
> - *working_url = apr_pstrdup(result_pool, uri.path);
> +
> + *working_url = svn_urlpath__canonicalize(uri.path, result_pool);
Could this be caused by the difference between redirecting to /some/subdir and http://server/some/subdir ?
The Windows buildbot uses the configuration written by win-tests.py; I'm not sure which httpd configuration the centos buildbot uses.
Bert
RE: svn commit: r1443705 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: cmpilato@apache.org [mailto:cmpilato@apache.org]
> Sent: donderdag 7 februari 2013 21:30
> To: commits@subversion.apache.org
> Subject: svn commit: r1443705 -
> /subversion/trunk/subversion/libsvn_ra_serf/commit.c
>
> Author: cmpilato
> Date: Thu Feb 7 20:30:01 2013
> New Revision: 1443705
>
> URL: http://svn.apache.org/r1443705
> Log:
> Followup to r1443578, hopefully fixing some segfaults triggered on
> certain buildbots.
>
> * subversion/libsvn_ra_serf/commit.c
> (checkout_node): Canonicalize the parsed Location header URI as a urlpath.
>
> Modified:
> subversion/trunk/subversion/libsvn_ra_serf/commit.c
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/
> commit.c?rev=1443705&r1=1443704&r2=1443705&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Thu Feb 7
> 20:30:01 2013
> @@ -326,8 +326,8 @@ checkout_node(const char **working_url,
> if (status)
> return svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
> _("Error parsing Location header value"));
> -
> - *working_url = apr_pstrdup(result_pool, uri.path);
> +
> + *working_url = svn_urlpath__canonicalize(uri.path, result_pool);
Could this be caused by the difference between redirecting to /some/subdir and http://server/some/subdir ?
The Windows buildbot uses the configuration written by win-tests.py; I'm not sure which httpd configuration the centos buildbot uses.
Bert