#9081 closed defect (fixed)
infinite recursion when conf directory is read-only
| Reported by: | Owned by: | ||
|---|---|---|---|
| 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 , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 by , 16 years ago
| Owner: | set to |
|---|
comment:4 by , 16 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].



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