-
Bug
-
Resolution: Invalid
-
Major
-
None
-
None
-
None
3.1 template engine, when it is able to write compiled template files, does the following:
1. Opens source and compiled template files
2. Performs compilation on streams
3. Opens compiled file again and renders it
Given concurrent access, one process may open the compiled file in step 3 when another process has the same file open in step 1. At that time the file is empty. There is locking to avoid corrupting files due to multiple concurrent writers, but readers do not lock and are able to obtain empty files as a result.
Practical consequence of this is pages with parts of them missing.
Reproduce code: https://github.com/p/test-repo/blob/master/phpbb/template-race/test.py (requires anonymous posting enabled on a forum and debug on for templates to be recompiled on each request)

