#60760Race condition during system cache flush
Description
TYPO3 6.2.4
When flushing the system cache there seems to be a time frame for a race condition. This can lead to different “class/interface not found” errors.
Steps to reproduce:
Use apache benchmark to start multiple concurrent requests, e.g.:
ab -n 100 -c 10 http://typo3dev.localhost/
While ab is running, flush the system cache in the backend. Now, reload the frontend to see some kind of error, e.g.:
Fatal error: Interface 'Psr\Log\LoggerInterface' not found in /home/ahense/src/TYPO3.CMS/typo3/sysext/core/Classes/Log/Logger.php on line 24
This works almost every time. For somewhat faster computers you might want to increase ab to -n 500 and -c 20.
The frontend only works again after flushing the system cache once more.
The problem seems to be a race condition which occurs when the frontend is being rendered while the system cache flushing process is still in progress. The system cache flushing does not correctly lock other calls to prevent the construction of a broken cache.