dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.23k stars 1.57k forks source link

Data race on object header between `DRT_HelperCompileFunction` and `FreeList` #53718

Open dcharkes opened 1 year ago

dcharkes commented 1 year ago

Data race on object header (class id) between DRT_HelperCompileFunction and FreeList.

From the isolate stress test builder:

[/b/s/w/ir/cache/builder/sdk/runtime/tests/concurrency/../../../tests/standalone/pow_test.dart] starting ...
/b/s/w/ir/buildtools/linux-x64/clang/bin/llvm-symbolizer: error: '/memfd:dart-code (deleted)': No such file or directory
==================
WARNING: ThreadSanitizer: data race (pid=58049)
  Atomic read of size 8 at 0x7fe0c81fd930 by thread T22:
    #0 unsigned long std::_LIBCPP_ABI_NAMESPACE::__cxx_atomic_load[abi:v15000]<unsigned long>(std::_LIBCPP_ABI_NAMESPACE::__cxx_atomic_base_impl<unsigned long> const*, std::_LIBCPP_ABI_NAMESPACE::memory_order) out/ReleaseTSANX64/../../third_party/libcxx/include/atomic:958:12 (dart+0x23c80ea)
    #1 std::_LIBCPP_ABI_NAMESPACE::__atomic_base<unsigned long, false>::load[abi:v15000](std::_LIBCPP_ABI_NAMESPACE::memory_order) const out/ReleaseTSANX64/../../third_party/libcxx/include/atomic:1588:17 (dart+0x23c80ea)
    #2 dart::UntaggedObject::ClassIdTag::Type dart::AtomicBitFieldContainer<unsigned long>::Read<dart::UntaggedObject::ClassIdTag, (std::_LIBCPP_ABI_NAMESPACE::memory_order)0>() const out/ReleaseTSANX64/../../runtime/vm/bitfield.h:48:42 (dart+0x23c80ea)
    #3 dart::UntaggedObject::GetClassId() const out/ReleaseTSANX64/../../runtime/vm/raw_object.h:357:46 (dart+0x23c80ea)
    #4 dart::ObjectPtr::GetClassId() const out/ReleaseTSANX64/../../runtime/vm/raw_object.h:849:19 (dart+0x23c80ea)
    #5 dart::ObjectPtr::GetClassIdMayBeSmi() const out/ReleaseTSANX64/../../runtime/vm/tagged_pointer.h:152:29 (dart+0x23c80ea)
    #6 dart::Object::setPtr(dart::ObjectPtr, long) out/ReleaseTSANX64/../../runtime/vm/object.h:13298:25 (dart+0x23c80ea)
    #7 dart::Function::initializeHandle(dart::Function*, dart::ObjectPtr) out/ReleaseTSANX64/../../runtime/vm/object.h:4273:3 (dart+0x23c80ea)
    #8 dart::Function::CheckedHandle(dart::Zone*, dart::ObjectPtr) out/ReleaseTSANX64/../../runtime/vm/object.h:4273:3 (dart+0x23c80ea)
    #9 dart::DRT_HelperCompileFunction(dart::Isolate*, dart::Thread*, dart::Zone*, dart::NativeArguments) out/ReleaseTSANX64/../../runtime/vm/compiler/jit/compiler.cc:214:30 (dart+0x26ccad1)
    #10 dart::DRT_CompileFunction(dart::NativeArguments) out/ReleaseTSANX64/../../runtime/vm/compiler/jit/compiler.cc:212:1 (dart+0x26ccad1)
    #11 <null> <null> (memfd:dart-code (deleted)+0x2a69)
    #12 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x2443d31)
    #13 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:718:28 (dart+0x2443d31)
    #14 dart::IsolateMessageHandler::HandleMessage(std::_LIBCPP_ABI_NAMESPACE::unique_ptr<dart::Message, std::_LIBCPP_ABI_NAMESPACE::default_delete<dart::Message>>) out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1393:15 (dart+0x24799d0)
    #15 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:238:16 (dart+0x24ba466)
    #16 dart::MessageHandler::TaskCallback() out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:457:18 (dart+0x24bb0a4)
    #17 dart::MessageHandlerTask::Run() out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x24bb613)
    #18 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x26b19f9)
    #19 dart::ThreadPool::Worker::Main(unsigned long) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x26b1f27)
    #20 dart::ThreadStart(void*) out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x25d4753)

  Previous write of size 8 at 0x7fe0c81fd930 by thread T18 (mutexes: write M0):
    #0 dart::FreeListElement::AsElement(unsigned long, long) out/ReleaseTSANX64/../../runtime/vm/heap/freelist.cc:35:28 (dart+0x26e2c13)
    #1 dart::FreeList::SplitElementAfterAndEnqueue(dart::FreeListElement*, long, bool) out/ReleaseTSANX64/../../runtime/vm/heap/freelist.cc:309:13 (dart+0x26e2c13)
    #2 dart::FreeList::TryAllocateLocked(long, bool) out/ReleaseTSANX64/../../runtime/vm/heap/freelist.cc:99:7 (dart+0x26e2b49)
    #3 dart::FreeList::TryAllocate(long, bool) out/ReleaseTSANX64/../../runtime/vm/heap/freelist.cc:62:10 (dart+0x26e2464)
    #4 dart::PageSpace::TryAllocateInternal(long, dart::FreeList*, bool, dart::PageSpace::GrowthPolicy, bool, bool) out/ReleaseTSANX64/../../runtime/vm/heap/pages.cc:409:26 (dart+0x26f454a)
    #5 dart::PageSpace::TryAllocate(long, bool, dart::PageSpace::GrowthPolicy) out/ReleaseTSANX64/../../runtime/vm/heap/pages.h:146:12 (dart+0x26e4b02)
    #6 dart::Heap::AllocateOld(dart::Thread*, long, bool) out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:123:29 (dart+0x26e4b02)
    #7 dart::Heap::Allocate(dart::Thread*, long, dart::Heap::Space) out/ReleaseTSANX64/../../runtime/vm/heap/heap.h (dart+0x24d87fd)
    #8 dart::Object::Allocate(long, long, dart::Heap::Space, bool, unsigned long, unsigned long) out/ReleaseTSANX64/../../runtime/vm/object.cc:2839:25 (dart+0x24fc8e8)
    #9 dart::TypedDataView::ObjectPtrType dart::Object::AllocateVariant<dart::TypedDataView>(long, dart::Heap::Space) out/ReleaseTSANX64/../../runtime/vm/object.h:741:51 (dart+0x2544a68)
    #10 dart::TypedDataView::New(long, dart::Heap::Space) out/ReleaseTSANX64/../../runtime/vm/object.cc:25824:10 (dart+0x2544a68)
    #11 dart::TypedDataView::New(long, dart::TypedDataBase const&, long, long, dart::Heap::Space) out/ReleaseTSANX64/../../runtime/vm/object.cc:25832:40 (dart+0x2544a68)
    #12 dart::TypedDataBase::ViewFromTo(long, long, dart::Heap::Space) const out/ReleaseTSANX64/../../runtime/vm/object.cc (dart+0x2544a68)
    #13 dart::KernelProgramInfo::KernelLibrary(long) const out/ReleaseTSANX64/../../runtime/vm/object.cc:14986:20 (dart+0x252c411)
    #14 dart::Function::KernelLibrary() const out/ReleaseTSANX64/../../runtime/vm/object.cc:10867:15 (dart+0x252c411)
    #15 dart::kernel::ReadParameterCovariance(dart::Function const&, dart::BitVector*, dart::BitVector*) out/ReleaseTSANX64/../../runtime/vm/kernel.cc:618:44 (dart+0x24a3c05)
    #16 dart::kernel::NeedsDynamicInvocationForwarder(dart::Function const&) out/ReleaseTSANX64/../../runtime/vm/kernel.cc:723:3 (dart+0x24a433c)
    #17 dart::Function::GetDynamicInvocationForwarder(dart::String const&, bool) const out/ReleaseTSANX64/../../runtime/vm/object.cc:4318:7 (dart+0x250ba6b)
    #18 dart::ResolveDynamicAnyArgsWithCustomLookup(dart::Zone*, dart::Class const&, dart::String const&, bool, std::_LIBCPP_ABI_NAMESPACE::function<dart::FunctionPtr (dart::Class&, dart::String const&)>) out/ReleaseTSANX64/../../runtime/vm/resolver.cc:81:20 (dart+0x265058f)
    #19 dart::ResolveDynamicForReceiverClassWithCustomLookup(dart::Class const&, dart::String const&, dart::ArgumentsDescriptor const&, bool, std::_LIBCPP_ABI_NAMESPACE::function<dart::FunctionPtr (dart::Class&, dart::String const&)>) out/ReleaseTSANX64/../../runtime/vm/resolver.cc:124:13 (dart+0x264fdbb)
    #20 dart::Resolver::ResolveDynamicForReceiverClass(dart::Class const&, dart::String const&, dart::ArgumentsDescriptor const&, bool) out/ReleaseTSANX64/../../runtime/vm/resolver.cc:165:10 (dart+0x264fc8a)
    #21 dart::Resolve(dart::Thread*, dart::Zone*, dart::GrowableArray<dart::Instance const*> const&, dart::Class const&, dart::String const&, dart::Array const&) out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:1717:23 (dart+0x26595a2)
    #22 dart::PatchableCallHandler::ResolveTargetFunction(dart::Object const&) out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:2519:10 (dart+0x26595a2)
    #23 dart::PatchableCallHandler::ResolveSwitchAndReturn(dart::Object const&) out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:2527:31 (dart+0x265978e)
    #24 dart::InlineCacheMissHandler(dart::Thread*, dart::Zone*, dart::GrowableArray<dart::Instance const*> const&, dart::ICData const&, dart::NativeArguments) out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:2637:11 (dart+0x26616e8)
    #25 dart::DRT_HelperInlineCacheMissHandlerOneArg(dart::Isolate*, dart::Thread*, dart::Zone*, dart::NativeArguments) out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:2654:3 (dart+0x2659c57)
    #26 dart::DRT_InlineCacheMissHandlerOneArg(dart::NativeArguments) out/ReleaseTSANX64/../../runtime/vm/runtime_entry.cc:2648:1 (dart+0x2659c57)
    #27 <null> <null> (memfd:dart-code (deleted)+0x2a69)
    #28 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x2443d31)
    #29 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:718:28 (dart+0x2443d31)
    #30 dart::IsolateMessageHandler::HandleMessage(std::_LIBCPP_ABI_NAMESPACE::unique_ptr<dart::Message, std::_LIBCPP_ABI_NAMESPACE::default_delete<dart::Message>>) out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1393:15 (dart+0x24799d0)
    #31 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:238:16 (dart+0x24ba466)
    #32 dart::MessageHandler::TaskCallback() out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:457:18 (dart+0x24bb0a4)
    #33 dart::MessageHandlerTask::Run() out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x24bb613)
    #34 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x26b19f9)
    #35 dart::ThreadPool::Worker::Main(unsigned long) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x26b1f27)
    #36 dart::ThreadStart(void*) out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x25d4753)

  Mutex M0 (0x7b7c00003c90) created at:
    #0 pthread_mutex_init ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1341:3 (dart+0x20c65a0)
    #1 dart::Mutex::Mutex(char const*) out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:308:12 (dart+0x25d4b17)
    #2 dart::FreeList::FreeList() out/ReleaseTSANX64/../../runtime/vm/heap/freelist.cc:53:24 (dart+0x26e2307)
    #3 dart::PageSpace::PageSpace(dart::Heap*, long) out/ReleaseTSANX64/../../runtime/vm/heap/pages.cc:57:18 (dart+0x26f2ca7)
    #4 dart::Heap::Heap(dart::IsolateGroup*, bool, long, long) out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:50:7 (dart+0x26e3d01)
    #5 dart::Heap::Init(dart::IsolateGroup*, bool, long, long) out/ReleaseTSANX64/../../runtime/vm/heap/heap.cc:716:34 (dart+0x26e7d63)
    #6 dart::IsolateGroup::CreateHeap(bool, bool) out/ReleaseTSANX64/../../runtime/vm/isolate.cc:472:3 (dart+0x247337f)
    #7 Dart_CreateIsolateGroup out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:1373:10 (dart+0x2a38fcd)
    #8 dart::bin::CreateIsolateGroupAndSetupHelper(bool, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**, int*, bool) out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:815:15 (dart+0x215578d)
    #9 dart::bin::RunMainIsolate(char const*, char const*, bool, dart::bin::CommandLineOptions*) out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:1031:26 (dart+0x2154f22)
    #10 dart::bin::main(int, char**) out/ReleaseTSANX64/../../runtime/bin/main_impl.cc:1427:9 (dart+0x21564bb)
    #11 main out/ReleaseTSANX64/../../runtime/bin/main.cc:9:3 (dart+0x2154dd4)

  Thread T22 'DartWorker' (tid=58072, running) created by thread T17 at:
    #0 pthread_create ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1048:3 (dart+0x20c4c2b)
    #1 dart::OSThread::Start(char const*, void (*)(unsigned long), unsigned long) out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:173:12 (dart+0x25d4613)
    #2 dart::ThreadPool::Worker::StartThread() out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:296:16 (dart+0x26b1151)
    #3 dart::ThreadPool::RunImpl(std::_LIBCPP_ABI_NAMESPACE::unique_ptr<dart::ThreadPool::Task, std::_LIBCPP_ABI_NAMESPACE::default_delete<dart::ThreadPool::Task>>) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:94:17 (dart+0x26b1151)
    #4 bool dart::ThreadPool::Run<dart::MessageHandlerTask, dart::MessageHandler*>(dart::MessageHandler*&&) out/ReleaseTSANX64/../../runtime/vm/thread_pool.h:46:12 (dart+0x24b9ee6)
    #5 dart::MessageHandler::Run(dart::ThreadPool*, dart::MessageHandler::MessageStatus (*)(unsigned long), void (*)(unsigned long), unsigned long) out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:119:24 (dart+0x24b9ee6)
    #6 dart::Isolate::Run() out/ReleaseTSANX64/../../runtime/vm/isolate.cc:2331:22 (dart+0x247d29c)
    #7 Dart_RunLoopAsync out/ReleaseTSANX64/../../runtime/vm/dart_api_impl.cc:2105:12 (dart+0x2a3da7d)
    #8 dart::SpawnIsolateTask::Run(dart::Isolate*) out/ReleaseTSANX64/../../runtime/lib/isolate.cc:747:10 (dart+0x23a347d)
    #9 dart::SpawnIsolateTask::RunLightweight(char const*) out/ReleaseTSANX64/../../runtime/lib/isolate.cc:712:5 (dart+0x23a2ed4)
    #10 dart::SpawnIsolateTask::Run() out/ReleaseTSANX64/../../runtime/lib/isolate.cc:645:7 (dart+0x23a2bec)
    #11 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x26b19f9)
    #12 dart::ThreadPool::Worker::Main(unsigned long) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x26b1f27)
    #13 dart::ThreadStart(void*) out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x25d4753)

  Thread T18 'DartWorker' (tid=58068, running) created by thread T7 at:
    #0 pthread_create ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1048:3 (dart+0x20c4c2b)
    #1 dart::OSThread::Start(char const*, void (*)(unsigned long), unsigned long) out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:173:12 (dart+0x25d4613)
    #2 dart::ThreadPool::Worker::StartThread() out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:296:16 (dart+0x26b1151)
    #3 dart::ThreadPool::RunImpl(std::_LIBCPP_ABI_NAMESPACE::unique_ptr<dart::ThreadPool::Task, std::_LIBCPP_ABI_NAMESPACE::default_delete<dart::ThreadPool::Task>>) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:94:17 (dart+0x26b1151)
    #4 bool dart::ThreadPool::Run<dart::SpawnIsolateTask, dart::Isolate*&, std::_LIBCPP_ABI_NAMESPACE::unique_ptr<dart::IsolateSpawnState, std::_LIBCPP_ABI_NAMESPACE::default_delete<dart::IsolateSpawnState>>>(dart::Isolate*&, std::_LIBCPP_ABI_NAMESPACE::unique_ptr<dart::IsolateSpawnState, std::_LIBCPP_ABI_NAMESPACE::default_delete<dart::IsolateSpawnState>>&&) out/ReleaseTSANX64/../../runtime/vm/thread_pool.h:46:12 (dart+0x239fbae)
    #5 dart::DN_HelperIsolate_spawnFunction(dart::Isolate*, dart::Thread*, dart::Zone*, dart::NativeArguments*) out/ReleaseTSANX64/../../runtime/lib/isolate.cc:966:36 (dart+0x239fbae)
    #6 dart::BootstrapNatives::DN_Isolate_spawnFunction(dart::Thread*, dart::Zone*, dart::NativeArguments*) out/ReleaseTSANX64/../../runtime/lib/isolate.cc:913:1 (dart+0x239fbae)
    #7 dart::NativeEntry::BootstrapNativeCallWrapper(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*)) out/ReleaseTSANX64/../../runtime/vm/native_entry.cc:144:37 (dart+0x24d57e4)
    #8 <null> <null> (memfd:dart-code (deleted)+0x2bda)
    #9 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&) out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:37:10 (dart+0x2443d31)
    #10 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&) out/ReleaseTSANX64/../../runtime/vm/dart_entry.cc:718:28 (dart+0x2443d31)
    #11 dart::IsolateMessageHandler::HandleMessage(std::_LIBCPP_ABI_NAMESPACE::unique_ptr<dart::Message, std::_LIBCPP_ABI_NAMESPACE::default_delete<dart::Message>>) out/ReleaseTSANX64/../../runtime/vm/isolate.cc:1393:15 (dart+0x24799d0)
    #12 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool) out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:238:16 (dart+0x24ba466)
    #13 dart::MessageHandler::TaskCallback() out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:457:18 (dart+0x24bb0a4)
    #14 dart::MessageHandlerTask::Run() out/ReleaseTSANX64/../../runtime/vm/message_handler.cc:31:15 (dart+0x24bb613)
    #15 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:158:15 (dart+0x26b19f9)
    #16 dart::ThreadPool::Worker::Main(unsigned long) out/ReleaseTSANX64/../../runtime/vm/thread_pool.cc:330:9 (dart+0x26b1f27)
    #17 dart::ThreadStart(void*) out/ReleaseTSANX64/../../runtime/vm/os_thread_linux.cc:154:5 (dart+0x25d4753)

SUMMARY: ThreadSanitizer: data race out/ReleaseTSANX64/../../third_party/libcxx/include/atomic:958:12 in unsigned long std::_LIBCPP_ABI_NAMESPACE::__cxx_atomic_load[abi:v15000]<unsigned long>(std::_LIBCPP_ABI_NAMESPACE::__cxx_atomic_base_impl<unsigned long> const*, std::_LIBCPP_ABI_NAMESPACE::memory_order)
==================
=> Running "out/ReleaseTSANX64/dart --disable-dart-dev -Drepeat=4 -Dshard=160 -Dshards=200 --sound-null-safety runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill" failed with -6
=> Possible crash 0 (pid: 58049)

log: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8767628529537305665/+/u/collect_shards/Run_Isolate_Stress_Tests_shard_3/task_stdout_stderr:_Run_Isolate_Stress_Tests_shard_3

The isolate stress test bot has been green for a while. So either this failure is very unlikely to be caught, or we landed something recently. I don't see any VM commits related to GC in the last week.

cc @rmacnak-google

rmacnak-google commented 1 year ago

I suspect thread T18 has published a new function into an ICData entry array etc, with release stores, and T22 has picked it up and passed it to the lazy compile stub, but the IC stub running on T22 doesn't have acquire loads that let TSAN know that things are ordered.

@aam Didn't we used to have a RunWithStoppedMutators/safepoint around updating a switchable call?

aam commented 1 year ago

@aam Didn't we used to have a RunWithStoppedMutators/safepoint around updating a switchable call?

https://github.com/dart-lang/sdk/blob/main/runtime/vm/runtime_entry.cc#L2528

// Mutators are only stopped if we actually need to patch a patchable call.
// We may not do that if we e.g. just add one more check to an ICData.
derekxu16 commented 5 months ago

happened again: https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/iso-stress-linux/5946/overview