Skip Menu |
 

This queue is for tickets about the SVN-Web CPAN distribution.

Report information
The Basics
Id: 37388
Status: resolved
Priority: 0/
Queue: SVN-Web

People
Owner: Nobody in particular
Requestors: ian.cusden [...] ubs.com
Cc: INFINOID [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.53
Fixed in: (no value)



Subject: SVN-Web 0.53 Assertion failure with Subversion 1.5.0
Date: Thu, 3 Jul 2008 17:56:29 +0100
To: <bug-SVN-Web [...] rt.cpan.org>
From: <ian.cusden [...] ubs.com>
Download disclaim.txt
text/plain 1.4k
Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
Download (untitled) / with headers
text/plain 579b
Platform: Solaris 10 Perl: 5.8.8 SVN::Web 0.53 Subversion 1.5.0 I get the following assertion failure when attempting to browse a repo Assertion failed: *path != '/', file subversion/libsvn_ra/ra_loader.c, line 973 The problem appears to be with the "get_log" function, seems it doesn't like the leading '/' on the path. Also for the root of the repo i.e path = '/', you need to pass an empty string as the first argument to "get_log". Ian Cusden UBS AG Component Engineering - Developer Services 2 Broadgate, London, EC2M 2PP Tel. +44-207-568 36 75 www.ubs.com
Download (untitled) / with headers
text/plain 185b
I am also seeing this issue, on Debian (Lenny) with perl 5.10.0, SVN-Web 0.53, and subversion 1.5.0. Downgrading to subversion 1.4.6 successfully worked around the problem here. Mark
Download (untitled) / with headers
text/plain 305b
On Tue Jul 22 17:04:41 2008, INFINOID wrote: Show quoted text
> I am also seeing this issue, on Debian (Lenny) with perl 5.10.0, SVN-Web > 0.53, and subversion 1.5.0. > > Downgrading to subversion 1.4.6 successfully worked around the problem
here. Here is a quick patch that solves problem for me with subversion 1.5
Download svn-web-svn1.5.diff
text/x-diff 1.9k
diff -urw Web/Diff.pm Web.new/Diff.pm --- Web/Diff.pm 2008-04-05 02:07:31.000000000 +0200 +++ Web.new/Diff.pm 2008-08-03 08:10:52.000000000 +0200 @@ -184,6 +184,9 @@ my $uri = $self->{repos}{uri}; my $path = $self->{path}; + $path =~ s{^/}{}; + $uri .= '/'; + my(undef, undef, undef, $at_head) = $self->get_revs(); my $mime = $self->{cgi}->param('mime') || 'text/html'; diff -urw Web/Log.pm Web.new/Log.pm --- Web/Log.pm 2008-04-05 02:07:31.000000000 +0200 +++ Web.new/Log.pm 2008-08-03 08:10:33.000000000 +0200 @@ -203,6 +203,9 @@ my $path = $self->{path}; $path =~ s{/+$}{}; + $path =~ s{^/+}{}; + $uri .= '/'; + my(undef, $yng_rev, undef, $head) = $self->get_revs(); # Handle log paging diff -urw Web/Revision.pm Web.new/Revision.pm --- Web/Revision.pm 2008-04-05 02:07:31.000000000 +0200 +++ Web.new/Revision.pm 2008-08-03 07:35:51.000000000 +0200 @@ -211,7 +211,7 @@ ) if $rev > $yrev; - $ra->get_log(['/'], $rev, $rev, 1, 1, 1, + $ra->get_log([''], $rev, $rev, 2, 1, 1, sub { $self->{REV} = $self->_log(@_) }); $self->_resolve_changed_paths(); Only in Web.new/: Revision.pm.orig diff -urw Web/View.pm Web.new/View.pm --- Web/View.pm 2008-04-05 02:07:31.000000000 +0200 +++ Web.new/View.pm 2008-08-03 08:10:08.000000000 +0200 @@ -133,6 +133,9 @@ my $rev = $act_rev; + $path =~ s{^/+}{}; + $uri .= '/'; + # Get the log for this revision of the file $ra->get_log([$path], $rev, $rev, 1, 1, 1, sub { $self->{REV} = $self->_log(@_) }); Only in Web.new/: View.pm.orig diff -urw Web/action.pm Web.new/action.pm --- Web/action.pm 2008-04-05 02:07:31.000000000 +0200 +++ Web.new/action.pm 2008-08-03 07:34:47.000000000 +0200 @@ -240,6 +240,8 @@ my $ra = $self->{repos}{ra}; + $path =~ s{^/}{}; + my @log_result; $ra->get_log([$path], $rev, 1, 1, 0, 1, sub { @log_result = @_; });
Thanks for posting the patch. I have tried it out and it fixes the problem for me too.
Download (untitled) / with headers
text/plain 390b
There is a further assertion failure in viewing the revision log: [Fri Aug 22 14:01:45 2008] [error] [client 192.168.186.32] perl: subversion/libsvn_subr/path.c:119: svn_path_join: Assertion `is_canonical(base, blen)' failed., referer: http://linux01/svnweb/index.cgi/vs It's annoying that these assertion failures abort the whole program rather than being thrown back as perl exceptions.
From: hallm4rpi [...] yahoo.com
Download (untitled) / with headers
text/plain 670b
On Fri Aug 22 09:04:02 2008, EDAVIS wrote: Show quoted text
> There is a further assertion failure in viewing the revision log: > > [Fri Aug 22 14:01:45 2008] [error] [client 192.168.186.32] perl: > subversion/libsvn_subr/path.c:119: svn_path_join: Assertion > `is_canonical(base, blen)' failed., referer: > http://linux01/svnweb/index.cgi/vs > > It's annoying that these assertion failures abort the whole program > rather than being thrown back as perl exceptions.
In the Log.pm, I changed the "$uri .= '/';" to: if ( $path ) { $uri .= '/'; } Which seemed to clear up the issue. Otherwise, I guess it was not handling the top-level correctly. This fixed the above error for me.
The above patches also solved crashing (core dumps) issues for me with SVN 1.5.x. Thanks!
Download (untitled) / with headers
text/plain 104b
Thanks for fix. Here is slightly modified version of patch against latest SVN version for easy upgrade.
Index: lib/SVN/Web/Diff.pm =================================================================== --- lib/SVN/Web/Diff.pm (revision 1311) +++ lib/SVN/Web/Diff.pm (working copy) @@ -184,6 +184,9 @@ my $uri = $self->{repos}{uri}; my $path = $self->{path}; + $path =~ s{^/}{}; + $uri .= '/'; + my(undef, undef, undef, $at_head) = $self->get_revs(); my $mime = $self->{cgi}->param('mime') || 'text/html'; Index: lib/SVN/Web/View.pm =================================================================== --- lib/SVN/Web/View.pm (revision 1311) +++ lib/SVN/Web/View.pm (working copy) @@ -133,6 +133,9 @@ my $rev = $act_rev; + $path =~ s{^/+}{}; # FIXME svn1.5 + $uri .= '/'; + # Get the log for this revision of the file $ra->get_log([$path], $rev, $rev, 1, 1, 1, sub { $self->{REV} = $self->_log(@_) }); Index: lib/SVN/Web/action.pm =================================================================== --- lib/SVN/Web/action.pm (revision 1311) +++ lib/SVN/Web/action.pm (working copy) @@ -240,6 +240,8 @@ my $ra = $self->{repos}{ra}; + $path =~ s{^/}{}; ## FIXME svn1.5 + my @log_result; $ra->get_log([$path], $rev, 1, 1, 0, 1, sub { @log_result = @_; }); Index: lib/SVN/Web/Log.pm =================================================================== --- lib/SVN/Web/Log.pm (revision 1311) +++ lib/SVN/Web/Log.pm (working copy) @@ -203,6 +203,9 @@ my $path = $self->{path}; $path =~ s{/+$}{}; + $path =~ s{^/+}{}; # FIXME svn1.5 + $uri .= '/' if $path; + my(undef, $yng_rev, undef, $head) = $self->get_revs(); # Handle log paging Index: lib/SVN/Web/Revision.pm =================================================================== --- lib/SVN/Web/Revision.pm (revision 1311) +++ lib/SVN/Web/Revision.pm (working copy) @@ -211,7 +211,7 @@ ) if $rev > $yrev; - $ra->get_log(['/'], $rev, $rev, 1, 1, 1, + $ra->get_log([''], $rev, $rev, 2, 1, 1, sub { $self->{REV} = $self->_log(@_) }); $self->_resolve_changed_paths();
Download (untitled) / with headers
text/plain 627b
On Sun Sep 28 11:16:54 2008, DPAVLIN wrote: Show quoted text
> Thanks for fix. Here is slightly modified version of patch against > latest SVN version for easy upgrade.
Another path (i found this thread, when my own patch was already completed, just befor submit bugreport ;-) different it these aspect: 1. It fix problem - do not translate leading '/' to subversion, but remain path property safe for SVN::Web (in hope that we will split path property to something like 'path-in-url' as is now and 'repository path' as rpath method from my patch). 2. Fixes 2basic.t - don't try to test static files with SVN::Web::Test::Mechanize regards ;-)
diff -urbBN SVN-Web-0.53/lib/SVN/Web/Diff.pm SVN-Web-0.53-svn15/lib/SVN/Web/Diff.pm --- SVN-Web-0.53/lib/SVN/Web/Diff.pm Sun Apr 29 23:22:51 2007 +++ SVN-Web-0.53-svn15/lib/SVN/Web/Diff.pm Mon Dec 15 02:30:36 2008 @@ -188,8 +188,8 @@ my $mime = $self->{cgi}->param('mime') || 'text/html'; - my %types = ( $rev1 => $ra->check_path($path, $rev1), - $rev2 => $ra->check_path($path, $rev2) ); + my %types = ( $rev1 => $ra->check_path($self->rpath, $rev1), + $rev2 => $ra->check_path($self->rpath, $rev2) ); SVN::Web::X->throw(error => '(cannot diff nodes of different types: %1 %2 %3)', vars => [$path, $rev1, $rev2]) @@ -299,7 +299,7 @@ my $ra = $self->{repos}{ra}; - if($ra->check_path($path, $rev) == $SVN::Node::none) { + if($ra->check_path($self->rpath($path), $rev) == $SVN::Node::none) { SVN::Web::X->throw( error => '(path %1 does not exist in revision %2)', vars => [$path, $rev], diff -urbBN SVN-Web-0.53/lib/SVN/Web/Log.pm SVN-Web-0.53-svn15/lib/SVN/Web/Log.pm --- SVN-Web-0.53/lib/SVN/Web/Log.pm Sun Apr 29 23:22:51 2007 +++ SVN-Web-0.53-svn15/lib/SVN/Web/Log.pm Mon Dec 15 02:32:02 2008 @@ -214,7 +215,7 @@ # entries then we're on the last page. # # If we're not on the last page then pop off the extra log entry - $ra->get_log([$path], $rev, 1, $limit + 1, 1, 1, + $ra->get_log([$self->rpath], $rev, 1, $limit + 1, 1, 1, sub { $self->_log(@_) }); $at_oldest = @{ $self->{REVS} } <= $limit; @@ -222,7 +223,7 @@ pop @{ $self->{REVS} } unless $at_oldest; } else { # We must be displaying to the oldest rev, so no paging required - $ra->get_log([$path], $rev, 1, $limit, 1, 1, + $ra->get_log([$self->rpath], $rev, 1, $limit, 1, 1, sub { $self->_log(@_) }); $at_oldest = 1; diff -urbBN SVN-Web-0.53/lib/SVN/Web/Revision.pm SVN-Web-0.53-svn15/lib/SVN/Web/Revision.pm --- SVN-Web-0.53/lib/SVN/Web/Revision.pm Sun Apr 29 23:22:51 2007 +++ SVN-Web-0.53-svn15/lib/SVN/Web/Revision.pm Sun Dec 14 00:25:26 2008 @@ -211,7 +211,7 @@ ) if $rev > $yrev; - $ra->get_log(['/'], $rev, $rev, 1, 1, 1, + $ra->get_log([''], $rev, $rev, 1, 1, 1, sub { $self->{REV} = $self->_log(@_) }); $self->_resolve_changed_paths(); diff -urbBN SVN-Web-0.53/lib/SVN/Web/View.pm SVN-Web-0.53-svn15/lib/SVN/Web/View.pm --- SVN-Web-0.53/lib/SVN/Web/View.pm Sun Apr 29 23:22:51 2007 +++ SVN-Web-0.53-svn15/lib/SVN/Web/View.pm Mon Dec 15 02:29:44 2008 @@ -134,7 +134,7 @@ my $rev = $act_rev; # Get the log for this revision of the file - $ra->get_log([$path], $rev, $rev, 1, 1, 1, + $ra->get_log([$self->rpath], $rev, $rev, 1, 1, 1, sub { $self->{REV} = $self->_log(@_) }); # Get the text for this revision of the file diff -urbBN SVN-Web-0.53/lib/SVN/Web/action.pm SVN-Web-0.53-svn15/lib/SVN/Web/action.pm --- SVN-Web-0.53/lib/SVN/Web/action.pm Sun Apr 29 23:22:51 2007 +++ SVN-Web-0.53-svn15/lib/SVN/Web/action.pm Mon Dec 15 02:27:15 2008 @@ -241,7 +241,7 @@ my $ra = $self->{repos}{ra}; my @log_result; - $ra->get_log([$path], $rev, 1, 1, 0, 1, + $ra->get_log([$self->rpath($path)], $rev, 1, 1, 0, 1, sub { @log_result = @_; }); return @log_result if wantarray(); @@ -371,5 +371,12 @@ See L<http://www.perl.com/perl/misc/Artistic.html> =cut + +sub rpath { + my ($self,$p) = @_; + my $path = $p || $self->{path}; + $path =~ s{^/}{} if $path; + return $path; +} 1; Binary files SVN-Web-0.53/t/.2basic.t.swp and SVN-Web-0.53-svn15/t/.2basic.t.swp differ diff -urbBN SVN-Web-0.53/t/2basic.t SVN-Web-0.53-svn15/t/2basic.t --- SVN-Web-0.53/t/2basic.t Sun Apr 29 23:22:51 2007 +++ SVN-Web-0.53-svn15/t/2basic.t Mon Dec 15 03:09:45 2008 @@ -61,6 +61,9 @@ # a ':'. This catches template bugs with too many slashes. unlike($mech->uri(), qr{(?<!:)//}, 'URI does not contain "//"'); + diag('skip static files checks in local tests: '.$mech->uri), return + if $mech->uri->path eq '/' or $mech->uri->path =~ m{/css/}; + $mech->content_unlike(qr'An error occured', ' and content was correct'); if($can_tidy and ($mech->uri() !~ m{ (?:
Subject: SVN-Web 0.53 Assertion failure with Subversion 1.5.0 and v1.6.0
From: bitcard [...] ckeith.clara.net
Download (untitled) / with headers
text/plain 497b
For subversion 1.6.0 if you get the following Fix for ’subversion/libsvn_ra/deprecated.c’ line 289: assertion failed (*path != ‘/’) then it is this bug in SVN::Web that is the problem. I'm adding this here because I got this issue with svn 1.6.0 and searching for the above error did not find any results. I'm hoping that by adding this to this bug report it will make life easier for any new users of SVN::Web to find this bug report and thus patches that people have submitted for it.
confirming the last patch posted here fixes the problems against svn 1.6.x please apply!
On Sun Dec 14 20:01:31 2008, VOVKASM wrote:
Show quoted text
> [A patch]

I've folded Vladimir's patch into a SVN::Web repo on github to make things a bit easier for people that may not want to fiddle with patch files: http://github.com/cebjyre/SVN-Web/tree/rt37388

Download (untitled) / with headers
text/plain 388b
On Fri Jan 08 00:38:40 2010, CEBJYRE wrote: Show quoted text
> On Sun Dec 14 20:01:31 2008, VOVKASM wrote:
> > [A patch]
> > I've folded Vladimir's patch into a SVN::Web repo on github to make
things a Show quoted text
> bit easier for people that may not want to fiddle with patch files: > http://github.com/cebjyre/SVN-Web/tree/rt37388
merged on https://github.com/djzort/SVN-Web - i will be making a release shortly.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.