Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created June 16, 2021 09:37
Show Gist options
  • Save dogbert17/dea0a2c20be1826851615980be3b1710 to your computer and use it in GitHub Desktop.
Save dogbert17/dea0a2c20be1826851615980be3b1710 to your computer and use it in GitHub Desktop.
Strange tsan output when running - MVM_SPESH_DISABLE=1 ./perl6-m -e 'my @A; loop { @a.hyper[0]; }'
WARNING: ThreadSanitizer: data race (pid=40728)
Write of size 8 at 0x7b9c005c8430 by thread T1 (mutexes: write M344379187987768544, write M341564438220872032, write M36):
#0 MVM_multi_cache_add src/6model/reprs/MVMMultiCache.c:342 (libmoar.so+0x3034bc)
#1 MVM_interp_run src/core/interp.c:1578 (libmoar.so+0x22e1b4)
#2 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#3 <null> <null> (libtsan.so.0+0x2d1af)
Previous read of size 8 at 0x7b9c005c8430 by thread T3 (mutexes: write M339875588360484400, write M337623788546922992):
#0 MVM_multi_cache_find_callsite_args src/6model/reprs/MVMMultiCache.c:464 (libmoar.so+0x304181)
#1 MVM_multi_cache_find_callsite_args src/6model/reprs/MVMMultiCache.c:399 (libmoar.so+0x304181)
#2 MVM_frame_find_invokee_multi_ok src/core/frame.c:1910 (libmoar.so+0x256e6c)
#3 MVM_interp_run src/core/interp.c:1094 (libmoar.so+0x230937)
#4 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#5 <null> <null> (libtsan.so.0+0x2d1af)
Location is heap block of size 14336 at 0x7b9c005c5000 allocated by main thread:
#0 malloc <null> (libtsan.so.0+0x30343)
#1 MVM_malloc src/core/alloc.h:2 (libmoar.so+0x29ff28)
#2 add_page src/gc/gen2.c:47 (libmoar.so+0x29ff28)
#3 MVM_gc_gen2_allocate src/gc/gen2.c:84 (libmoar.so+0x29ff28)
#4 MVM_gc_gen2_allocate_zeroed src/gc/gen2.c:111 (libmoar.so+0x29ffd2)
#5 MVM_gc_allocate src/gc/allocation.h:17 (libmoar.so+0x297104)
#6 MVM_gc_allocate_zeroed src/gc/allocation.c:56 (libmoar.so+0x297104)
#7 MVM_gc_allocate_object src/gc/allocation.c:93 (libmoar.so+0x297505)
#8 stub_object src/6model/serialization.c:2352 (libmoar.so+0x3370da)
#9 MVM_serialization_demand_object src/6model/serialization.c:3009 (libmoar.so+0x3370da)
#10 MVM_sc_get_object src/6model/sc.c:227 (libmoar.so+0x32ca6d)
#11 read_obj_ref src/6model/serialization.c:1845 (libmoar.so+0x332575)
#12 MVM_serialization_read_ref src/6model/serialization.c:1988 (libmoar.so+0x332575)
#13 deserialize src/6model/reprs/P6opaque.c:1249 (libmoar.so+0x2dd1f6)
#14 deserialize_object src/6model/serialization.c:2917 (libmoar.so+0x3353a9)
#15 work_loop src/6model/serialization.c:2966 (libmoar.so+0x3353a9)
#16 MVM_serialization_finish_deserialize_method_cache src/6model/serialization.c:3173 (libmoar.so+0x337fba)
#17 get_method_cache src/6model/6model.c:20 (libmoar.so+0x322dd8)
#18 MVM_6model_find_method src/6model/6model.c:111 (libmoar.so+0x322dd8)
#19 MVM_interp_run src/core/interp.c:1876 (libmoar.so+0x22735f)
#20 MVM_vm_run_file src/moar.c:504 (libmoar.so+0x3f93c0)
#21 main src/main.c:305 (moar+0x1982)
Mutex M344379187987768544 is already destroyed.
Mutex M341564438220872032 is already destroyed.
Mutex M36 (0x7b7800000578) created at:
#0 pthread_mutex_init <null> (libtsan.so.0+0x4a636)
#1 uv_mutex_init <null> (libmoar.so+0x45d1be)
#2 main src/main.c:280 (moar+0x1649)
Mutex M339875588360484400 is already destroyed.
Mutex M337623788546922992 is already destroyed.
Thread T1 (tid=40730, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x5ea99)
#1 uv_thread_create_ex <null> (libmoar.so+0x45d0b1)
#2 MVM_interp_run src/core/interp.c:4136 (libmoar.so+0x2143e3)
#3 MVM_vm_run_file src/moar.c:504 (libmoar.so+0x3f93c0)
#4 main src/main.c:305 (moar+0x1982)
Thread T3 (tid=40732, running) created by thread T2 at:
#0 pthread_create <null> (libtsan.so.0+0x5ea99)
#1 uv_thread_create_ex <null> (libmoar.so+0x45d0b1)
#2 MVM_interp_run src/core/interp.c:4136 (libmoar.so+0x2143e3)
#3 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#4 <null> <null> (libtsan.so.0+0x2d1af)
SUMMARY: ThreadSanitizer: data race src/6model/reprs/MVMMultiCache.c:342 in MVM_multi_cache_add
==================
==================
WARNING: ThreadSanitizer: data race (pid=40728)
Write of size 8 at 0x7b9c005c8428 by thread T1 (mutexes: write M344379187987768544, write M341564438220872032, write M36):
#0 MVM_multi_cache_add src/6model/reprs/MVMMultiCache.c:362 (libmoar.so+0x303583)
#1 MVM_interp_run src/core/interp.c:1578 (libmoar.so+0x22e1b4)
#2 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#3 <null> <null> (libtsan.so.0+0x2d1af)
Previous read of size 8 at 0x7b9c005c8428 by thread T3 (mutexes: write M339875588360484400, write M337623788546922992):
#0 MVM_multi_cache_find_callsite_args src/6model/reprs/MVMMultiCache.c:413 (libmoar.so+0x303f8e)
#1 MVM_multi_cache_find_callsite_args src/6model/reprs/MVMMultiCache.c:399 (libmoar.so+0x303f8e)
#2 MVM_frame_find_invokee_multi_ok src/core/frame.c:1910 (libmoar.so+0x256e6c)
#3 MVM_interp_run src/core/interp.c:1094 (libmoar.so+0x230937)
#4 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#5 <null> <null> (libtsan.so.0+0x2d1af)
Location is heap block of size 14336 at 0x7b9c005c5000 allocated by main thread:
#0 malloc <null> (libtsan.so.0+0x30343)
#1 MVM_malloc src/core/alloc.h:2 (libmoar.so+0x29ff28)
#2 add_page src/gc/gen2.c:47 (libmoar.so+0x29ff28)
#3 MVM_gc_gen2_allocate src/gc/gen2.c:84 (libmoar.so+0x29ff28)
#4 MVM_gc_gen2_allocate_zeroed src/gc/gen2.c:111 (libmoar.so+0x29ffd2)
#5 MVM_gc_allocate src/gc/allocation.h:17 (libmoar.so+0x297104)
#6 MVM_gc_allocate_zeroed src/gc/allocation.c:56 (libmoar.so+0x297104)
#7 MVM_gc_allocate_object src/gc/allocation.c:93 (libmoar.so+0x297505)
#8 stub_object src/6model/serialization.c:2352 (libmoar.so+0x3370da)
#9 MVM_serialization_demand_object src/6model/serialization.c:3009 (libmoar.so+0x3370da)
#10 MVM_sc_get_object src/6model/sc.c:227 (libmoar.so+0x32ca6d)
#11 read_obj_ref src/6model/serialization.c:1845 (libmoar.so+0x332575)
#12 MVM_serialization_read_ref src/6model/serialization.c:1988 (libmoar.so+0x332575)
#13 deserialize src/6model/reprs/P6opaque.c:1249 (libmoar.so+0x2dd1f6)
#14 deserialize_object src/6model/serialization.c:2917 (libmoar.so+0x3353a9)
#15 work_loop src/6model/serialization.c:2966 (libmoar.so+0x3353a9)
#16 MVM_serialization_finish_deserialize_method_cache src/6model/serialization.c:3173 (libmoar.so+0x337fba)
#17 get_method_cache src/6model/6model.c:20 (libmoar.so+0x322dd8)
#18 MVM_6model_find_method src/6model/6model.c:111 (libmoar.so+0x322dd8)
#19 MVM_interp_run src/core/interp.c:1876 (libmoar.so+0x22735f)
#20 MVM_vm_run_file src/moar.c:504 (libmoar.so+0x3f93c0)
#21 main src/main.c:305 (moar+0x1982)
Mutex M344379187987768544 is already destroyed.
Mutex M341564438220872032 is already destroyed.
Mutex M36 (0x7b7800000578) created at:
#0 pthread_mutex_init <null> (libtsan.so.0+0x4a636)
#1 uv_mutex_init <null> (libmoar.so+0x45d1be)
#2 main src/main.c:280 (moar+0x1649)
Mutex M339875588360484400 is already destroyed.
Mutex M337623788546922992 is already destroyed.
Thread T1 (tid=40730, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x5ea99)
#1 uv_thread_create_ex <null> (libmoar.so+0x45d0b1)
#2 MVM_interp_run src/core/interp.c:4136 (libmoar.so+0x2143e3)
#3 MVM_vm_run_file src/moar.c:504 (libmoar.so+0x3f93c0)
#4 main src/main.c:305 (moar+0x1982)
Thread T3 (tid=40732, running) created by thread T2 at:
#0 pthread_create <null> (libtsan.so.0+0x5ea99)
#1 uv_thread_create_ex <null> (libmoar.so+0x45d0b1)
#2 MVM_interp_run src/core/interp.c:4136 (libmoar.so+0x2143e3)
#3 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#4 <null> <null> (libtsan.so.0+0x2d1af)
SUMMARY: ThreadSanitizer: data race src/6model/reprs/MVMMultiCache.c:362 in MVM_multi_cache_add
==================
==================
WARNING: ThreadSanitizer: data race (pid=40728)
Write of size 8 at 0x7bb40008cbd0 by thread T1 (mutexes: write M344379187987768544, write M341564438220872032):
#0 set_obj_at_offset src/6model/reprs/P6opaque.c:21 (libmoar.so+0x2e0757)
#1 bind_attribute src/6model/reprs/P6opaque.c:389 (libmoar.so+0x2e0757)
#2 MVM_interp_run src/core/interp.c:2056 (libmoar.so+0x228f18)
#3 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#4 <null> <null> (libtsan.so.0+0x2d1af)
Previous read of size 8 at 0x7bb40008cbd0 by thread T3 (mutexes: write M339875588360484400, write M337623788546922992):
#0 MVM_p6opaque_read_object src/6model/reprs/P6opaque.h:116 (libmoar.so+0x256bd1)
#1 MVM_frame_find_invokee_multi_ok src/core/frame.c:1874 (libmoar.so+0x256bd1)
#2 MVM_interp_run src/core/interp.c:1094 (libmoar.so+0x230937)
#3 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#4 <null> <null> (libtsan.so.0+0x2d1af)
Location is heap block of size 38912 at 0x7bb40008c000 allocated by main thread:
#0 malloc <null> (libtsan.so.0+0x30343)
#1 MVM_malloc src/core/alloc.h:2 (libmoar.so+0x29fdbf)
#2 setup_bin src/gc/gen2.c:27 (libmoar.so+0x29fdbf)
#3 MVM_gc_gen2_allocate src/gc/gen2.c:74 (libmoar.so+0x29fdbf)
#4 MVM_gc_gen2_allocate_zeroed src/gc/gen2.c:111 (libmoar.so+0x29ffd2)
#5 MVM_gc_allocate src/gc/allocation.h:17 (libmoar.so+0x297104)
#6 MVM_gc_allocate_zeroed src/gc/allocation.c:56 (libmoar.so+0x297104)
#7 MVM_gc_allocate_object src/gc/allocation.c:93 (libmoar.so+0x297505)
#8 allocate src/6model/reprs/P6opaque.c:67 (libmoar.so+0x2dcc48)
#9 stub_object src/6model/serialization.c:2352 (libmoar.so+0x3370da)
#10 MVM_serialization_demand_object src/6model/serialization.c:3009 (libmoar.so+0x3370da)
#11 MVM_sc_get_object src/6model/sc.c:227 (libmoar.so+0x32ca6d)
#12 repossess src/6model/serialization.c:3208 (libmoar.so+0x32eb4c)
#13 MVM_serialization_deserialize src/6model/serialization.c:3430 (libmoar.so+0x33c827)
#14 MVM_interp_run src/core/interp.c:3260 (libmoar.so+0x20abd3)
#15 MVM_vm_run_file src/moar.c:504 (libmoar.so+0x3f93c0)
#16 main src/main.c:305 (moar+0x1982)
Mutex M344379187987768544 is already destroyed.
Mutex M341564438220872032 is already destroyed.
Mutex M339875588360484400 is already destroyed.
Mutex M337623788546922992 is already destroyed.
Thread T1 (tid=40730, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x5ea99)
#1 uv_thread_create_ex <null> (libmoar.so+0x45d0b1)
#2 MVM_interp_run src/core/interp.c:4136 (libmoar.so+0x2143e3)
#3 MVM_vm_run_file src/moar.c:504 (libmoar.so+0x3f93c0)
#4 main src/main.c:305 (moar+0x1982)
Thread T3 (tid=40732, running) created by thread T2 at:
#0 pthread_create <null> (libtsan.so.0+0x5ea99)
#1 uv_thread_create_ex <null> (libmoar.so+0x45d0b1)
#2 MVM_interp_run src/core/interp.c:4136 (libmoar.so+0x2143e3)
#3 start_thread src/core/threads.c:91 (libmoar.so+0x26139e)
#4 <null> <null> (libtsan.so.0+0x2d1af)
SUMMARY: ThreadSanitizer: data race src/6model/reprs/P6opaque.c:21 in set_obj_at_offset
==================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment