Infinite Lock With Caching Backend
|Reported by:||zmsmith||Owned by:||nobody|
|Component:||Core (Cache system)||Version:||1.4|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||no||Patch needs improvement:||yes|
Basically, if you try to cache an object with a __getstate__ method that hits the cache, the LocMem backend will enter an infinite lock.
I discovered this when a QuerySet that was using a caching manager was being written to the cache and pickling forced the QuerySet to evaluate and interact with the cache.
The test I added covers this scenario, but unfortunately the failure condition is an infinite lock that will just hang and give no feedback about the failing test. I didn't know if django has any convention for timing out tests, so I didn't try to create one.
Change History (9)
Changed 4 years ago by zmsmith
comment:1 Changed 4 years ago by aaugustin
- Component changed from Uncategorized to Core (Cache system)
- Needs documentation unset
- Needs tests unset
- Patch needs improvement set
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Bug