Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#1327 closed defect (fixed)

Trac from trunk deadlocks after giving permission error

Reported by: Mark Rowe <edgewall.com@…> Owned by: Jonas Borgström
Priority: normal Milestone: 0.9
Component: general Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When using Trac from trunk with an environment that the web server cannot write to, Trac deadlocks instead of displaying the expected "The web server user requires read _and_ write permission to the database" message. Running Trac from the terminal via SCRIPT_NAME=/cgi-bin/trac.cgi PATH_INFO=/ TRAC_ENV=~/.trac/ sudo -u www python2.5 /Library/WebServer/CGI-Executables/_trac.cgi makes it apparent that it hangs after the error has been displayed, but obviously before output is flushed to the browser in CGI mode. Much fiddling later, the problem was tracked down to the ConnectionWrapper.del method in trac.db. Patch is attached.

Attachments (2)

trac-hang-on-permission-error.patch (1.1 KB ) - added by Mark Rowe <edgewall.com@…> 20 years ago.
Ensure that self.cnx is set to prevent an infinite loop in getattr occurring inside del. Also, don't swallow all errors.
trac-hang-on-permission-error.2.patch (1.3 KB ) - added by Mark Rowe <edgewall.com@…> 20 years ago.
Didn't notice the ReferenceError's that were being raised. Catch these, as they're harmless.

Download all attachments as: .zip

Change History (3)

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

Ensure that self.cnx is set to prevent an infinite loop in getattr occurring inside del. Also, don't swallow all errors.

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

Didn't notice the ReferenceError's that were being raised. Catch these, as they're harmless.

comment:1 by Christopher Lenz, 20 years ago

Milestone: 0.9
Resolution: fixed
Status: newclosed

Patch applied in [1378]. Thanks!

Modify Ticket

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