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
comment:2 Changed 2 years ago by rblank
- Owner set to Felix Schwarz <felix.schwarz@…>
comment:3 follow-up: ↓ 4 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].



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