-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Thread sanitization issues with garbage collection #52690
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Summary of all the TSAN issues just from loading a library, quitting when the log reached 1GB: Categories of sanitizer warnings:
Here are all the data races (again, just the first 1GB of starting up Julia) – just the last frame arraylist_grow /home/mc2473/juliasanitizer/julia/src/support/arraylist.c:49:22
arraylist_grow /home/mc2473/juliasanitizer/julia/src/support/arraylist.c:50:20
arraylist_grow /home/mc2473/juliasanitizer/julia/src/support/arraylist.c:60:22
arraylist_grow /home/mc2473/juliasanitizer/julia/src/support/arraylist.c:61:20
arraylist_grow /home/mc2473/juliasanitizer/julia/src/support/arraylist.c:64:12
arraylist_push /home/mc2473/juliasanitizer/julia/src/support/arraylist.c:70:26
gc_debug_alloc_check /home/mc2473/juliasanitizer/julia/src/gc-debug.c:481:9 arraylist_grow /home/mc2473/juliasanitizer/julia/src/support/arraylist.c:42:21
gc_debug_alloc_check /home/mc2473/juliasanitizer/julia/src/gc-debug.c:481:9 gc_debug_alloc_check /home/mc2473/juliasanitizer/julia/src/gc-debug.c:481:9
gc_debug_alloc_check /home/mc2473/juliasanitizer/julia/src/gc-debug.c:481:9 length essentials.jl:10
gc_mark_obj8 /home/mc2473/juliasanitizer/julia/src/gc.c:1862:36
gc_mark_objarray /home/mc2473/juliasanitizer/julia/src/gc.c:1955:32
gc_mark_outrefs /home/mc2473/juliasanitizer/julia/src/gc.c:2375:29
gc_mark_outrefs /home/mc2473/juliasanitizer/julia/src/gc.c:2509:17
gc_setmark_pool_ /home/mc2473/juliasanitizer/julia/src/gc.c:888:22
gc_try_claim_and_push /home/mc2473/juliasanitizer/julia/src/gc.c:1834:20
gc_try_setmark_tag /home/mc2473/juliasanitizer/julia/src/gc.c:837:11
isassigned array.jl:270
jl_array_nbytes /home/mc2473/juliasanitizer/julia/src/gc.c:1184:23
jl_svecref /home/mc2473/juliasanitizer/julia/src/./julia.h:1072:5
memcpy /workspace/srcdir/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:899
realloc /workspace/srcdir/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:700 (note to self: made with Edit: seems like https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions is good for suppressing the signal errors |
I'm not sure if the gc debug was made thread safe, I'm doubtful it has. |
Yes it is a real error, in that we should forcibly disable gc threads when gc debug mode is enabled |
Ah i see. That would also explain the segfaults which I tried to fix with #48210 |
That looks like the same root issue as in #52256. See also this comment:
Originally posted by @d-netto in #52256 (comment) |
Disabled by #48600 |
I tried to build Julia 1.10 with thread sanitizer support but I just get an onslaught of data race warnings about the Julia runtime itself, in particular from the garbage collection. Are these warnings real? Here are some of them (300 lines out of 39,701 - just from opening the REPL):
(expand)
If there aren't real, do you have any tips for hiding them so I can debug my Julia code?
@vchuravy @yuyichao looks like you saw the same issue on #27173. Do you have tips for hiding these ones?
(Or are these data races in the GC the actual reason for my segfaults (JuliaPy/PyCall.jl#1072)...?)
The text was updated successfully, but these errors were encountered: