dotnet/runtime
Vedi su GitHubPossible thread safety issue with linked cache entries
Open
#46.032 aperta il 14 dic 2020
area-Extensions-Cachingbughelp wanted
Metriche repository
- Star
- (17.886 star)
- Metriche merge PR
- (Merge medio 12g 11h) (661 PR mergiate in 30 g)
Descrizione
As noticed by @gfoidl in https://github.com/dotnet/runtime/pull/45962/files#r541573802
It's possible that when the following code responsible for propagating the options to the linked cache entry:
calls the parent.AddExpirationToken method:
is using _expirationTokens which might be used without a lock in the CheckForExpiredTokens method at the same time
Adding a lock to CheckForExpiredTokens would be trivial, but it would hurt the perf...