Skip to content

[Starvation] Assertion failed: (attempts < 1024), function commit, file ShadowTree.cppΒ #51870

@tomekzaw

Description

@tomekzaw

Description

Hi, this is Tomasz from the Reanimated team at Software Mansion again. We're getting numerous bug reports related to "scroll issues", for instance when using Reanimated to implement "sticky header". When we reproduced the issue, we found out the bug was caused by one of the workarounds we have incorporated into Reanimated. Most likely we'll need to get rid of the workaround because removing it fixes the "scrolling issue" and also actually makes our code easier to reason about and more maintainable. However, this brings back the original problem that the workaround was created for. So I'm here to describe the issue, hoping we can find a better way to resolve it and upstream the fix.

Context

React Native calls ShadowTree::commit method in order to update the UI after a React render. This usually happens on the JS thread (and the mounting part is then scheduled to be executed on the UI thread). Reanimated uses the same ShadowTree::commit method to apply animation changes but calls it on the UI thread so the animations are smooth and the whole rendering pipeline runs synchronously.

We assume that it is safe to call ShadowTree::commit from multiple threads at once since Fabric was designed to support commits from various threads and has proper built-in synchronization. While ShadowTree::commit seems to be thread-safe, it is implemented in a way that can lead to starvation, meaning that one of the parties will not be able to commit its changes because of the activity of other parties. This is exactly what happens in our case.

As a side note: Reanimated only updates the props and styles of the views and it never affects the structure of the ShadowTree. In most of the cases, it is able to re-use existing Yoga nodes and previously calculated layout. On the other hand, some more complex React renders can take more time to calculate layout.

Current state

Here's how the current implementation of ShadowTree::commit looks like. As you can see there's an attempt counter that increments each time the commit fails. Once the counter reaches the threshold of 1024, the assert fails and crashes the app in the debug mode. In the release mode, the number of attempts is theoretically infinite.

CommitStatus ShadowTree::commit(
const ShadowTreeCommitTransaction& transaction,
const CommitOptions& commitOptions) const {
[[maybe_unused]] int attempts = 0;
while (true) {
attempts++;
auto status = tryCommit(transaction, commitOptions);
if (status != CommitStatus::Failed) {
return status;
}
// After multiple attempts, we failed to commit the transaction.
// Something internally went terribly wrong.
react_native_assert(attempts < 1024);
}
}

Also consider the implementation of ShadowTree::tryCommit. First, it reads the revision of currently committed tree.

{
// Reading `currentRevision_` in shared manner.
std::shared_lock lock(commitMutex_);
commitMode = commitMode_;
oldRevision = currentRevision_;
}

Then, it runs the transaction, runs the commit hooks, runs the layout calculation and once everything is ready, it tries to commit the tree:

Image

However, if the revision of the committed tree has been changed, the commit will fail and the whole operation will be retried (see ShadowTree::commit above):

{
// Updating `currentRevision_` in unique manner if it hasn't changed.
std::unique_lock lock(commitMutex_);
if (currentRevision_.number != oldRevision.number) {
return CommitStatus::Failed;
}

Image

In most of the cases this mechanism works fine. However, in our case, Reanimated invokes ShadowTree::commit on each animation frame, every 16 ms (for 60 FPS) or 8 ms (for 120 FPS). If it takes more than 8 ms to process the commit coming from React, most likely it will fail:

Image

In most of the cases, all the subsequent retries fail as well. This leads to starvation and when the number of attempts increases to 1024, the app crashes.

Image

Proposed solution

Together with @bartlomiejbloniarz we would like to propose adding a FIFO mechanism to ShadowTree::commit. This can be done either using std::recursive_mutex or using a conditional variable. We vibe-coded the following implementation:

ShadowTree.cpp

 CommitStatus ShadowTree::commit(
   const ShadowTreeCommitTransaction& transaction,
   const CommitOptions& commitOptions) const {
-  [[maybe_unused]] int attempts = 0;
-
-  while (true) {
-    attempts++;
-
-    auto status = tryCommit(transaction, commitOptions);
-    if (status != CommitStatus::Failed) {
-      return status;
-    }
-
-    // After multiple attempts, we failed to commit the transaction.
-    // Something internally went terribly wrong.
-    react_native_assert(attempts < 1024);
+  size_t myTicket = ticketCounter_.fetch_add(1, std::memory_order_relaxed);
+  std::unique_lock<std::mutex> lock(mtx_);
+  cv_.wait(lock, [&]() { return serviceCounter_.load(std::memory_order_relaxed) == myTicket; });
+  CommitStatus status = tryCommit(transaction, commitOptions);
+  serviceCounter_.fetch_add(1, std::memory_order_relaxed);
+  cv_.notify_all();
+  return status;
 }

ShadowTree.h

  private:
   // ...
   std::shared_ptr<const MountingCoordinator> mountingCoordinator_;

+  mutable std::mutex mtx_;
+  mutable std::condition_variable cv_;
+  mutable std::atomic<size_t> ticketCounter_ = 0;
+  mutable std::atomic<size_t> serviceCounter_ = 0;
 };

Steps to reproduce

  1. Make sure that all patches from .yarn/patches/ directory are applied by Yarn
  2. Install and launch the application with yarn ios
  3. Observe the increasing number of attempts in the Xcode console
  4. Wait until the app crashes after 30-60 seconds

React Native Version

0.79.3

Affected Platforms

Runtime - Android, Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.5
  CPU: (12) arm64 Apple M3 Pro
  Memory: 244.52 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.19.0
    path: ~/.nvm/versions/node/v18.19.0/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v18.19.0/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.nvm/versions/node/v18.19.0/bin/npm
  Watchman:
    version: 2025.05.26.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/tomekzaw/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK:
    API Levels:
      - "30"
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
      - android-36 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.26053.27.2432.13536105
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.15
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/tomekzaw/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.0
    wanted: 18.0.0
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.3
    wanted: 0.79.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

react_native_assert failure: attempts < 1024
Assertion failed: (attempts < 1024), function commit, file ShadowTree.cpp, line 253.

com.facebook.react.runtime.JavaScript (9)#0	0x0000000104c6c874 in __pthread_kill ()
#1	0x0000000104b322ec in pthread_kill ()
#2	0x0000000180171ea8 in abort ()
#3	0x000000018017127c in __assert_rtn ()
#4	0x000000010994debc in facebook::react::ShadowTree::commit at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp:253
#5	0x0000000109996c48 in facebook::react::UIManager::completeSurface(int, std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<facebook::react::ShadowNode const>, std::__1::allocator<std::__1::shared_ptr<facebook::react::ShadowNode const>>>> const&, facebook::react::ShadowTree::CommitOptions)::$_0::operator()(facebook::react::ShadowTree const&) const at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp:197
#6	0x0000000109996bd0 in std::__1::__invoke[abi:de190102]<facebook::react::UIManager::completeSurface(int, std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<facebook::react::ShadowNode const>, std::__1::allocator<std::__1::shared_ptr<facebook::react::ShadowNode const>>>> const&, facebook::react::ShadowTree::CommitOptions)::$_0&, facebook::react::ShadowTree const&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#7	0x0000000109996b80 in std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:de190102]<facebook::react::UIManager::completeSurface(int, std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<facebook::react::ShadowNode const>, std::__1::allocator<std::__1::shared_ptr<facebook::react::ShadowNode const>>>> const&, facebook::react::ShadowTree::CommitOptions)::$_0&, facebook::react::ShadowTree const&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#8	0x0000000109996b54 in std::__1::__function::__alloc_func<facebook::react::UIManager::completeSurface(int, std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<facebook::react::ShadowNode const>, std::__1::allocator<std::__1::shared_ptr<facebook::react::ShadowNode const>>>> const&, facebook::react::ShadowTree::CommitOptions)::$_0, std::__1::allocator<facebook::react::UIManager::completeSurface(int, std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<facebook::react::ShadowNode const>, std::__1::allocator<std::__1::shared_ptr<facebook::react::ShadowNode const>>>> const&, facebook::react::ShadowTree::CommitOptions)::$_0>, void (facebook::react::ShadowTree const&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#9	0x0000000109995b5c in std::__1::__function::__func<facebook::react::UIManager::completeSurface(int, std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<facebook::react::ShadowNode const>, std::__1::allocator<std::__1::shared_ptr<facebook::react::ShadowNode const>>>> const&, facebook::react::ShadowTree::CommitOptions)::$_0, std::__1::allocator<facebook::react::UIManager::completeSurface(int, std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<facebook::react::ShadowNode const>, std::__1::allocator<std::__1::shared_ptr<facebook::react::ShadowNode const>>>> const&, facebook::react::ShadowTree::CommitOptions)::$_0>, void (facebook::react::ShadowTree const&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#10	0x000000010995aba4 in std::__1::__function::__value_func<void (facebook::react::ShadowTree const&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#11	0x0000000109957fb0 in std::__1::function<void (facebook::react::ShadowTree const&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#12	0x0000000109957f50 in facebook::react::ShadowTreeRegistry::visit at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.cpp:50
#13	0x000000010998be80 in facebook::react::UIManager::completeSurface at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp:196
#14	0x00000001099d0f3c in facebook::react::UIManagerBinding::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)::$_9::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp:454
#15	0x00000001099d0e80 in std::__1::__invoke[abi:de190102]<facebook::react::UIManagerBinding::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)::$_9&, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#16	0x00000001099d0e08 in std::__1::__invoke_void_return_wrapper<facebook::jsi::Value, false>::__call[abi:de190102]<facebook::react::UIManagerBinding::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)::$_9&, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:216
#17	0x00000001099d0dbc in std::__1::__function::__alloc_func<facebook::react::UIManagerBinding::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)::$_9, std::__1::allocator<facebook::react::UIManagerBinding::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)::$_9>, facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#18	0x00000001099cfb44 in std::__1::__function::__func<facebook::react::UIManagerBinding::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)::$_9, std::__1::allocator<facebook::react::UIManagerBinding::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)::$_9>, facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#19	0x0000000105df9fc0 in facebook::hermes::HermesRuntimeImpl::HFContext::func ()
#20	0x0000000105eb0188 in hermes::vm::NativeFunction::_nativeCall ()
#21	0x0000000105eca40c in hermes::vm::Interpreter::interpretFunction<false, false> ()
#22	0x0000000105ec9b2c in hermes::vm::Runtime::interpretFunctionImpl ()
#23	0x0000000105eb045c in hermes::vm::JSFunction::_callImpl ()
#24	0x0000000105eafcac in hermes::vm::BoundFunction::_boundCall ()
#25	0x0000000105df23ec in facebook::hermes::HermesRuntimeImpl::call ()
#26	0x00000001092ca5f8 in facebook::jsi::Function::call at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/ios/Pods/Headers/Public/React-jsi/jsi/jsi-inl.h:268
#27	0x00000001092ca508 in facebook::jsi::Function::call at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/ios/Pods/Headers/Public/React-jsi/jsi/jsi-inl.h:273
#28	0x0000000109f45b24 in facebook::react::Task::execute at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/Task.cpp:45
#29	0x0000000109f2c478 in facebook::react::RuntimeScheduler_Modern::executeTask at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:382
#30	0x0000000109f2d21c in facebook::react::RuntimeScheduler_Modern::runEventLoopTick at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:328
#31	0x0000000109f2cdb8 in facebook::react::RuntimeScheduler_Modern::runEventLoop at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:271
#32	0x0000000109f3418c in facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0::operator()(facebook::jsi::Runtime&) const at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:253
#33	0x0000000109f34154 in std::__1::__invoke[abi:de190102]<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0&, facebook::jsi::Runtime&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#34	0x0000000109f34104 in std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:de190102]<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0&, facebook::jsi::Runtime&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#35	0x0000000109f340d8 in std::__1::__function::__alloc_func<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0, std::__1::allocator<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0>, void (facebook::jsi::Runtime&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#36	0x0000000109f32f70 in std::__1::__function::__func<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0, std::__1::allocator<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0>, void (facebook::jsi::Runtime&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#37	0x00000001095d3400 in std::__1::__function::__value_func<void (facebook::jsi::Runtime&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#38	0x00000001095d33b0 in std::__1::function<void (facebook::jsi::Runtime&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#39	0x0000000109d436ec in _ZZZN8facebook5react13ReactInstanceC1ENSt3__110unique_ptrINS0_9JSRuntimeENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_18MessageQueueThreadEEENS8_INS0_12TimerManagerEEENS2_8functionIFvRNS_3jsi7RuntimeERKNS0_14JsErrorHandler14ProcessedErrorEEEEPNS0_18jsinspector_modern10HostTargetEENK3$_0clINSD_IFvSG_EEEEEDaT_ENKUlvE_clEv at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/runtime/ReactInstance.cpp:83
#40	0x0000000109d4363c in _ZNSt3__18__invokeB8de190102IRZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS2_9JSRuntimeENS_14default_deleteIS5_EEEENS_10shared_ptrINS2_18MessageQueueThreadEEENS9_INS2_12TimerManagerEEENS_8functionIFvRNS1_3jsi7RuntimeERKNS2_14JsErrorHandler14ProcessedErrorEEEEPNS2_18jsinspector_modern10HostTargetEENK3$_0clINSE_IFvSH_EEEEEDaT_EUlvE_JEEEDTclclsr3stdE7declvalISW_EEspclsr3stdE7declvalIT0_EEEEOSW_DpOSZ_ at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#41	0x0000000109d435f4 in _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callB8de190102IJRZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS4_9JSRuntimeENS_14default_deleteIS7_EEEENS_10shared_ptrINS4_18MessageQueueThreadEEENSB_INS4_12TimerManagerEEENS_8functionIFvRNS3_3jsi7RuntimeERKNS4_14JsErrorHandler14ProcessedErrorEEEEPNS4_18jsinspector_modern10HostTargetEENK3$_0clINSG_IFvSJ_EEEEEDaT_EUlvE_EEEvDpOT_ at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#42	0x0000000109d435d0 in _ZNSt3__110__function12__alloc_funcIZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS3_9JSRuntimeENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_18MessageQueueThreadEEENSA_INS3_12TimerManagerEEENS_8functionIFvRNS2_3jsi7RuntimeERKNS3_14JsErrorHandler14ProcessedErrorEEEEPNS3_18jsinspector_modern10HostTargetEENK3$_0clINSF_IFvSI_EEEEEDaT_EUlvE_NS_9allocatorISY_EEFvvEEclB8de190102Ev at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#43	0x0000000109d42310 in _ZNSt3__110__function6__funcIZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS3_9JSRuntimeENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_18MessageQueueThreadEEENSA_INS3_12TimerManagerEEENS_8functionIFvRNS2_3jsi7RuntimeERKNS3_14JsErrorHandler14ProcessedErrorEEEEPNS3_18jsinspector_modern10HostTargetEENK3$_0clINSF_IFvSI_EEEEEDaT_EUlvE_NS_9allocatorISY_EEFvvEEclEv at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#44	0x0000000109520934 in std::__1::__function::__value_func<void ()>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#45	0x000000010952077c in std::__1::function<void ()>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#46	0x0000000109697a74 in facebook::react::tryAndReturnError at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/React/CxxModule/RCTCxxUtils.mm:73
#47	0x00000001096c59ec in facebook::react::RCTMessageThread::tryFunc at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:68
#48	0x00000001096ca49c in facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0::operator()() const at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:81
#49	0x00000001096ca440 in std::__1::__invoke[abi:de190102]<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#50	0x00000001096ca3f8 in std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:de190102]<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#51	0x00000001096ca3d4 in std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0>, void ()>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#52	0x00000001096c9104 in std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0>, void ()>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#53	0x0000000109520934 in std::__1::__function::__value_func<void ()>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#54	0x000000010952077c in std::__1::function<void ()>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#55	0x00000001096c578c in invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:44
#56	0x0000000180429134 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#57	0x0000000180428898 in __CFRunLoopDoBlocks ()
#58	0x0000000180423a2c in __CFRunLoopRun ()
#59	0x0000000180422cec in CFRunLoopRunSpecific ()
#60	0x0000000109d2e748 in +[RCTJSThreadManager runRunLoop] at /Users/tomekzaw/RNOS/reproducer-fabric-commit-starvation/ReproducerApp/node_modules/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTJSThreadManager.mm:102
#61	0x0000000180f35148 in __NSThread__start__ ()
#62	0x0000000104b325f0 in _pthread_start ()

MANDATORY Reproducer

https://github.com/tomekzaw/reproducer-fabric-commit-starvation
https://github.com/tomekzaw/reproducer-fabric-commit-starvation-without-reanimated

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions