Description
Symfony version(s) affected
5.4
Description
Our application has AsyncAwsBundle
and LiipImagineBundle
installed, and when there are multiple (almost concurrent) requests to the liip_imagine_filter
route, we're seeing a recursive loop in Symfony\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 the cache.app
cache pool and we have this set up to use Redis for our production and staging environments). When I run the liip: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:
15:34:21 INFO [cache] Item "AsyncAws.Credentials.5884dee2d3b4afa9c984f7b747a58f87f4af89c9" is locked, waiting for it to be released
15:34:21 INFO [cache] Item "AsyncAws.Credentials.5884dee2d3b4afa9c984f7b747a58f87f4af89c9" not found while lock was released, now retrying
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