[Cache] LockRegistry::compute()
does not acquire a lock and gets into a recursive loop with semaphores
#44536
Labels
Symfony version(s) affected
5.4
Description
Our application has
AsyncAwsBundle
andLiipImagineBundle
installed, and when there are multiple (almost concurrent) requests to theliip_imagine_filter
route, we're seeing a recursive loop inSymfony\Component\Cache\LockRegistry::compute()
when the AsyncAws client is trying to fetch the credentials from its cache provider (this is in its default configuration which is using thecache.app
cache pool and we have this set up to use Redis for our production and staging environments). When I run theliip:imagine:cache:resolve
command on the system once the lock registry starts looping, we just end up with a wall of repeating log messages in the output and it never breaks out of this loop:When I monkey patch the class to not use semaphores at all, everything seems to work normally.
Our production environment uses Docker images built on top of Ubuntu 18.04 with PHP 8.0 installed from the
ondrej/php
PPA and the web interface is using PHP-FPM.How to reproduce
Unfortunately, I don't have time at the moment to break this down to a small reproducer, the steps above have been pretty reliable to trigger the problem in our environment but I imagine there's probably a simpler way to do it.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: