abort: svn_ra_get_log2: Assertion `*path != '/'' failed

Bug #234010 reported by Mirko Friedenhagen on 2008-05-22
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin

Bug Description

I am running bzr-svn on a host:

bzr version
Bazaar (bzr) 1.5
  Python interpreter: /homepages/32/d184636148/htdocs/bin/python 2.5
  Python standard library: /homepages/32/d184636148/htdocs/lib/python2.5
  bzrlib: /homepages/32/d184636148/htdocs/lib/python2.5/site-packages/bzr-1.5-py2.5-linux-i686.egg/bzrlib
  Bazaar configuration: /kunden/homepages/32/d184636148/htdocs/.bazaar
  Bazaar log file: /kunden/homepages/32/d184636148/htdocs/.bzr.log

svn 0.4.11dev0
    Support for Subversion branches
 bzr revno ~/.bazaar/plugins/svn/

I had successfully pulled:
Related branches:
  parent branch: https://guest:@hudson.dev.java.net/svn/hudson/trunk/hudson/

before switching to bzr-1.5

svn is built from:
svn-1.6 info ~/svn-trunk/
Path: /kunden/homepages/32/d184636148/htdocs/svn-trunk
URL: http://svn.collab.net/repos/svn/trunk
Repository Root: http://svn.collab.net/repos/svn
Repository UUID: 612f8ebc-c883-4be0-9ee0-a4e9ef946e3a
Revision: 31350

I have set LD_LIBRARY_PATH and PYTHONPATH, so this version is used (I checked this
If I now run "bzr pull" I get:
~/bzr/hudson/trunk > bzr pull
Using saved location: https://guest:@hudson.dev.java.net/svn/hudson/trunk/hudson/
python: subversion/libsvn_ra/ra_loader.c:1029: svn_ra_get_log2: Assertion `*path != '/'' failed.

I am not able to set the core size on this server, so I may not produce a core file, sorry.

I have attached the output of `strace -f bzr pull 2>&1 | grep -v ENOENT | tee pull.log`

Using pdb I stepped myself to:
> /kunden/homepages/32/d184636148/htdocs/.bazaar/plugins/svn/branch.py(129)get_revnum()
-> self._cached_revnum = self.repository._log.find_latest_change(self.get_branch_path(), latest_revnum)
python: subversion/libsvn_ra/ra_loader.c:1029: svn_ra_get_log2: Assertion `*path != '/'' failed.

(Pdb) b branch:129
Breakpoint 1 at /kunden/homepages/32/d184636148/htdocs/.bazaar/plugins/svn/branch.py:129
(Pdb) cont
Using saved location: https://guest:@hudson.dev.java.net/svn/hudson/trunk/hudson/
> /kunden/homepages/32/d184636148/htdocs/.bazaar/plugins/svn/branch.py(129)get_revnum()
-> self._cached_revnum = self.repository._log.find_latest_change(self.get_branch_path(), latest_revnum)
(Pdb) self.get_branch_path()
(Pdb) self.repository
SvnRepository('https://<email address hidden>/svn/hudson')
(Pdb) latest_revnum
(Pdb) self.repository._log
<bzrlib.plugins.svn.logwalker.CachingLogWalker object at 0x415423ec>
(Pdb) self.repository._log.find_latest_change(self.get_branch_path(), latest_revnum)
python: subversion/libsvn_ra/ra_loader.c:1029: svn_ra_get_log2: Assertion `*path != '/'' failed.

Hash: SHA1

The problem is that bzr-svn is specifying a path with "/" as the first
character to svn.ra.get_log(). This works perfectly fine with
Subversion < 1.5 but in 1.5 an assertion was added preventing this.

Simply removing the "/" will not work as that changes the results of
the get_log() call. Ideally we should be specifying not ["/"] but None
to svn.ra.get_log() (equivalent to passing NULL to the C API) but the
Subversion Python bindings don't allow this at the moment.

Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Right now I succeeded by "patching" the svn-trunk and commenting the assertion, now it seems to work.

Martin von Gagern (gagern) wrote :

I got that abort from svn_ra_get_log2 while I tried to branch off a SVN repo for the first time. Simply passing NULL to the C API would indeed seem the appropriate solution. Are you sure, Jelmer, that the Python Bindings prevent you from doing that? After turning those two lines in transport.py into a comment, I got a SIGSEGV.

    def get_log(self, paths, from_revnum, to_revnum, limit,
                discover_changed_paths, strict_node_history, revprops, rcvr,
# if paths is None:
# paths = ["/"]

The reason for the segmentation fault, however, was a bug in Subversion proper, not only the Python bindings. The developers provided a fix for it almost immediately after being told about the issue, see the archives for details: http://subversion.tigris.org/servlets/BrowseList?list=dev&by=thread&from=656738

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers