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

Re: Perl Bindings: Assertion svn_uri_is_canonical failed

From: Lathan Bidwell <lathan_at_andrews.edu>
Date: Tue, 27 Jan 2015 11:30:55 -0500

I fully agree, the error is correct and deserved.
It is happening on both my 1.6 prod servers and my 1.8.8 test servers.

And I fully understand, and will do more to sanitize my inputs.

But the fact that warnings cause a seg fault / core fault of the whole
apache process makes my error reporting very difficult.

All I am asking is how / why does that error completely kill my execution
chain.

Perl test case example below:

#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use SVN::Client;
sub SVN_CMS_BASE { return 'http://websvn.cc.domain.com/svn/www/cms' }

sub get_svn_ctx
{
return new SVN::Client(
auth => [
SVN::Client::get_ssl_server_trust_prompt_provider(\&_trust_callback),

# SVN::Client::get_ssl_server_trust_file_provider(),
SVN::Client::get_simple_provider(),
SVN::Client::get_simple_prompt_provider(\&simple_prompt, 2),
SVN::Client::get_username_provider()
]
) || warn "Unable to get connection...?!?";
}

sub simple_prompt
{
my $cred = shift;
my $realm = shift;
my $default_username = shift;
my $may_save = shift;
my $pool = shift;

$cred->username('svnuser');
$cred->password('svnpassword');
}

my $ctx = get_svn_ctx();

eval{
$ctx->ls(SVN_CMS_BASE . '/','HEAD',1);
};
if($@){
print "Error Occured!!! Let's report it\n";
die $@;
}
print "We survived!!\n";

On Tue, Jan 27, 2015 at 11:05 AM, Stefan Sperling <stsp_at_elego.de> wrote:

> On Tue, Jan 27, 2015 at 10:38:31AM -0500, Lathan Bidwell wrote:
> > I am running SVN 1.6 (will be upgrading to 1.8.8) through apache 2.4 /
> > mod_perl.
> >
> > I'm trying to get email notifications of errors, but whenever libsvn
> fails
> > one of its assertions, it dies, and causes the whole apache process to
> core
> > dump / seg fault.
> >
> > Is there some way to either check for these assertions in a non-lethal
> way
> > before hand, or make it possible to surivve the error so my error
> reporting
> > can run?
> >
> > Usually these assertions are problems with my url handling: double slash,
> > or slash at end of directory. But I'd still like those errors to be
> > reported, so I know that my users are hitting problems.
> >
> > Thanks,
> > Lathan
>
> A failure in svn_uri_is_canonical() sounds like you are running
> something (a Perl script since you mention mod_perl?) against the
> SVN APIs that provides bad input to SVN. Is this the case? If so,
> whatever is running will need to be fixed to provide valid input.
> To find out what SVN considers canonical please refer to the comment
> on top of this file:
>
> https://svn.apache.org/repos/asf/subversion/trunk/subversion/include/svn_dirent_uri.h
> as well as the comment on top of the function svn_uri_canonicalize()
> in the same file.
>
> 1.6 is very old so it's possible that your problems will disappear after
> an update to 1.8. If that's not the case then please invest some time
> into writing a problem report that includes detailed information about
> your setup (actual error messages extracted from log files, config files,
> hook scripts you are running, etc.)
>
>
> --
> BEGIN-ANTISPAM-VOTING-LINKS
> ------------------------------------------------------
>
> NOTE: This message was trained as non-spam. If this is wrong,
> please correct the training as soon as possible.
>
> Teach CanIt if this mail (ID 0aNJ45U2o) is spam:
> Spam:
> http://www.andrews.edu/spam/b.php?i=0aNJ45U2o&m=2a430390b425&c=s
> Not spam:
> http://www.andrews.edu/spam/b.php?i=0aNJ45U2o&m=2a430390b425&c=n
> Forget vote:
> http://www.andrews.edu/spam/b.php?i=0aNJ45U2o&m=2a430390b425&c=f
> ------------------------------------------------------
> END-ANTISPAM-VOTING-LINKS
>
>
Received on 2015-01-27 17:31:25 CET

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

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