-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock-order-inversion detected by ThreadSanitizer in TextServerAdvanced
#87990
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
I've stumbled upon a related deadlock I can hit almost constantly with a ThreadSanitizer build (deadlock_mrp.zip) by pressing Here's the relevant ThreadSanitizer log: Click to show log
As noted in #72646 (comment), these godot/misc/error_suppressions/tsan.txt Lines 5 to 6 in 36e943b
I don't think they should be -- although hard to reproduce, the same deadlock MRP (deadlock_mrp.zip) sometimes show |
TextServerAdvanced
CC @bruvzg |
I'll re-check and try to simplify #72646 next week, it was fixing lock order but had some performance impact (and there were no reproducible issues related to it, apart from thread sanitizer report). |
Tested versions
63d6bda - reproducible
System information
Godot v4.3.dev (63d6bda) - Arch Linux #1 SMP PREEMPT_DYNAMIC Fri, 02 Feb 2024 17:03:55 +0000 - Tty - Vulkan (Forward+) - dedicated AMD Radeon RX 6900 XT (RADV NAVI21) () - AMD Ryzen 9 5950X 16-Core Processor (32 Threads)
Issue description
Opening the Editor against an empty project with ThreadSanitizer enabled will generate a
lock-order-inversion (potential deadlock)
warning. The Editor deadlocks are quite rare in my computer, but they tend to happen when I close the Editor -- I suppose the ThreadSanitizer warning is related to those deadlocks I've had in the past.Steps to reproduce
scons -Q -s platform=linuxbsd dev_mode=yes dev_build=yes udev=yes target=editor debug_symbols=yes precision=single bits=64 optimize=debug compiledb=yes use_llvm=yes linker=lld tests=yes use_asan=no use_tsan=yes werror=no -j$(nproc)
If you are on Arch Linux, it seems that linking to
libatomic.a
is unnecessary -- you may need to apply the following patch and try to compile again if it previously failed:If the
FATAL: ThreadSanitizer: unexpected memory mapping
error appears, you may need to temporarily lower the ASLR entropy:sudo sysctl vm.mmap_rnd_bits=28 # reverse it with: sudo sysctl vm.mmap_rnd_bits=32
OR disable ASLR entirely temporarily :
sudo sysctl kernel.randomize_va_space=0 # reverse it with:sudo sysctl kernel.randomize_va_space=2
Minimal reproduction project (MRP)
EmptyProject.zip
The text was updated successfully, but these errors were encountered: