[BUGFIX] Release locks in middleware to prevent locking deadlock
In the frontend middleware chain PrepareTypoScriptFrontendRendering interacts with TSFE and calls getFromCache() which acquires frontend rendering locks. Locks are usually released after TSFE rendering in the final middleware, the HTTP/RequestHandler. Middleware ShortcutAndMountPointRedirect however, wich is called after PrepareTypoScriptFrontendRendering, can return early without calling below middlewares. In this case, locks need to be explicitly released to prevent a deadlock. This is not an issue in normal frontend calls since acquired locks are always released in __destruct() of the locking API. But, if the frontend is called as sub request, for instance from within another frontend call, from cli or testing, the lock API destructors may or may not be called. If not, this leads to dangling locks after the FE sub request, which then may block a following sub request executed in the same process. Resolves: #92882 Releases: master, 10.4 Change-Id: I231e56fb04ffa899c6e1b4d7e1a9e4a971f632db Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66707 Tested-by:Benni Mack <benni@typo3.org> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Please register or sign in to comment