Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#1265 closed defect (fixed)

Fatal Python error in Log.py

Reported by: ralphv@… Owned by: Christopher Lenz
Priority: normal Milestone: 0.9
Component: version control/log view Version: 0.8.1
Severity: normal Keywords: authz callback
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hi,

try to view a Revision Log i get a

Fatal Python error: PyThreadState_Get: no current thread

on the webserver (tested with apache and tracd)

after change line Log.py:68 from

 svn.repos.svn_repos_get_logs (self.repos, [path],
                                    0, rev, 1, 0, self.log_receiver,
                                    self.pool)

to

   def authz_cb(root, path, pool):
     return 1
   svn.repos.svn_repos_get_logs2 (self.repos, [path],
                                  0, rev, 1, 0, authz_cb, self.log_receiver,
                                  self.pool)

the error dissapear.

all works fine until the last upgrade to trac 0.8.1 and subversion 1.1.3.

this is my first line of code in python, so please forgive me this 'ugly' fix. i hope it is at least a hint ;o)

bye ralph

Attachments (1)

swig-py-lock.patch (613 bytes ) - added by naked@… 20 years ago.
patch to fix the Subversion bug causing this behaviour (patch by Torsten Landschoff <torsten@…>)

Download all attachments as: .zip

Change History (16)

comment:1 by Mark Rowe <edgewall.com@…>, 20 years ago

The new code you provided is correct, but I am not sure why the original code is causing that error. If it resolves the problem, it should probably be used instead.

comment:2 by Christopher Lenz, 20 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

comment:3 by Christopher Lenz, 20 years ago

Keywords: authz callback added
Milestone: 0.9
Resolution: fixed
Status: assignedclosed

Fixed in [1332].

comment:4 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: closedreopened

[1332] totally broke the log view, actually. I'm currently investigating a better fix.

comment:5 by Christopher Lenz, 20 years ago

What version of SWIG do you have installed? I found a message to the mailing list which looks related.

comment:6 by ralphv@…, 20 years ago

hi,

'dpkg' shows something like: ii libswig1.3.21 1.3.21-5 Runtime support libraries for swig generated

changeset [1332] is not the same as my patch. it use 'svn_repos_get_logs' instead of 'svn_repos_get_logs2' in Log.py, because svn_repos_get_logs has NO authz callback. you have to use svn_repos_get_logs2 instead.

see: http://svn.collab.net/svn-doxygen/svn__repos_8h.html#a67

with log2 all works for me.

hth ralph

comment:7 by anonymous, 20 years ago

Yeah, that was a mistake. I fixed that in [1337]. We can't simply switch to get_logs2 because we still need to support Subversion 1.0.x.

I still don't understand the cause of the problem. Have you just started using Trac, or have you been using it before that error surfaced (and in that case for how long)?

I'm using SWIG 1.3.21 and Subversion 1.1.3 here without seeing that problem (on OS X). What OS are you using?

comment:8 by ralphv@…, 20 years ago

i'm using trac since version 0.8. the problem occured with the last update to 0.8.1 and subversion 1.1.3.

my os is an linux debian(sarge) system.

maybe it is somewhat abnormal in my subversion configuration. i only use 'fsfs' as fs, not the 'stable' bdb just a thought.

comment:9 by ralphv@…, 20 years ago

the bug is fs-independent. dump one of my projects into a bdb repository and use the original '0.8.1' Log.py revision

bang !!!

Fatal Phyton error.

comment:10 by naked@…, 20 years ago

Happens with me too. Trac running as CGI, everything at debian unstable today, namely Trac version 0.8.1-1 and Subversion version 1.1.3-2. Every time a revision log is accessed from anywhere, the same Fatal Python error happens.

The fix mentioned works for me, no problems after that.

comment:11 by naked@…, 20 years ago

I checked the versions of packages:

  • trac 0.8-1, subversion 1.1.3-1 (built with swig 1.3.22) - WORKS
  • trac 0.8.1-1, subversion 1.1.3-2 (built with swig 1.3.24) - BREAKS

comment:12 by naked@…, 20 years ago

This same problem is being investigated on the Debian side. The Debian bug report has backtraces and a lot more information on the problem:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=299817

comment:13 by naked@…, 20 years ago

The Debian bug is now closed, and the bug was found to be in Subversion python bindings. It might get fixed in 1.1.4, but it is already fixed in Debian Subversion 1.1.3-3 packages. There was a patch included for the fix and I am attaching it here.

by naked@…, 20 years ago

Attachment: swig-py-lock.patch added

patch to fix the Subversion bug causing this behaviour (patch by Torsten Landschoff <torsten@…>)

comment:14 by brent.bourgoine@…, 20 years ago

I can confirm that this appears to be fixed under the current 1.1.4 packages in Sarge.

I was on 1.1.3-2, and saw the error with any attempt to access the log viewer.

Updating to 1.1.4-1 fixed this completely.

comment:15 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: reopenedclosed

This problem should be fixed, both by changes in trunk, and by the subversion update.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.