Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8179 closed defect (fixed)

Assertion `svn_path_is_canonical(base, pool)' failed: while using "Annotate"

Reported by: Thomas Peter <trac_ticktes@…> Owned by: Christian Boos
Priority: high Milestone: 0.11.5
Component: version control/browser Version: 0.11.4
Severity: normal Keywords: svn16 blame
Cc: Branch:
Release Notes:
API Changes:

Description

When using annotate on a file that resides in a directory that has recently been merged from branches to trunk (so the history seems to be not so small) my tracd dies with a

python: subversion/libsvn_subr/path.c:114: svn_path_join: Assertion `svn_path_is_canonical(base, pool)' failed.
Aborted (core dumped)

A pure svn blame works well on that url…

A whole strace dump is attached.

Attachments (1)

tracd.strace.bz2 (78.0 KB ) - added by Thomas Peter <trac_ticktes@…> 10 years ago.
strace -f -o tracd.strace -p $tracd_pid

Download all attachments as: .zip

Change History (13)

by Thomas Peter <trac_ticktes@…>, 10 years ago

Attachment: tracd.strace.bz2 added

strace -f -o tracd.strace -p $tracd_pid

comment:1 by Thomas Peter <trac_ticktes@…>, 10 years ago

some more info:

uname -a
Linux sushi1 2.6.26-grml #1 SMP PREEMPT Wed Nov 26 21:41:43 UTC 2008 i686 GNU/Linux

svn --version
svn, version 1.6.0 (r36650)
   compiled Mar 25 2009, 12:48:17

tracd --version
tracd 0.11.4

python -V
Python 2.6.1

comment:2 by Christian Boos, 10 years ago

Keywords: blame added
Milestone: 0.11.5
Owner: set to Christian Boos

Can you locate the line opening ra_local session to ... in your trac.log (at INFO level) and show it to us?

Also, you didn't build your bindings in debug mode, by any chance? (http://www.ultraviolet.org/mail-archives/subversion.2008/msg24616.html)

comment:3 by Christian Boos, 10 years ago

Also, a gdb backtrace would help a lot (see TracTroubleshooting#DebuggingSegmentationFaults).

in reply to:  2 ; comment:4 by Thomas Peter <trac_ticktes@…>, 10 years ago

Replying to cboos:

Can you locate the line opening ra_local session to ... in your trac.log (at INFO level) and show it to us?

2009-03-31 17:17:54,470 Trac[svn_fs] INFO: opening ra_local session to 'file:////local/svn/var/repos/algo/algo/branches/rw-upgrade_4.4.2_to_4.5.4/TOP/batch/scripts/shell/ABE-FilePreparation.sh'

that is the url that caused trouble

Also, you didn't build your bindings in debug mode, by any chance? (http://www.ultraviolet.org/mail-archives/subversion.2008/msg24616.html)

let's see what I can do

Replying to cboos:

[Thread debugging using libthread_db enabled]
[New Thread 0xb7e306b0 (LWP 24059)]
Traceback (most recent call last):
  File "/local/share/python/latest/bin/tracd", line 8, in <module>
    load_entry_point('Trac==0.11.4', 'console_scripts', 'tracd')()
  File "/local/share/python/2.6.1/lib/python2.6/site-packages/Trac-0.11.4-py2.6.egg/trac/web/standalone.py", line 270, in main
    serve()
  File "/local/share/python/2.6.1/lib/python2.6/site-packages/Trac-0.11.4-py2.6.egg/trac/web/standalone.py", line 240, in serve
    options.env_parent_dir, args)
  File "/local/share/python/2.6.1/lib/python2.6/site-packages/Trac-0.11.4-py2.6.egg/trac/web/standalone.py", line 107, in __init__
    request_handler=TracHTTPRequestHandler)
  File "/local/share/python/2.6.1/lib/python2.6/site-packages/Trac-0.11.4-py2.6.egg/trac/web/wsgi.py", line 207, in __init__
    HTTPServer.__init__(self, server_address, request_handler)
  File "/local/share/python/latest/lib/python2.6/SocketServer.py", line 400, in __init__
    self.server_bind()
  File "/local/share/python/latest/lib/python2.6/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/local/share/python/latest/lib/python2.6/SocketServer.py", line 411, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
socket.error: [Errno 98] Address already in use

is it that what you want?

in reply to:  4 comment:5 by Christian Boos, 10 years ago

Replying to Thomas Peter <trac_ticktes@…>:

Replying to cboos:

Can you locate the line opening ra_local session to ... in your trac.log (at INFO level) and show it to us?

` 2009-03-31 17:17:54,470 Trac[svn_fs] INFO: opening ra_local session to 'file:////local/svn/var/repos/algo/algo/branches/rw-upgrade_4.4.2_to_4.5.4/TOP/batch/scripts/shell/ABE-FilePreparation.sh' `

that is the url that caused trouble

Not sure it's OK to have 4 '/' there…

Does the blame work on the command line with this URL?

svn blame file:////local/svn/var/repos/algo/algo/branches/rw-upgrade_4....

Also, you didn't build your bindings in debug mode, by any chance?

let's see what I can do

Well, nevermind, with gcc you most certainly have the debug symbols anyway.

socket.error: [Errno 98] Address already in use

is it that what you want?

No, the fact the tracd fails here is because you didn't specify an unused port (with -p). Please read TracTroubleshooting#DebuggingSegmentationFaults carefully.

comment:6 by Christian Boos, 10 years ago

Could you please try this patch?

  • trac/versioncontrol/svn_fs.py

     
    435435            self.scope = '/'
    436436        assert self.scope[0] == '/'
    437437        # we keep root_path_utf8 for  RA
    438         self.ra_url_utf8 = 'file:///' + root_path_utf8
     438        ra_prefix = os.name == 'nt' and 'file:///' or 'file:/'
     439        self.ra_url_utf8 = ra_prefix + root_path_utf8
    439440        self.clear()
    440441
    441442    def clear(self, youngest_rev=None):

in reply to:  6 comment:7 by Thomas Peter <trac_ticktes@…>, 10 years ago

Replying to cboos:

Could you please try this patch?

The patch avoids the crash but produces the following output on the webinterface:

 Warning: Can't use blame annotator:

svn blame failed on /algo/branches/rw-upgrade_4.4.2_to_4.5.4/TOP/batch/scripts/shell/ABE-FilePreparation.sh: ('Unable to open an ra_local session to URL', 170000)

also the "Rev" (left to Line) column is empty

comment:8 by Christian Boos, 10 years ago

Yes, sorry, the patch should have been:

  • trac/versioncontrol/svn_fs.py

     
    435435            self.scope = '/'
    436436        assert self.scope[0] == '/'
    437437        # we keep root_path_utf8 for  RA
    438         self.ra_url_utf8 = 'file:///' + root_path_utf8
     438        ra_prefix = os.name == 'nt' and 'file:///' or 'file://'
     439        self.ra_url_utf8 = ra_prefix + root_path_utf8
    439440        self.clear()
    440441
    441442    def clear(self, youngest_rev=None):

i.e. end up with 'file:///path/to/repos/trunk/file'

in reply to:  8 comment:9 by Thomas Peter <trac_ticktes@…>, 10 years ago

Replying to cboos:

Yes, sorry, the patch should have been:

yes that works and shows the annotate correctly :-)

comment:10 by Thomas Peter <trac_ticktes@…>, 10 years ago

thank you!

comment:11 by Christian Boos, 10 years ago

Keywords: svn16 added
Resolution: fixed
Status: newclosed

Fix applied as [8015]. I believe the fix is only relevant for 1.6.x, as otherwise the problem would have been reported earlier.

in reply to:  3 comment:12 by Christian Boos, 10 years ago

For the record, duplicate ticket #8194 had the requested backtrace information:

...
3   libSystem.B.dylib                   0x96f5e3db __assert_rtn + 101
4   libsvn_subr-1.0.dylib               0x03031e4d svn_path_join + 413
5   libsvn_repos-1.0.dylib              0x02f1a303 svn_repos_find_root_path + 147
6   libsvn_ra_local-1.0.dylib           0x02f01a31 svn_ra_local__split_URL + 305
7   libsvn_ra_local-1.0.dylib           0x02eff476 svn_ra_local__open + 102
8   libsvn_ra-1.0.dylib                 0x02ef7787 svn_ra_open3 + 551
9   libsvn_client-1.0.dylib             0x02e8f521 svn_client__open_ra_session_internal + 401
10  libsvn_client-1.0.dylib             0x02e901a2 svn_client__ra_session_from_path + 258
11  libsvn_client-1.0.dylib             0x02e66708 svn_client_blame4 + 136
12  libsvn_client-1.0.dylib             0x02e734bb svn_client_blame3 + 123
13  libsvn_client-1.0.dylib             0x02e735e7 svn_client_blame2 + 87
...

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.