Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9081 closed defect (fixed)

infinite recursion when conf directory is read-only

Reported by: Felix Schwarz <felix.schwarz@…> Owned by: Felix Schwarz <felix.schwarz@…>
Priority: normal Milestone: 0.11.7
Component: general Version: 0.11-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

If the conf directory is read-only, trac goes into an endless recursion. The only thing visible on the command line is:

Exception RuntimeError: 'maximum recursion depth exceeded' in <bound method AtomicFile.rollback of <trac.util.AtomicFile object at 0x7f166c897c10>> ignored

This is because self._file in AtomicFile is declared after mkstemp and because __del__ is an alias for rollback(). If mkstemp fails, self._file is undefined, causing an endless recursion in rollback which tries to access this variable.

The solution is to add 'self._file = None' before mkstemp.

This problem is present in 0.11 and 0.12 - however we had a couple of user reports so I would like to see the fix also for 0.11.7.

Thanks to Sergey for reporting/diagnosing the issue.

Attachments (0)

Change History (4)

comment:1 by Remy Blank, 12 years ago

Resolution: fixed
Status: newclosed

Issue and patch verified, applied in [9263]. Thanks!

(OT: It's always the same. Within a few hours of making a release candidate available, we get a new bug report that should be fixed for the release. Oh well… We probably really should release more often.)

comment:2 by Remy Blank, 12 years ago

Owner: set to Felix Schwarz <felix.schwarz@…>

comment:3 by Felix Schwarz <felix.schwarz@…>, 12 years ago

Can you please merge the fix in trunk as well?

in reply to:  3 comment:4 by Remy Blank, 12 years ago

Replying to Felix Schwarz <felix.schwarz@…>:

Can you please merge the fix in trunk as well?

Sure (normally I merge in batches). Done in [9276].

Modify Ticket

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