Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.79
Broken: version: 2.92.0 Beta, branch: master, commit date: 2021-01-25 22:10, hash: rB77f73a928439
Short description of error
Crashes while loading textures to GPU memory using CUDA.
After some digging in the code it seems to happen when the device memory is low and it decides to 'move_textures_to_host' then it ends up trying to lock 'cuda_mem_map_mutex' twice.
Example stack trace:
Attached .blend just has 16k and 8k generated black textures and highly subdivided cubes to fill GPU memory. Can't seem to get this to crash in the 2.91.2 release build.
Exact steps for others to reproduce the error
Select CUDA or OptiX as the device
Render a scene with large textures