Opened 9 years ago

Closed 9 years ago

#1187 closed defect (fixed)

svn-client on Debian Jessie: dirent_uri.c:1500: uri_skip_ancestor: Assertion `svn_uri_is_canonical(child_uri, ((void *)0))' failed

Reported by: Mario Domenech Goulart Owned by:
Priority: critical Milestone: someday
Component: extensions Version: 4.9.x
Keywords: svn-client Cc:
Estimated difficulty:

Description

svn-client is haunting us again:

# /usr/local/chickens/chicken-qwiki/bin/csi -:s1m -:a200 -s /usr/local/sbin/spiffy
csi: /build/subversion-mUGMjz/subversion-1.8.10/subversion/libsvn_subr/dirent_uri.c:1500: uri_skip_ancestor: Assertion `svn_uri_is_canonical(child_uri, ((void *)0))' failed.
Aborted
# echo $?
134
# apt-cache show libsvn-dev
Package: libsvn-dev
Source: subversion
Version: 1.8.10-6
Installed-Size: 6167
Maintainer: Peter Samuelson <peter@p12n.org>
Architecture: amd64
Depends: libsvn1 (= 1.8.10-6), libapr1-dev, libaprutil1-dev
Suggests: libsvn-doc, zlib1g-dev, libserf-dev
Description-en: Development files for Apache Subversion libraries
 This package contains the symlinks, headers, and object files needed
 to compile and link programs which use libsvn1, the Apache Subversion
 libraries.  This package is needed only in order to compile software
 that uses libsvn1.
Description-md5: d7ba285f3a44ff8995f08ac293b28fe7
Homepage: http://subversion.apache.org/
Tag: devel::library, role::devel-lib
Section: libdevel
Priority: extra
Filename: pool/main/s/subversion/libsvn-dev_1.8.10-6_amd64.deb
Size: 1213986
MD5sum: 46f65ddb0ac31a9bcf2c249c91b405e9
SHA1: 6862e26b7149c4ea36983344cdc841969eb191a8
SHA256: f99a09c7f8444032ca1bcd1151bab2f089babe61eb936afaa2e4d73a4391eeab

Change History (5)

comment:1 Changed 9 years ago by Mario Domenech Goulart

Here's a test case that triggers the crash:

$ /usr/local/chickens/chicken-qwiki/bin/csi

CHICKEN
(c) 2008-2014, The Chicken Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b)
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
bootstrapped 2014-06-07

#;1> (use svn-client)
; loading /usr/local/chickens/chicken-qwiki-4.9.0.1/lib/chicken/7/svn-client.import.so ...
; loading /usr/local/chickens/chicken-qwiki-4.9.0.1/lib/chicken/7/chicken.import.so ...
; loading /usr/local/chickens/chicken-qwiki-4.9.0.1/lib/chicken/7/foreign.import.so ...
; loading /usr/local/chickens/chicken-qwiki-4.9.0.1/lib/chicken/7/lolevel.import.so ...
; loading /usr/local/chickens/chicken-qwiki-4.9.0.1/lib/chicken/7/svn-client.so ...
#;2> (svn-client-list "http://code.call-cc.org/svn/chicken-eggs/release/4/hfs%2B/tags/0.3" svn-opt-revision-head 2 "anonymous" "")
csi: /build/subversion-mUGMjz/subversion-1.8.10/subversion/libsvn_subr/dirent_uri.c:1500: uri_skip_ancestor: Assertion `svn_uri_is_canonical(child_uri, ((void *)0))' failed.
Aborted

hfs%2B is actually passed to svn-client-list by pseudo-meta-egg-info at line 42 when we request data like wget 'http://code.call-cc.org/release-info?egg=hfs%2b'

comment:2 Changed 9 years ago by Mario Domenech Goulart

Forgot to mention that

(svn-client-list "http://code.call-cc.org/svn/chicken-eggs/release/4/hfs+/tags/0.3" svn-opt-revision-head 2 "anonymous" "")

does not cause a crash (note that I used hfs+ instead of hfs%2b). So, the problem is likely to be related to %.

comment:3 Changed 9 years ago by sjamaan

Svn is really picky about its uris. Apparently there is now a way to canonicalize URIs (wtf wasn't that in 1.6?), so I suppose svn-client can be easily fixed if it first calls the canonicalization function:
http://grokbase.com/t/subversion/dev/138pzv33t8/assertion-in-svn-uri-is-canonical

Docs are here:
https://subversion.apache.org/docs/api/1.8/svn__dirent__uri_8h.html#a624e026e7bdd426d063435b87db2b103

So now we get to the question of what to do about backwards compatibility: If we fix this by calling said function and someone builds svn-client on Wheezy, it will fail. Also, if I go in and fix svn-client, I probably want to eliminate the stupid deprecation warnings and use the updated API. However, this will also break on older versions...

comment:4 Changed 9 years ago by sjamaan

libsvn is shit, but I think I fixed it with [r32360]

comment:5 Changed 9 years ago by sjamaan

Resolution: fixed
Status: newclosed

Tested by Mario, released as svn-client 0.20

Note: See TracTickets for help on using tickets.