|
| 1 | +# TSan: ThreadSanitizer |
| 2 | +# https://github.com/google/sanitizers/wiki/threadsanitizersuppressions |
| 3 | +# |
| 4 | +# This file describes a number of places where TSAN detects problems in CRuby. |
| 5 | +# Many of these indicate bugs. Others are benign (ex. data races that can be |
| 6 | +# replaced with relaxed atomic loads) |
| 7 | +# |
| 8 | +# Usage: |
| 9 | +# Configure with: |
| 10 | +# ./configure cflags='-fsanitize=thread' CC=clang |
| 11 | +# Build and run with: |
| 12 | +# TSAN_OPTIONS="suppressions=$(pwd)/misc/tsan_suppressions.txt:die_after_fork=0" |
| 13 | +# |
| 14 | +# Other useful TSAN_OPTIONS: |
| 15 | +# * halt_on_error=1 |
| 16 | +# * strip_path_prefix=$(pwd)/ |
| 17 | + |
| 18 | +# Namespaces |
| 19 | +race_top:push_subclass_entry_to_list |
| 20 | + |
| 21 | +# sub_nounderflow includes non-atomic read, possibly other issue |
| 22 | +race:objspace_malloc_increase_body |
| 23 | + |
| 24 | +# Signals and ubf |
| 25 | +race_top:rb_signal_buff_size |
| 26 | +race:unregister_ubf_list |
| 27 | + |
| 28 | +# interrupt flag is set atomically, but read non-atomically |
| 29 | +race_top:RUBY_VM_INTERRUPTED_ANY |
| 30 | +race_top:unblock_function_set |
| 31 | +race_top:threadptr_get_interrupts |
| 32 | + |
| 33 | +# system_working needs to be converted to atomic |
| 34 | +race:system_working |
| 35 | + |
| 36 | +# It's already crashing. We're doing our best |
| 37 | +signal:rb_vm_bugreport |
| 38 | +race:check_reserved_signal_ |
| 39 | + |
| 40 | +race_top:rb_check_deadlock |
| 41 | + |
| 42 | +# lock_owner |
| 43 | +race_top:thread_sched_setup_running_threads |
| 44 | +race_top:vm_lock_enter |
| 45 | +race_top:rb_ec_vm_lock_rec |
| 46 | +race_top:vm_lock_enter |
| 47 | +race_top:vm_locked |
| 48 | + |
| 49 | +# Ractors |
| 50 | +race:ractor_take |
| 51 | +race:ractor_register_take |
| 52 | +race:ractor_check_take_basket |
| 53 | +race:ractor_selector__wait |
| 54 | + |
| 55 | +# vm->ractor.sched.grq_cnt++ |
| 56 | +race_top:ractor_sched_enq |
| 57 | +race_top:ractor_sched_deq |
| 58 | + |
| 59 | +# Using VM lock instead of rb_native_mutex_unlock? |
| 60 | +race:vm_remove_ractor |
| 61 | + |
| 62 | +# cr->sync.wait.wakeup_status |
| 63 | +race_top:rb_ractor_sched_sleep |
| 64 | + |
| 65 | +# th->sched.finished at end of co_start |
| 66 | +race_top:rb_thread_sched_mark_zombies |
| 67 | + |
| 68 | +# Races against timer thread setting th->sched.waiting_reason.flags |
| 69 | +race_top:thread_sched_wait_events |
| 70 | + |
| 71 | +# At thread start |
| 72 | +race_top:rb_ractor_set_current_ec_ |
| 73 | + |
| 74 | +# Possible deadlock between Ractor lock and UBF lock |
| 75 | +deadlock:ractor_sleep_interrupt |
| 76 | + |
| 77 | +# RVALUE_AGE_SET manipulates flag bits on objects which may be accessed in Ractors |
| 78 | +race_top:RVALUE_AGE_SET |
| 79 | + |
| 80 | +# Inline caches |
| 81 | +race_top:vm_cc_call_set |
| 82 | +race_top:vm_search_cc |
| 83 | +race_top:vm_search_method_slowpath0 |
| 84 | +race_top:rb_vm_opt_getconstant_path |
| 85 | +race_top:vm_ic_attr_index_set |
| 86 | + |
| 87 | +# Shapes have problems with RCLASS_MAX_IV_COUNT and RCLASS_VARIATION_COUNT |
| 88 | +# which are probably benign |
| 89 | +race:shape_get_next |
| 90 | + |
| 91 | +# Non-atomic reads/writes |
| 92 | +race:gccct_method_search |
| 93 | + |
| 94 | +# Ignore exit for now |
| 95 | +race:rb_ec_finalize |
| 96 | +race:rb_ec_cleanup |
| 97 | + |
| 98 | +# object_id races |
| 99 | +race:object_id |
| 100 | + |
| 101 | +# Sets objspace->flags.dont_incremental while writebarrier may be running |
| 102 | +race_top:objspace_each_exec |
| 103 | +race_top:objspace_each_objects_ensure |
| 104 | + |
| 105 | +# Ractor autoload |
| 106 | +race:rb_ractor_autoload_load |
| 107 | + |
| 108 | +# Non-atomic lazy initialized static variable |
| 109 | +race_top:rbimpl_intern_const |
| 110 | + |
| 111 | +# Setting def->aliased bitfield non-atomically |
| 112 | +race_top:method_definition_addref |
| 113 | + |
| 114 | +# Switching to setting up tracing. Likely other ractors should be stopped for this. |
| 115 | +race_top:encoded_iseq_trace_instrument |
| 116 | +race:rb_iseq_trace_set_all |
| 117 | + |
| 118 | +# We walk the machine stack looking for markable objects, a thread with the GVL |
| 119 | +# released could by mutating the stack with non-Ruby-objects |
| 120 | +race:rb_gc_mark_machine_context |
0 commit comments