Edgewall Software
Modify

Ticket #8179 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: Thomas Peter <trac_ticktes@…> Owned by: cboos
Priority: high Milestone: 0.11.5
Component: version control/browser Version: 0.11.4
Severity: normal Keywords: svn16 blame
Cc:
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

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

Download all attachments as: .zip

Change History

Changed 3 years ago by Thomas Peter <trac_ticktes@…>

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

comment:1 Changed 3 years ago by Thomas Peter <trac_ticktes@…>

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 follow-up: Changed 3 years ago by cboos

  • Keywords blame added
  • Milestone set to 0.11.5
  • Owner set to cboos

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 follow-up: Changed 3 years ago by cboos

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

comment:4 in reply to: ↑ 2 ; follow-up: Changed 3 years ago by 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

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?

comment:5 in reply to: ↑ 4 Changed 3 years ago by cboos

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 follow-up: Changed 3 years ago by cboos

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): 

comment:7 in reply to: ↑ 6 Changed 3 years ago by Thomas Peter <trac_ticktes@…>

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 follow-up: Changed 3 years ago by cboos

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'

comment:9 in reply to: ↑ 8 Changed 3 years ago by Thomas Peter <trac_ticktes@…>

Replying to cboos:

Yes, sorry, the patch should have been:

yes that works and shows the annotate correctly :-)

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

thank you!

comment:11 Changed 3 years ago by cboos

  • Keywords svn16 added
  • Resolution set to fixed
  • Status changed from new to closed

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

comment:12 in reply to: ↑ 3 Changed 3 years ago by cboos

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
...
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.