Edgewall Software
Modify

Ticket #9081 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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:
Release Notes:
API 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

Change History

comment:1 Changed 2 years ago by rblank

  • Resolution set to fixed
  • Status changed from new to closed

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 Changed 2 years ago by rblank

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

comment:3 follow-up: Changed 2 years ago by Felix Schwarz <felix.schwarz@…>

Can you please merge the fix in trunk as well?

comment:4 in reply to: ↑ 3 Changed 2 years ago by rblank

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

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 Felix Schwarz <felix.schwarz@…>. 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.