Harry Gordon
05/17/2024, 9:49 AMScopeProvider
is a singleton that manages all scopes (across all requests/threads) and seems to expect them to dispose in order. To top it off, Scope
throws when it disposes if its "child" scope hasn't been disposed of, meaning any locks are not released 💥.
Happy to hear everyone's thoughts, particularly if you think I'm wrong and/or know more about this area of Umbraco than me .
https://harrygordon.co.uk/blog/not-thread-safe-obviously/
Here's the relevant thread on Github: https://github.com/umbraco/Umbraco-CMS/issues/14195#issuecomment-2117072274Harry Gordon
05/17/2024, 2:29 PMScope
, I've seen it happen often enough in Umbraco projects. So anything like:
- Uses of Scope.CreateScope
outside of a using
statement
- Uses of scopes in parellel (not always bad but should be done with care, by the sounds of it)
- Static variables for things that should be scoped (be it a scope or something that use a scope)Harry Gordon
05/17/2024, 2:30 PMCreateScope
outside of a using statement so I'll try finish that off next week.SavageNectar
05/20/2024, 1:24 PMHarry Gordon
05/20/2024, 3:32 PMSavageNectar
05/20/2024, 3:40 PMSavageNectar
05/20/2024, 3:42 PMHarry Gordon
05/20/2024, 3:49 PMHarry Gordon
05/20/2024, 3:51 PMMediaSavedNotification
or something?SavageNectar
05/20/2024, 3:57 PMSavageNectar
05/20/2024, 3:58 PMHarry Gordon
05/20/2024, 3:59 PMMediaService
operations result in the same thing... Or if it happens without Azure blob SDKHarry Gordon
05/20/2024, 3:59 PMMediaService.Move
and see if I can find anything but it must be something specific to your project/environment/code though.Harry Gordon
05/20/2024, 4:00 PMSavageNectar
05/20/2024, 4:02 PMHarry Gordon
05/21/2024, 8:15 AMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by