Skip to content
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

random crash when reload with two or more simple jsi modules on ios #1011

Closed
1 task done
iwater opened this issue May 25, 2023 · 13 comments
Closed
1 task done

random crash when reload with two or more simple jsi modules on ios #1011

iwater opened this issue May 25, 2023 · 13 comments
Labels
need more info Awating additional info before proceeding

Comments

@iwater
Copy link

iwater commented May 25, 2023

Bug Description

When the app is launched or reloaded, it will randomly crash, I have provided screenshots and demo code, it is very easy to reproduce this problem, initialize a new react-native project, add two jsi modules, and then reload the app from the dev menu, it will randomly crash, the crash probability is very high, actually if there is only one jsi module, it will also crash, but the reproduction probability is low, I found that if there are two jsi modules, the crash is very easy to reproduce

  • I have run gradle clean and confirmed this bug does not occur with JSC

Hermes version: 0.71.8
React Native version (if any): 0.71.8
OS version (if any): iOS 16.2
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): arm64-v8

Steps To Reproduce

  1. create new react-native project
  2. add two jsi modules
  3. launch app & reload from dev menu

code example:

npx react-native init demo
cd demo
yarn add react-native-quick-md5
yarn add react-native-quick-base64
npx pod-install ios

demo code https://github.com/iwater/bug_demo

截屏2023-05-25 12 11 37
@iwater iwater added the bug Something isn't working label May 25, 2023
@iwater iwater changed the title random crash when reload which tow or more simple jsi modules on ios random crash when reload which two or more simple jsi modules on ios May 25, 2023
@iwater iwater changed the title random crash when reload which two or more simple jsi modules on ios random crash when reload with two or more simple jsi modules on ios May 25, 2023
@tmikov tmikov removed the bug Something isn't working label May 25, 2023
@tmikov
Copy link
Contributor

tmikov commented May 25, 2023

Hi, as you can see from the screen shot you provided, this is a deliberate diagnostic crash indicating that a Hermes runtime is used simultaneously from two separate threads without synchronization. JSI is not a thread-safe API, as is explained in this comment:

/// Represents a JS runtime. Movable, but not copyable. Note that

So, the problem is that the application is using JSI from multiple threads without proper synchronization.

@iwater
Copy link
Author

iwater commented May 25, 2023

Both those modules themselves do not use multithreading and do not add any js code in demo app to call the methods in the jsi modules, just crash when the app launch or reload (loads the jsi module), so the problem should be a hermes jsi problem or react-native problem? Including the following issue #facebook/react-native#35720 (comment), which seems to be a common problem? Should it be solved from the architecture? Or is there a general generic template code that provides the correct code to initialize jsi module to avoid similar problems?

@tmikov tmikov reopened this May 25, 2023
@tmikov tmikov added the need more info Awating additional info before proceeding label May 25, 2023
@tmikov
Copy link
Contributor

tmikov commented May 25, 2023

@iwater can you generate a text dump of all thread stacks at the moment of the crash?

@iwater
Copy link
Author

iwater commented May 25, 2023

(lldb) bt all
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x000000010b68c352 demo`facebook::react::(anonymous namespace)::ReentrancyCheck::before(this=0x00006000007a55a8) at HermesExecutorFactory.cpp:115:7
    frame #1: 0x000000010b68c205 demo`facebook::jsi::detail::BeforeCaller<facebook::react::(anonymous namespace)::ReentrancyCheck, void>::before(t=0x00006000007a55a8)::ReentrancyCheck&) at decorator.h:458:7
    frame #2: 0x000000010b68c1e3 demo`facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(this=0x00007ff7b4fed338, with=0x00006000007a55a8)::ReentrancyCheck&) at decorator.h:787:7
    frame #3: 0x000000010b68c18d demo`facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(this=0x00007ff7b4fed338, with=0x00006000007a55a8)::ReentrancyCheck&) at decorator.h:786:38
    frame #4: 0x000000010b682be8 demo`facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::createPropNameIDFromAscii(this=0x00006000007a5578, str="md5FromArrayBuffer", length=18) at decorator.h:587:12
    frame #5: 0x000000010b80cd84 demo`facebook::jsi::PropNameID::forAscii(runtime=0x00006000007a5578, str="md5FromArrayBuffer", length=18) at jsi.h:437:20
    frame #6: 0x000000010b80c9cc demo`facebook::jsi::PropNameID::forAscii(runtime=0x00006000007a5578, str="md5FromArrayBuffer") at jsi.h:443:12
    frame #7: 0x000000010b80c707 demo`installMd5(jsiRuntime=0x00006000007a5578) at quick-md5.cpp:33:7
    frame #8: 0x000000010b8101bd demo`-[QuickMd5 setBridge:](self=0x0000600002557a20, _cmd="setBridge:", bridge=0x00007fb692704080) at QuickMd5.mm:26:3
    frame #9: 0x00007ff800bcdbad Foundation`-[NSObject(NSKeyValueCoding) setValue:forKey:] + 315
    frame #10: 0x000000010b429ffa demo`-[RCTModuleData setBridgeForInstance](self=0x00006000016f9a40, _cmd="setBridgeForInstance") at RCTModuleData.mm:267:7
    frame #11: 0x000000010b429a21 demo`-[RCTModuleData setUpInstanceAndBridge:](self=0x00006000016f9a40, _cmd="setUpInstanceAndBridge:", requestId=713) at RCTModuleData.mm:221:7
    frame #12: 0x000000010b42bd6a demo`__25-[RCTModuleData instance]_block_invoke(.block_descriptor=0x00007ff7b4fed9f0) at RCTModuleData.mm:402:9
    frame #13: 0x000000010b4a15f8 demo`RCTUnsafeExecuteOnMainQueueSync(block=0x000000010b42bd40) at RCTUtils.m:275:5
    frame #14: 0x000000010b42b8e2 demo`-[RCTModuleData instance](self=0x00006000016f9a40, _cmd="instance") at RCTModuleData.mm:401:7
    frame #15: 0x000000010b3c7208 demo`__49-[RCTCxxBridge _prepareModulesWithDispatchGroup:]_block_invoke(.block_descriptor=0x0000600002d8f6c0) at RCTCxxBridge.mm:1023:17
    frame #16: 0x000000010e3f6d18 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #17: 0x000000010e3f7f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #18: 0x000000010e408e5c libdispatch.dylib`_dispatch_main_queue_drain + 1726
    frame #19: 0x000000010e408790 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 31
    frame #20: 0x00007ff800387b1f CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #21: 0x00007ff800382436 CoreFoundation`__CFRunLoopRun + 2482
    frame #22: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #23: 0x00007ff809cb128a GraphicsServices`GSEventRunModal + 139
    frame #24: 0x000000011b4d6ad3 UIKitCore`-[UIApplication _run] + 994
    frame #25: 0x000000011b4db9ef UIKitCore`UIApplicationMain + 123
    frame #26: 0x000000010af111a8 demo`main(argc=1, argv=0x00007ff7b4feec30) at main.m:8:12
    frame #27: 0x000000010e06d2bf dyld_sim`start_sim + 10
    frame #28: 0x000000011429a52e dyld`start + 462
  thread #2
    frame #0: 0x00007ff83616ff48 libsystem_pthread.dylib`start_wqthread
  thread #3
    frame #0: 0x00007ff83616ff48 libsystem_pthread.dylib`start_wqthread
  thread #5, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff800c568b4 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
    frame #6: 0x00007ff800c56b2d Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 72
    frame #7: 0x000000011b5ac286 UIKitCore`-[UIEventFetcher threadMain] + 535
    frame #8: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #9: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #7, queue = 'com.apple.CFNetwork.Connection'
    frame #0: 0x00007ff80004b908 libobjc.A.dylib`objc_retain + 8
    frame #1: 0x00007ff805892c03 Network`-[NWConcrete_nw_endpoint_resolver startWithHandler:] + 131
    frame #2: 0x00007ff8058aed02 Network`nw_endpoint_handler_path_change + 5842
    frame #3: 0x00007ff8058b83f8 Network`nw_endpoint_handler_start + 1080
    frame #4: 0x00007ff805d6ed33 Network`nw_endpoint_flow_setup_protocols + 5043
    frame #5: 0x00007ff805d65f53 Network`-[NWConcrete_nw_endpoint_flow startWithHandler:] + 5219
    frame #6: 0x00007ff8058aed02 Network`nw_endpoint_handler_path_change + 5842
    frame #7: 0x00007ff8058b83f8 Network`nw_endpoint_handler_start + 1080
    frame #8: 0x00007ff80581d2b4 Network`__nw_connection_start_block_invoke + 740
    frame #9: 0x00007ff80581cc85 Network`nw_connection_start + 629
    frame #10: 0x00007ff80428cb65 CFNetwork`___lldb_unnamed_symbol5421 + 643
    frame #11: 0x00007ff804284591 CFNetwork`___lldb_unnamed_symbol5336 + 1037
    frame #12: 0x00007ff80428521b CFNetwork`___lldb_unnamed_symbol5342 + 1999
    frame #13: 0x00007ff804300b51 CFNetwork`___lldb_unnamed_symbol7311 + 965
    frame #14: 0x00007ff80427786a CFNetwork`___lldb_unnamed_symbol5170 + 3984
    frame #15: 0x00007ff8042ffd8c CFNetwork`___lldb_unnamed_symbol7309 + 326
    frame #16: 0x00007ff8043037c1 CFNetwork`___lldb_unnamed_symbol7385 + 1094
    frame #17: 0x00007ff804303a4a CFNetwork`___lldb_unnamed_symbol7387 + 21
    frame #18: 0x000000010e3f6d18 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #19: 0x000000010e3f7f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #20: 0x000000010e3ffd41 libdispatch.dylib`_dispatch_lane_serial_drain + 1064
    frame #21: 0x000000010e400b52 libdispatch.dylib`_dispatch_lane_invoke + 496
    frame #22: 0x000000010e40231c libdispatch.dylib`_dispatch_workloop_invoke + 2793
    frame #23: 0x000000010e40ef13 libdispatch.dylib`_dispatch_workloop_worker_thread + 959
    frame #24: 0x00007ff836170fd0 libsystem_pthread.dylib`_pthread_wqthread + 326
    frame #25: 0x00007ff83616ff57 libsystem_pthread.dylib`start_wqthread + 15
  thread #9
    frame #0: 0x00007ff83616ff48 libsystem_pthread.dylib`start_wqthread
  thread #10
    frame #0: 0x00007ff83611b33e libsystem_kernel.dylib`kevent + 10
    frame #1: 0x000000010b800914 demo`kq_dispatch(base=0x00007fb673a04730, tv=0x0000000000000000) at kqueue.c:315:8
    frame #2: 0x000000010b7efbf7 demo`event_base_loop(base=0x00007fb673a04730, flags=1) at event.c:1992:9
    frame #3: 0x000000010b0a2bdf demo`(anonymous namespace)::EventBaseBackend::eb_event_base_loop(this=0x00006000021700e0, flags=1) at EventBase.cpp:73:10
    frame #4: 0x000000010b0991ce demo`folly::EventBase::loopBody(this=0x00007fb67480ea30, flags=0, ignoreKeepAlive=false) at EventBase.cpp:359:19
    frame #5: 0x000000010b098b07 demo`folly::EventBase::loop(this=0x00007fb67480ea30) at EventBase.cpp:283:10
    frame #6: 0x000000010b09b362 demo`folly::EventBase::loopForever(this=0x00007fb67480ea30) at EventBase.cpp:497:11
    frame #7: 0x000000010b1acad9 demo`folly::run(ebm=0x0000600001258320, eb=0x00007fb67480ea30, stop=0x00007fb67480ec58, name=0x0000600003641c28) at ScopedEventBaseThread.cpp:40:7
    frame #8: 0x000000010b1b0f8e demo`decltype(__f=0x0000600003641c08, __args=0x0000600003641c10, __args=0x0000600003641c18, __args=0x0000600003641c20, __args=0x0000600003641c28)(static_cast<folly::EventBaseManager*>(fp0), static_cast<folly::EventBase*>(fp0), static_cast<folly::Baton<true, std::__1::atomic>*>(fp0), static_cast<folly::Range<char const*>>(fp0))) std::__1::__invoke<void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >(void (*&&)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*&&, folly::EventBase*&&, folly::Baton<true, std::__1::atomic>*&&, folly::Range<char const*>&&) at type_traits:3918:1
    frame #9: 0x000000010b1b0f09 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*>, 2ul, 3ul, 4ul, 5ul>(__t=size=6, (null)=__tuple_indices<2, 3, 4, 5> @ 0x000070000e453f68)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >&, std::__1::__tuple_indices<2ul, 3ul, 4ul, 5ul>) at thread:287:5
    frame #10: 0x000000010b1b04c2 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> > >(__vp=0x0000600003641c00) at thread:298:5
    frame #11: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #12: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #11
    frame #0: 0x00007ff83611b33e libsystem_kernel.dylib`kevent + 10
    frame #1: 0x000000010b800914 demo`kq_dispatch(base=0x00007fb672708120, tv=0x0000000000000000) at kqueue.c:315:8
    frame #2: 0x000000010b7efbf7 demo`event_base_loop(base=0x00007fb672708120, flags=1) at event.c:1992:9
    frame #3: 0x000000010b0a2bdf demo`(anonymous namespace)::EventBaseBackend::eb_event_base_loop(this=0x00006000021541d0, flags=1) at EventBase.cpp:73:10
    frame #4: 0x000000010b0991ce demo`folly::EventBase::loopBody(this=0x00007fb67480ec80, flags=0, ignoreKeepAlive=false) at EventBase.cpp:359:19
    frame #5: 0x000000010b098b07 demo`folly::EventBase::loop(this=0x00007fb67480ec80) at EventBase.cpp:283:10
    frame #6: 0x000000010b09b362 demo`folly::EventBase::loopForever(this=0x00007fb67480ec80) at EventBase.cpp:497:11
    frame #7: 0x000000010b1acad9 demo`folly::run(ebm=0x0000600001258320, eb=0x00007fb67480ec80, stop=0x00007fb67480eea8, name=0x00006000036134e8) at ScopedEventBaseThread.cpp:40:7
    frame #8: 0x000000010b1b0f8e demo`decltype(__f=0x00006000036134c8, __args=0x00006000036134d0, __args=0x00006000036134d8, __args=0x00006000036134e0, __args=0x00006000036134e8)(static_cast<folly::EventBaseManager*>(fp0), static_cast<folly::EventBase*>(fp0), static_cast<folly::Baton<true, std::__1::atomic>*>(fp0), static_cast<folly::Range<char const*>>(fp0))) std::__1::__invoke<void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >(void (*&&)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*&&, folly::EventBase*&&, folly::Baton<true, std::__1::atomic>*&&, folly::Range<char const*>&&) at type_traits:3918:1
    frame #9: 0x000000010b1b0f09 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*>, 2ul, 3ul, 4ul, 5ul>(__t=size=6, (null)=__tuple_indices<2, 3, 4, 5> @ 0x000070000e4d6f68)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >&, std::__1::__tuple_indices<2ul, 3ul, 4ul, 5ul>) at thread:287:5
    frame #10: 0x000000010b1b04c2 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> > >(__vp=0x00006000036134c0) at thread:298:5
    frame #11: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #12: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #12, name = 'FutureTimekeepr'
    frame #0: 0x00007ff83611b33e libsystem_kernel.dylib`kevent + 10
    frame #1: 0x000000010b800914 demo`kq_dispatch(base=0x00007fb673b07280, tv=0x000070000e559570) at kqueue.c:315:8
    frame #2: 0x000000010b7efbf7 demo`event_base_loop(base=0x00007fb673b07280, flags=1) at event.c:1992:9
    frame #3: 0x000000010b0a2bdf demo`(anonymous namespace)::EventBaseBackend::eb_event_base_loop(this=0x0000600002148370, flags=1) at EventBase.cpp:73:10
    frame #4: 0x000000010b0991ce demo`folly::EventBase::loopBody(this=0x00007fb673b07050, flags=0, ignoreKeepAlive=false) at EventBase.cpp:359:19
    frame #5: 0x000000010b098b07 demo`folly::EventBase::loop(this=0x00007fb673b07050) at EventBase.cpp:283:10
    frame #6: 0x000000010b09b362 demo`folly::EventBase::loopForever(this=0x00007fb673b07050) at EventBase.cpp:497:11
    frame #7: 0x000000010b21724c demo`folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper(this=0x00006000021543f8)::$_3::operator()() const at ThreadWheelTimekeeper.cpp:33:35
    frame #8: 0x000000010b2171f5 demo`decltype(__f=0x00006000021543f8)::$_3>(fp)()) std::__1::__invoke<folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3>(folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3&&) at type_traits:3918:1
    frame #9: 0x000000010b2171c5 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3>(__t=size=2, (null)=__tuple_indices<> @ 0x000070000e559f68)::$_3>&, std::__1::__tuple_indices<>) at thread:287:5
    frame #10: 0x000000010b216a72 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3> >(__vp=0x00006000021543f0) at thread:298:5
    frame #11: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #12: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #13, name = 'com.facebook.SocketRocket.NetworkThread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff800c568b4 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
    frame #6: 0x000000010b7a2f5b demo`-[SRRunLoopThread main](self=0x000060000005a530, _cmd="main") at SRRunLoopThread.m:70:16
    frame #7: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #8: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #14, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff80440f7b4 CFNetwork`___lldb_unnamed_symbol13430 + 437
    frame #6: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #7: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #8: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #15, name = 'com.facebook.react.JavaScript'
    frame #0: 0x000000010ec02d40 hermes`___lldb_unnamed_symbol3960
    frame #1: 0x000000010eb5cfbf hermes`___lldb_unnamed_symbol2458 + 95
    frame #2: 0x000000010eb5d4ce hermes`___lldb_unnamed_symbol2461 + 14
    frame #3: 0x000000010ead4d5c hermes`___lldb_unnamed_symbol767 + 156
    frame #4: 0x000000010ead216e hermes`___lldb_unnamed_symbol697 + 14
    frame #5: 0x000000010b68987c demo`std::__1::default_delete<facebook::jsi::Runtime>::operator(this=0x00006000022fbc58, __ptr=0x0000600001248640)(facebook::jsi::Runtime*) const at unique_ptr.h:57:5
    frame #6: 0x000000010b68955a demo`std::__1::__shared_ptr_pointer<facebook::jsi::Runtime*, std::__1::default_delete<facebook::jsi::Runtime>, std::__1::allocator<facebook::jsi::Runtime> >::__on_zero_shared(this=0x00006000022fbc40) at shared_ptr.h:267:5
    frame #7: 0x000000010b680f61 demo`std::__1::__shared_count::__release_shared(this=0x00006000022fbc40) at shared_ptr.h:177:9
    frame #8: 0x000000010b680f09 demo`std::__1::__shared_weak_count::__release_shared(this=0x00006000022fbc40) at shared_ptr.h:219:27
    frame #9: 0x000000010b68140c demo`std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr(this=0x0000600000756138) at shared_ptr.h:959:19
    frame #10: 0x000000010b67ee75 demo`std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr(this=0x0000600000756138) at shared_ptr.h:957:1
    frame #11: 0x000000010b68c158 demo`facebook::react::(anonymous namespace)::DecoratedRuntime::~DecoratedRuntime(this=0x0000600000756118) at HermesExecutorFactory.cpp:173:3
    frame #12: 0x000000010b682585 demo`facebook::react::(anonymous namespace)::DecoratedRuntime::~DecoratedRuntime(this=0x0000600000756118) at HermesExecutorFactory.cpp:167:23
    frame #13: 0x000000010b681d4d demo`std::__1::__shared_ptr_emplace<facebook::react::(anonymous namespace)::DecoratedRuntime, std::__1::allocator<facebook::react::(anonymous namespace)::DecoratedRuntime> >::__on_zero_shared(this=0x0000600000756100) at shared_ptr.h:315:24
    frame #14: 0x000000010b680f61 demo`std::__1::__shared_count::__release_shared(this=0x0000600000756100) at shared_ptr.h:177:9
    frame #15: 0x000000010b680f09 demo`std::__1::__shared_weak_count::__release_shared(this=0x0000600000756100) at shared_ptr.h:219:27
    frame #16: 0x000000010b68140c demo`std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr(this=0x00007fb6927082e8) at shared_ptr.h:959:19
    frame #17: 0x000000010b67ee75 demo`std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr(this=0x00007fb6927082e8) at shared_ptr.h:957:1
    frame #18: 0x000000010b67ef6c demo`facebook::react::JSIExecutor::~JSIExecutor(this=0x00007fb6927082e0) at JSIExecutor.h:71:7
    frame #19: 0x000000010b68dc47 demo`facebook::react::HermesExecutor::~HermesExecutor(this=0x00007fb6927082e0) at HermesExecutorFactory.h:49:7
    frame #20: 0x000000010b67f025 demo`facebook::react::HermesExecutor::~HermesExecutor(this=0x00007fb6927082e0) at HermesExecutorFactory.h:49:7
    frame #21: 0x000000010b67f049 demo`facebook::react::HermesExecutor::~HermesExecutor(this=0x00007fb6927082e0) at HermesExecutorFactory.h:49:7
    frame #22: 0x000000010b5e3b3c demo`std::__1::default_delete<facebook::react::JSExecutor>::operator(this=0x000060000075a860, __ptr=0x00007fb6927082e0)(facebook::react::JSExecutor*) const at unique_ptr.h:57:5
    frame #23: 0x000000010b5e3abc demo`std::__1::unique_ptr<facebook::react::JSExecutor, std::__1::default_delete<facebook::react::JSExecutor> >::reset(this=0x000060000075a860, __p=0x0000000000000000) at unique_ptr.h:318:7
    frame #24: 0x000000010b5f3121 demo`std::__1::unique_ptr<facebook::react::JSExecutor, std::__1::default_delete<facebook::react::JSExecutor> >::operator=(this=0x000060000075a860, (null)=0x0000000000000000) at unique_ptr.h:276:5
    frame #25: 0x000000010b5f30f0 demo`facebook::react::NativeToJsBridge::destroy(this=0x00006000000fd158)::$_7::operator()() const at NativeToJsBridge.cpp:288:16
    frame #26: 0x000000010b5f3085 demo`decltype(__f=0x00006000000fd158)::$_7&>(fp)()) std::__1::__invoke<facebook::react::NativeToJsBridge::destroy()::$_7&>(facebook::react::NativeToJsBridge::destroy()::$_7&) at type_traits:3918:1
    frame #27: 0x000000010b5f303d demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::NativeToJsBridge::destroy(__args=0x00006000000fd158)::$_7&>(facebook::react::NativeToJsBridge::destroy()::$_7&) at invoke.h:61:9
    frame #28: 0x000000010b5f300d demo`std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::destroy()::$_7, std::__1::allocator<facebook::react::NativeToJsBridge::destroy()::$_7>, void ()>::operator(this=0x00006000000fd158)() at function.h:178:16
    frame #29: 0x000000010b5f1d59 demo`std::__1::__function::__func<facebook::react::NativeToJsBridge::destroy()::$_7, std::__1::allocator<facebook::react::NativeToJsBridge::destroy()::$_7>, void ()>::operator(this=0x00006000000fd150)() at function.h:352:12
    frame #30: 0x000000010b3d79f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x00006000000fd150)() const at function.h:505:16
    frame #31: 0x000000010b3d79b5 demo`std::__1::function<void ()>::operator(this= Lambda in File NativeToJsBridge.cpp at Line 285)() const at function.h:1182:12
    frame #32: 0x000000010b3ef3f5 demo`facebook::react::tryAndReturnError(func= Lambda in File NativeToJsBridge.cpp at Line 285)> const&) at RCTCxxUtils.mm:74:7
    frame #33: 0x000000010b41bf61 demo`facebook::react::RCTMessageThread::tryFunc(this=0x00006000000398c8, func= Lambda in File NativeToJsBridge.cpp at Line 285)> const&) at RCTMessageThread.mm:69:20
    frame #34: 0x000000010b422de6 demo`facebook::react::RCTMessageThread::runOnQueueSync(this=0x00006000000fd140)>&&)::$_2::operator()() const at RCTMessageThread.mm:94:19
    frame #35: 0x000000010b422d85 demo`decltype(__f=0x00006000000fd140)>&&)::$_2&>(fp)()) std::__1::__invoke<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&>(facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&) at type_traits:3918:1
    frame #36: 0x000000010b422d3d demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::RCTMessageThread::runOnQueueSync(__args=0x00006000000fd140)>&&)::$_2&>(facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&) at invoke.h:61:9
    frame #37: 0x000000010b422d0d demo`std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2>, void ()>::operator(this=0x00006000000fd140)() at function.h:178:16
    frame #38: 0x000000010b421a79 demo`std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2>, void ()>::operator(this=0x00006000000fd130)() at function.h:352:12
    frame #39: 0x000000010b3d79f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x000070000e761660)() const at function.h:505:16
    frame #40: 0x000000010b3d79b5 demo`std::__1::function<void ()>::operator(this= Lambda in File RCTMessageThread.mm at Line 92)() const at function.h:1182:12
    frame #41: 0x000000010b41bd88 demo`facebook::react::RCTMessageThread::runSync(this=0x00006000000398c8, func= Lambda in File RCTMessageThread.mm at Line 92)>) at RCTMessageThread.mm:55:5
    frame #42: 0x000000010b41c256 demo`facebook::react::RCTMessageThread::runOnQueueSync(this=0x00006000000398c8, func= Lambda in File NativeToJsBridge.cpp at Line 285)>&&) at RCTMessageThread.mm:92:3
    frame #43: 0x000000010b5e111f demo`facebook::react::NativeToJsBridge::destroy(this=0x000060000075a838) at NativeToJsBridge.cpp:285:33
    frame #44: 0x000000010b5b226f demo`facebook::react::Instance::~Instance(this=0x0000600001670780) at Instance.cpp:38:24
    frame #45: 0x000000010b5b23a5 demo`facebook::react::Instance::~Instance(this=0x0000600001670780) at Instance.cpp:36:23
    frame #46: 0x000000010b3d617b demo`std::__1::default_delete<facebook::react::Instance>::operator(this=0x00006000022fccb8, __ptr=0x0000600001670780)(facebook::react::Instance*) const at unique_ptr.h:57:5
    frame #47: 0x000000010b3d5e8a demo`std::__1::__shared_ptr_pointer<facebook::react::Instance*, std::__1::shared_ptr<facebook::react::Instance>::__shared_ptr_default_delete<facebook::react::Instance, facebook::react::Instance>, std::__1::allocator<facebook::react::Instance> >::__on_zero_shared(this=0x00006000022fcca0) at shared_ptr.h:267:5
    frame #48: 0x000000010b3d30e1 demo`std::__1::__shared_count::__release_shared(this=0x00006000022fcca0) at shared_ptr.h:177:9
    frame #49: 0x000000010b3d3089 demo`std::__1::__shared_weak_count::__release_shared(this=0x00006000022fcca0) at shared_ptr.h:219:27
    frame #50: 0x000000010b3d58dc demo`std::__1::shared_ptr<facebook::react::Instance>::~shared_ptr(this=0x000070000e761888) at shared_ptr.h:959:19
    frame #51: 0x000000010b3bded5 demo`std::__1::shared_ptr<facebook::react::Instance>::~shared_ptr(this=0x000070000e761888) at shared_ptr.h:957:1
    frame #52: 0x000000010b3c8c13 demo`std::__1::shared_ptr<facebook::react::Instance>::reset(this=0x00007fb672704aa0) at shared_ptr.h:1054:5
    frame #53: 0x000000010b3c9fa2 demo`__26-[RCTCxxBridge invalidate]_block_invoke(.block_descriptor=0x0000600002deb6c0) at RCTCxxBridge.mm:1303:26
    frame #54: 0x000000010b3d5839 demo`decltype(__f=0x0000000000000000) block_pointer __strong&>(fp)()) std::__1::__invoke<void () block_pointer __strong&>(&&, decltype(static_cast<void () block_pointer __strong&>(fp)())&&...) at type_traits:3918:1
    frame #55: 0x000000010b3d57ed demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<void (__args=0x0000000000000000) block_pointer __strong&>(void () block_pointer __strong&) at invoke.h:61:9
    frame #56: 0x000000010b3d57bd demo`std::__1::__function::__alloc_func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator(this=0x000070000e761cd8)() at function.h:178:16
    frame #57: 0x000000010b3d4409 demo`std::__1::__function::__func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator(this=0x000070000e761cd0)() at function.h:352:12
    frame #58: 0x000000010b3d79f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x000070000e761cd0)() const at function.h:505:16
    frame #59: 0x000000010b3d79b5 demo`std::__1::function<void ()>::operator(this=0x000070000e761cd0)() const at function.h:1182:12
    frame #60: 0x000000010b3ef3f5 demo`facebook::react::tryAndReturnError(func=0x000070000e761cd0)> const&) at RCTCxxUtils.mm:74:7
    frame #61: 0x000000010b3bdc48 demo`-[RCTCxxBridge _tryAndHandleError:](self=0x00007fb6727049a0, _cmd="_tryAndHandleError:", block=0x000000010b3c9710) at RCTCxxBridge.mm:345:20
    frame #62: 0x00007ff800c8054f Foundation`__NSThreadPerformPerform + 177
    frame #63: 0x00007ff800387fe5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #64: 0x00007ff800387f24 CoreFoundation`__CFRunLoopDoSource0 + 157
    frame #65: 0x00007ff800387721 CoreFoundation`__CFRunLoopDoSources0 + 212
    frame #66: 0x00007ff800381e23 CoreFoundation`__CFRunLoopRun + 927
    frame #67: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #68: 0x000000010b3bda45 demo`+[RCTCxxBridge runRunLoop](self=RCTCxxBridge, _cmd="runRunLoop") at RCTCxxBridge.mm:336:12
    frame #69: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #70: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #71: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #16, name = 'hades'
    frame #0: 0x00007ff8361193da libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff836174a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x00007ff800290be2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x000000010ec0882b hermes`___lldb_unnamed_symbol4065 + 587
    frame #4: 0x000000010ec085aa hermes`___lldb_unnamed_symbol4064 + 42
    frame #5: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #19, name = 'com.apple.CFStream.LegacyThread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff8003ab8a0 CoreFoundation`_legacyStreamRunLoop_workThread + 249
    frame #6: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #20, name = 'com.squareup.SocketRocket.NetworkThread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff800c568b4 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
    frame #6: 0x000000010b47e5c2 demo`-[_RCTSRRunLoopThread main](self=0x0000600000068a50, _cmd="main") at RCTSRWebSocket.m:1729:12
    frame #7: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #8: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #21, name = 'com.apple.CFSocket.private'
    frame #0: 0x00007ff83611ed4a libsystem_kernel.dylib`__select + 10
    frame #1: 0x00007ff80039ccb6 CoreFoundation`__CFSocketManager + 647
    frame #2: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #3: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #22, name = 'com.facebook.react.JavaScript'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x000000010b3bda45 demo`+[RCTCxxBridge runRunLoop](self=RCTCxxBridge, _cmd="runRunLoop") at RCTCxxBridge.mm:336:12
    frame #6: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #7: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #8: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #23, name = 'hades'
    frame #0: 0x00007ff8361193da libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff836174a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x00007ff800290be2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x000000010ec0882b hermes`___lldb_unnamed_symbol4065 + 587
    frame #4: 0x000000010ec085aa hermes`___lldb_unnamed_symbol4064 + 42
    frame #5: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #24, name = 'hermes-chrome-inspector-conn'
    frame #0: 0x00007ff8361193da libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff836174a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x00007ff800290be2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x000000010b71e131 demo`void std::__1::condition_variable::wait<facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1>(this=0x00006000016c9c38, __lk=0x000070000e247d20, __pred=(unnamed class) @ 0x000070000e247cc8)::$_1) at __mutex_base:404:9
    frame #4: 0x000000010b71df35 demo`facebook::hermes::inspector::detail::SerialExecutor::runLoop(this=0x00006000016c9bc0) at SerialExecutor.cpp:41:15
    frame #5: 0x000000010b71fd88 demo`facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(this=0x000070000e247f08)::$_0::operator()() const at SerialExecutor.cpp:16:48
    frame #6: 0x000000010b71fd55 demo`decltype(__f=0x000070000e247f08)::$_0&>(fp)()) std::__1::__invoke<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at type_traits:3918:1
    frame #7: 0x000000010b71fd0d demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(__args=0x000070000e247f08)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at invoke.h:61:9
    frame #8: 0x000000010b71fcdd demo`std::__1::__function::__alloc_func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x000070000e247f08)() at function.h:178:16
    frame #9: 0x000000010b71e909 demo`std::__1::__function::__func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x000070000e247f00)() at function.h:352:12
    frame #10: 0x000000010b3d79f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x000070000e247f00)() const at function.h:505:16
    frame #11: 0x000000010b3d79b5 demo`std::__1::function<void ()>::operator(this=0x000070000e247f00)() const at function.h:1182:12
    frame #12: 0x000000010b618122 demo`facebook::hermes::inspector::detail::Thread::run(name=<unavailable>, runnable=function<void ()> @ 0x000070000e247f00)>) at Thread.h:73:5
    frame #13: 0x000000010b618f82 demo`decltype(__f=0x00006000007b39c8, __args="", __args=0x00006000007b39f0)(static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >>(fp0), static_cast<std::__1::function<void ()>>(fp0))) std::__1::__invoke<void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >(void (*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::function<void ()>&&) at type_traits:3918:1
    frame #14: 0x000000010b618ef7 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>, 2ul, 3ul>(__t=size=4, (null)=__tuple_indices<2, 3> @ 0x000070000e247f68)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >&, std::__1::__tuple_indices<2ul, 3ul>) at thread:287:5
    frame #15: 0x000000010b618642 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> > >(__vp=0x00006000007b39c0) at thread:298:5
    frame #16: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #17: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #25, name = 'hermes-inspector'
    frame #0: 0x00007ff8361193da libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff836174a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x00007ff800290be2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x000000010b71e131 demo`void std::__1::condition_variable::wait<facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1>(this=0x00006000016ca238, __lk=0x000070000e34dd20, __pred=(unnamed class) @ 0x000070000e34dcc8)::$_1) at __mutex_base:404:9
    frame #4: 0x000000010b71df35 demo`facebook::hermes::inspector::detail::SerialExecutor::runLoop(this=0x00006000016ca1c0) at SerialExecutor.cpp:41:15
    frame #5: 0x000000010b71fd88 demo`facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(this=0x000070000e34df08)::$_0::operator()() const at SerialExecutor.cpp:16:48
    frame #6: 0x000000010b71fd55 demo`decltype(__f=0x000070000e34df08)::$_0&>(fp)()) std::__1::__invoke<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at type_traits:3918:1
    frame #7: 0x000000010b71fd0d demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(__args=0x000070000e34df08)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at invoke.h:61:9
    frame #8: 0x000000010b71fcdd demo`std::__1::__function::__alloc_func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x000070000e34df08)() at function.h:178:16
    frame #9: 0x000000010b71e909 demo`std::__1::__function::__func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x000070000e34df00)() at function.h:352:12
    frame #10: 0x000000010b3d79f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x000070000e34df00)() const at function.h:505:16
    frame #11: 0x000000010b3d79b5 demo`std::__1::function<void ()>::operator(this=0x000070000e34df00)() const at function.h:1182:12
    frame #12: 0x000000010b618122 demo`facebook::hermes::inspector::detail::Thread::run(name=<unavailable>, runnable=function<void ()> @ 0x000070000e34df00)>) at Thread.h:73:5
    frame #13: 0x000000010b618f82 demo`decltype(__f=0x00006000007b3a88, __args="", __args=0x00006000007b3ab0)(static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >>(fp0), static_cast<std::__1::function<void ()>>(fp0))) std::__1::__invoke<void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >(void (*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::function<void ()>&&) at type_traits:3918:1
    frame #14: 0x000000010b618ef7 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>, 2ul, 3ul>(__t=size=4, (null)=__tuple_indices<2, 3> @ 0x000070000e34df68)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >&, std::__1::__tuple_indices<2ul, 3ul>) at thread:287:5
    frame #15: 0x000000010b618642 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> > >(__vp=0x00006000007b3a80) at thread:298:5
    frame #16: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #17: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
(lldb) 

@tmikov
Copy link
Contributor

tmikov commented May 25, 2023

There is something fishy going on between thread 1 and thread 15. Seems like thread 15 is destroying the runtime while thread 1 is trying to use it? That would certainly cause serious problems. Do you have an idea what is happening in thread 15?

Note that Hermes doesn't manage threads, event queues, etc, so this is almost certainly not a Hermes JSI problem, but perhaps we can help you narrow down the problem better.

@iwater
Copy link
Author

iwater commented May 25, 2023

this is the data that occurs when the crash occurs at startup, the previous one is the data that occurs when the reload is crashed

(lldb) bt all
  thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x0000000110f128b4 UIKitCore`+[_UISceneLifecycleMultiplexer sharedInstance]
    frame #1: 0x0000000110f228d1 UIKitCore`__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 142
    frame #2: 0x0000000111458947 UIKitCore`+[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 833
    frame #3: 0x00000001115a62a3 UIKitCore`_UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 257
    frame #4: 0x0000000110f22575 UIKitCore`-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 348
    frame #5: 0x0000000110d055ae UIKitCore`__64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.594 + 815
    frame #6: 0x0000000110d03fc4 UIKitCore`-[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 245
    frame #7: 0x0000000110d0515b UIKitCore`-[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 255
    frame #8: 0x000000011148b7be UIKitCore`-[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 475
    frame #9: 0x00007ff80549e4b4 FrontBoardServices`-[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 521
    frame #10: 0x00007ff8054ce691 FrontBoardServices`__94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 133
    frame #11: 0x00007ff8054abb8a FrontBoardServices`-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
    frame #12: 0x00007ff8054ce5d9 FrontBoardServices`__94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 372
    frame #13: 0x000000010c0a3f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #14: 0x000000010c0a78d2 libdispatch.dylib`_dispatch_block_invoke_direct + 496
    frame #15: 0x00007ff8054f2bb8 FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    frame #16: 0x00007ff8054f2aae FrontBoardServices`-[FBSSerialQueue _targetQueue_performNextIfPossible] + 174
    frame #17: 0x00007ff8054f2be0 FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 19
    frame #18: 0x00007ff800387fe5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #19: 0x00007ff800387f24 CoreFoundation`__CFRunLoopDoSource0 + 157
    frame #20: 0x00007ff800387721 CoreFoundation`__CFRunLoopDoSources0 + 212
    frame #21: 0x00007ff800381e23 CoreFoundation`__CFRunLoopRun + 927
    frame #22: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #23: 0x00007ff809cb128a GraphicsServices`GSEventRunModal + 139
    frame #24: 0x0000000111ae3ad3 UIKitCore`-[UIApplication _run] + 994
    frame #25: 0x0000000111ae89ef UIKitCore`UIApplicationMain + 123
    frame #26: 0x0000000108bbd1a8 demo`main(argc=1, argv=0x00007ff7b7342c30) at main.m:8:12
    frame #27: 0x000000010bd192bf dyld_sim`start_sim + 10
    frame #28: 0x000000011462452e dyld`start + 462
  thread #2, queue = 'RPAC issue generation queue'
    frame #0: 0x000000010bd4c151 dyld_sim`dyld3::MachOLoaded::findClosestSymbol(unsigned long long, char const**, unsigned long long*) const + 521
    frame #1: 0x000000010bd3d4bb dyld_sim`dyld4::APIs::dladdr(void const*, dl_info*) + 223
    frame #2: 0x00007ff8000b77e8 libsystem_c.dylib`backtrace_symbols + 104
    frame #3: 0x000000010bc331e7 libRPAC.dylib`__generateCulledBacktrace_block_invoke_2 + 107
    frame #4: 0x000000010c0a2d18 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #5: 0x000000010c0a3f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #6: 0x000000010c0abd41 libdispatch.dylib`_dispatch_lane_serial_drain + 1064
    frame #7: 0x000000010c0acb1b libdispatch.dylib`_dispatch_lane_invoke + 441
    frame #8: 0x000000010c0baf13 libdispatch.dylib`_dispatch_workloop_worker_thread + 959
    frame #9: 0x00007ff836170fd0 libsystem_pthread.dylib`_pthread_wqthread + 326
    frame #10: 0x00007ff83616ff57 libsystem_pthread.dylib`start_wqthread + 15
  thread #3
    frame #0: 0x00007ff83616ff48 libsystem_pthread.dylib`start_wqthread
  thread #4, queue = 'com.apple.NSURLSession-delegate'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff8003ada7c CoreFoundation`boundPairRead + 292
    frame #6: 0x00007ff8003a956b CoreFoundation`CFReadStreamRead + 227
    frame #7: 0x00000001090e4428 demo`-[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:](self=0x00006000032da500, _cmd="readAllPartsWithCompletionCallback:progressCallback:", callback=0x00000001090e3080, progressCallback=0x00000001090b8b20) at RCTMultipartStreamReader.m:135:29
    frame #8: 0x00000001090e2f80 demo`-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:](self=0x0000600002665cc0, _cmd="URLSession:streamTask:didBecomeInputStream:outputStream:", session=0x00007fe9fe70bf10, streamTask=0x00007fe9de828000, inputStream=0x00006000001107e0, outputStream=0x0000600000110a20) at RCTMultipartDataTask.m:119:20
    frame #9: 0x00007ff8041f0cea CFNetwork`___lldb_unnamed_symbol2807 + 42
    frame #10: 0x000000010c0a2d18 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #11: 0x000000010c0a3f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #12: 0x000000010c0abd41 libdispatch.dylib`_dispatch_lane_serial_drain + 1064
    frame #13: 0x000000010c0acb52 libdispatch.dylib`_dispatch_lane_invoke + 496
    frame #14: 0x000000010c0baf13 libdispatch.dylib`_dispatch_workloop_worker_thread + 959
    frame #15: 0x00007ff836170fd0 libsystem_pthread.dylib`_pthread_wqthread + 326
    frame #16: 0x00007ff83616ff57 libsystem_pthread.dylib`start_wqthread + 15
  thread #5, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff800c568b4 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
    frame #6: 0x00007ff800c56b2d Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 72
    frame #7: 0x0000000111bb9286 UIKitCore`-[UIEventFetcher threadMain] + 535
    frame #8: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #9: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #6
    frame #0: 0x00007ff83616ff48 libsystem_pthread.dylib`start_wqthread
  thread #7, queue = 'com.apple.network.connection-4'
    frame #0: 0x00007ff836119dba libsystem_kernel.dylib`__select_nocancel + 10
    frame #1: 0x00007ff811db4483 libsystem_dnssd.dylib`deliver_request + 1348
    frame #2: 0x00007ff811db5b7c libsystem_dnssd.dylib`DNSServiceGetAddrInfoInternal + 457
    frame #3: 0x00007ff8055efbfb Network`nw_resolver_create_dns_service_locked + 587
    frame #4: 0x00007ff8055ee845 Network`__nw_resolver_set_update_handler_block_invoke + 2245
    frame #5: 0x00007ff805bede6d Network`nw_queue_context_async_if_needed + 77
    frame #6: 0x00007ff8055edb41 Network`nw_resolver_set_update_handler + 273
    frame #7: 0x00007ff805893361 Network`-[NWConcrete_nw_endpoint_resolver startWithHandler:] + 2017
    frame #8: 0x00007ff8058aed02 Network`nw_endpoint_handler_path_change + 5842
    frame #9: 0x00007ff8058b83f8 Network`nw_endpoint_handler_start + 1080
    frame #10: 0x00007ff805d6ed33 Network`nw_endpoint_flow_setup_protocols + 5043
    frame #11: 0x00007ff805d65f53 Network`-[NWConcrete_nw_endpoint_flow startWithHandler:] + 5219
    frame #12: 0x00007ff8058aed02 Network`nw_endpoint_handler_path_change + 5842
    frame #13: 0x00007ff8058b83f8 Network`nw_endpoint_handler_start + 1080
    frame #14: 0x00007ff80581d2b4 Network`__nw_connection_start_block_invoke + 740
    frame #15: 0x000000010c0a2d18 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #16: 0x000000010c0a3f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #17: 0x000000010c0abd41 libdispatch.dylib`_dispatch_lane_serial_drain + 1064
    frame #18: 0x000000010c0acb52 libdispatch.dylib`_dispatch_lane_invoke + 496
    frame #19: 0x000000010c0ae31c libdispatch.dylib`_dispatch_workloop_invoke + 2793
    frame #20: 0x000000010c0baf13 libdispatch.dylib`_dispatch_workloop_worker_thread + 959
    frame #21: 0x00007ff836170fd0 libsystem_pthread.dylib`_pthread_wqthread + 326
    frame #22: 0x00007ff83616ff57 libsystem_pthread.dylib`start_wqthread + 15
  thread #8, queue = 'com.facebook.react.ShadowQueue'
    frame #0: 0x0000000109466270 demo`YGLayout::YGLayout(this=0x00007fe9fe7136f0) at YGLayout.h:18
    frame #1: 0x0000000109470804 demo`YGNode::YGNode(this=0x00007fe9fe7136f0, config=0x0000600003d61a10) at YGNode.h:57:20
    frame #2: 0x00000001094658ad demo`YGNode::YGNode(this=0x00007fe9fe7136f0, config=0x0000600003d61a10) at YGNode.h:89:63
    frame #3: 0x0000000109465820 demo`::YGNodeNewWithConfig(config=0x0000600003d61a10) at Yoga.cpp:195:30
    frame #4: 0x000000010911aa80 demo`-[RCTShadowView init](self=0x00007fe9df00bb60, _cmd="init") at RCTShadowView.m:204:17
    frame #5: 0x0000000109106a1b demo`-[RCTRootShadowView init](self=0x0000000000000000, _cmd="init") at RCTRootShadowView.m:17:14
    frame #6: 0x000000010913959f demo`__33-[RCTUIManager registerRootView:]_block_invoke(.block_descriptor=0x000060000107a1c0) at RCTUIManager.m:326:37
    frame #7: 0x000000010914b11d demo`__RCTExecuteOnUIManagerQueue_block_invoke(.block_descriptor=0x0000600003dbdaa0) at RCTUIManagerUtils.m:60:7
    frame #8: 0x000000010c0a2d18 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #9: 0x000000010c0a3f5b libdispatch.dylib`_dispatch_client_callout + 8
    frame #10: 0x000000010c0abd41 libdispatch.dylib`_dispatch_lane_serial_drain + 1064
    frame #11: 0x000000010c0acb1b libdispatch.dylib`_dispatch_lane_invoke + 441
    frame #12: 0x000000010c0baf13 libdispatch.dylib`_dispatch_workloop_worker_thread + 959
    frame #13: 0x00007ff836170fd0 libsystem_pthread.dylib`_pthread_wqthread + 326
    frame #14: 0x00007ff83616ff57 libsystem_pthread.dylib`start_wqthread + 15
  thread #9
    frame #0: 0x00007ff83611b33e libsystem_kernel.dylib`kevent + 10
    frame #1: 0x00000001094ac914 demo`kq_dispatch(base=0x00007fe9df109270, tv=0x0000000000000000) at kqueue.c:315:8
    frame #2: 0x000000010949bbf7 demo`event_base_loop(base=0x00007fe9df109270, flags=1) at event.c:1992:9
    frame #3: 0x0000000108d4ebdf demo`(anonymous namespace)::EventBaseBackend::eb_event_base_loop(this=0x0000600003104210, flags=1) at EventBase.cpp:73:10
    frame #4: 0x0000000108d451ce demo`folly::EventBase::loopBody(this=0x00007fe9f8808830, flags=0, ignoreKeepAlive=false) at EventBase.cpp:359:19
    frame #5: 0x0000000108d44b07 demo`folly::EventBase::loop(this=0x00007fe9f8808830) at EventBase.cpp:283:10
    frame #6: 0x0000000108d47362 demo`folly::EventBase::loopForever(this=0x00007fe9f8808830) at EventBase.cpp:497:11
    frame #7: 0x0000000108e58ad9 demo`folly::run(ebm=0x00006000002183c0, eb=0x00007fe9f8808830, stop=0x00007fe9f8808a58, name=0x0000600002676ba8) at ScopedEventBaseThread.cpp:40:7
    frame #8: 0x0000000108e5cf8e demo`decltype(__f=0x0000600002676b88, __args=0x0000600002676b90, __args=0x0000600002676b98, __args=0x0000600002676ba0, __args=0x0000600002676ba8)(static_cast<folly::EventBaseManager*>(fp0), static_cast<folly::EventBase*>(fp0), static_cast<folly::Baton<true, std::__1::atomic>*>(fp0), static_cast<folly::Range<char const*>>(fp0))) std::__1::__invoke<void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >(void (*&&)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*&&, folly::EventBase*&&, folly::Baton<true, std::__1::atomic>*&&, folly::Range<char const*>&&) at type_traits:3918:1
    frame #9: 0x0000000108e5cf09 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*>, 2ul, 3ul, 4ul, 5ul>(__t=size=6, (null)=__tuple_indices<2, 3, 4, 5> @ 0x0000700006a0af68)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >&, std::__1::__tuple_indices<2ul, 3ul, 4ul, 5ul>) at thread:287:5
    frame #10: 0x0000000108e5c4c2 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> > >(__vp=0x0000600002676b80) at thread:298:5
    frame #11: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #12: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #10
    frame #0: 0x00007ff83611b33e libsystem_kernel.dylib`kevent + 10
    frame #1: 0x00000001094ac914 demo`kq_dispatch(base=0x00007fe9df006b80, tv=0x0000000000000000) at kqueue.c:315:8
    frame #2: 0x000000010949bbf7 demo`event_base_loop(base=0x00007fe9df006b80, flags=1) at event.c:1992:9
    frame #3: 0x0000000108d4ebdf demo`(anonymous namespace)::EventBaseBackend::eb_event_base_loop(this=0x000060000311c560, flags=1) at EventBase.cpp:73:10
    frame #4: 0x0000000108d451ce demo`folly::EventBase::loopBody(this=0x00007fe9f8808a80, flags=0, ignoreKeepAlive=false) at EventBase.cpp:359:19
    frame #5: 0x0000000108d44b07 demo`folly::EventBase::loop(this=0x00007fe9f8808a80) at EventBase.cpp:283:10
    frame #6: 0x0000000108d47362 demo`folly::EventBase::loopForever(this=0x00007fe9f8808a80) at EventBase.cpp:497:11
    frame #7: 0x0000000108e58ad9 demo`folly::run(ebm=0x00006000002183c0, eb=0x00007fe9f8808a80, stop=0x00007fe9f8808ca8, name=0x000060000264f028) at ScopedEventBaseThread.cpp:40:7
    frame #8: 0x0000000108e5cf8e demo`decltype(__f=0x000060000264f008, __args=0x000060000264f010, __args=0x000060000264f018, __args=0x000060000264f020, __args=0x000060000264f028)(static_cast<folly::EventBaseManager*>(fp0), static_cast<folly::EventBase*>(fp0), static_cast<folly::Baton<true, std::__1::atomic>*>(fp0), static_cast<folly::Range<char const*>>(fp0))) std::__1::__invoke<void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >(void (*&&)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*&&, folly::EventBase*&&, folly::Baton<true, std::__1::atomic>*&&, folly::Range<char const*>&&) at type_traits:3918:1
    frame #9: 0x0000000108e5cf09 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*>, 2ul, 3ul, 4ul, 5ul>(__t=size=6, (null)=__tuple_indices<2, 3, 4, 5> @ 0x0000700006a8df68)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> >&, std::__1::__tuple_indices<2ul, 3ul, 4ul, 5ul>) at thread:287:5
    frame #10: 0x0000000108e5c4c2 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> const&), folly::EventBaseManager*, folly::EventBase*, folly::Baton<true, std::__1::atomic>*, folly::Range<char const*> > >(__vp=0x000060000264f000) at thread:298:5
    frame #11: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #12: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #11, name = 'FutureTimekeepr'
    frame #0: 0x00007ff83611b33e libsystem_kernel.dylib`kevent + 10
    frame #1: 0x00000001094ac914 demo`kq_dispatch(base=0x00007fe9fe708a80, tv=0x0000700006b10570) at kqueue.c:315:8
    frame #2: 0x000000010949bbf7 demo`event_base_loop(base=0x00007fe9fe708a80, flags=1) at event.c:1992:9
    frame #3: 0x0000000108d4ebdf demo`(anonymous namespace)::EventBaseBackend::eb_event_base_loop(this=0x0000600003110540, flags=1) at EventBase.cpp:73:10
    frame #4: 0x0000000108d451ce demo`folly::EventBase::loopBody(this=0x00007fe9fe7079b0, flags=0, ignoreKeepAlive=false) at EventBase.cpp:359:19
    frame #5: 0x0000000108d44b07 demo`folly::EventBase::loop(this=0x00007fe9fe7079b0) at EventBase.cpp:283:10
    frame #6: 0x0000000108d47362 demo`folly::EventBase::loopForever(this=0x00007fe9fe7079b0) at EventBase.cpp:497:11
    frame #7: 0x0000000108ec324c demo`folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper(this=0x0000600003110578)::$_3::operator()() const at ThreadWheelTimekeeper.cpp:33:35
    frame #8: 0x0000000108ec31f5 demo`decltype(__f=0x0000600003110578)::$_3>(fp)()) std::__1::__invoke<folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3>(folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3&&) at type_traits:3918:1
    frame #9: 0x0000000108ec31c5 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3>(__t=size=2, (null)=__tuple_indices<> @ 0x0000700006b10f68)::$_3>&, std::__1::__tuple_indices<>) at thread:287:5
    frame #10: 0x0000000108ec2a72 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper()::$_3> >(__vp=0x0000600003110570) at thread:298:5
    frame #11: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #12: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #12, name = 'com.facebook.SocketRocket.NetworkThread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff800c568b4 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
    frame #6: 0x000000010944ef5b demo`-[SRRunLoopThread main](self=0x0000600001054ff0, _cmd="main") at SRRunLoopThread.m:70:16
    frame #7: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #8: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #13, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff80440f7b4 CFNetwork`___lldb_unnamed_symbol13430 + 437
    frame #6: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #7: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #8: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
* thread #14, name = 'com.facebook.react.JavaScript', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x0000000109338352 demo`facebook::react::(anonymous namespace)::ReentrancyCheck::before(this=0x00006000017049a8) at HermesExecutorFactory.cpp:115:7
    frame #1: 0x0000000109338205 demo`facebook::jsi::detail::BeforeCaller<facebook::react::(anonymous namespace)::ReentrancyCheck, void>::before(t=0x00006000017049a8)::ReentrancyCheck&) at decorator.h:458:7
    frame #2: 0x00000001093381e3 demo`facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(this=0x0000700006d18908, with=0x00006000017049a8)::ReentrancyCheck&) at decorator.h:787:7
    frame #3: 0x000000010933818d demo`facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(this=0x0000700006d18908, with=0x00006000017049a8)::ReentrancyCheck&) at decorator.h:786:38
    frame #4: 0x000000010932ffc8 demo`facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::createFunctionFromHostFunction(this=0x0000600001704978, name=0x0000700006d18a78, paramCount=1, func= Lambda in File react-native-quick-base64.cpp at Line 52)>) at decorator.h:737:12
    frame #5: 0x00000001094b8923 demo`facebook::jsi::Function::createFromHostFunction(runtime=0x0000600001704978, name=0x0000700006d18a78, paramCount=1, func= Lambda in File react-native-quick-base64.cpp at Line 52)>) at jsi-inl.h:251:18
    frame #6: 0x00000001094b2014 demo`installBase64(jsiRuntime=0x0000600001704978) at react-native-quick-base64.cpp:48:30
    frame #7: 0x00000001094b1b3c demo`__25-[QuickBase64 setBridge:]_block_invoke(.block_descriptor=0x0000600003d34bd0) at QuickBase64.mm:28:5
    frame #8: 0x0000000109081839 demo`decltype(__f=0x0000600002667780) block_pointer __strong&>(fp)()) std::__1::__invoke<void () block_pointer __strong&>(&&, decltype(static_cast<void () block_pointer __strong&>(fp)())&&...) at type_traits:3918:1
    frame #9: 0x00000001090817ed demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<void (__args=0x0000600002667780) block_pointer __strong&>(void () block_pointer __strong&) at invoke.h:61:9
    frame #10: 0x00000001090817bd demo`std::__1::__function::__alloc_func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator(this=0x0000700006d18cd8)() at function.h:178:16
    frame #11: 0x0000000109080409 demo`std::__1::__function::__func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator(this=0x0000700006d18cd0)() at function.h:352:12
    frame #12: 0x00000001090839f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x0000700006d18cd0)() const at function.h:505:16
    frame #13: 0x00000001090839b5 demo`std::__1::function<void ()>::operator(this=0x0000700006d18cd0)() const at function.h:1182:12
    frame #14: 0x000000010909b3f5 demo`facebook::react::tryAndReturnError(func=0x0000700006d18cd0)> const&) at RCTCxxUtils.mm:74:7
    frame #15: 0x0000000109069c48 demo`-[RCTCxxBridge _tryAndHandleError:](self=0x00007fe9fe705900, _cmd="_tryAndHandleError:", block=0x00000001094b1b10) at RCTCxxBridge.mm:345:20
    frame #16: 0x00007ff800c8054f Foundation`__NSThreadPerformPerform + 177
    frame #17: 0x00007ff800387fe5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #18: 0x00007ff800387f24 CoreFoundation`__CFRunLoopDoSource0 + 157
    frame #19: 0x00007ff800387721 CoreFoundation`__CFRunLoopDoSources0 + 212
    frame #20: 0x00007ff800381e23 CoreFoundation`__CFRunLoopRun + 927
    frame #21: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #22: 0x0000000109069a45 demo`+[RCTCxxBridge runRunLoop](self=RCTCxxBridge, _cmd="runRunLoop") at RCTCxxBridge.mm:336:12
    frame #23: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #24: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #25: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #15, name = 'hades'
    frame #0: 0x00007ff8361193da libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff836174a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x00007ff800290be2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x000000010c8b482b hermes`___lldb_unnamed_symbol4065 + 587
    frame #4: 0x000000010c8b45aa hermes`___lldb_unnamed_symbol4064 + 42
    frame #5: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #16, name = 'hermes-chrome-inspector-conn'
    frame #0: 0x00007ff8361193da libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff836174a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x00007ff800290be2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001093ca131 demo`void std::__1::condition_variable::wait<facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1>(this=0x0000600000610c78, __lk=0x0000700006e1fd20, __pred=(unnamed class) @ 0x0000700006e1fcc8)::$_1) at __mutex_base:404:9
    frame #4: 0x00000001093c9f35 demo`facebook::hermes::inspector::detail::SerialExecutor::runLoop(this=0x0000600000610c00) at SerialExecutor.cpp:41:15
    frame #5: 0x00000001093cbd88 demo`facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(this=0x0000700006e1ff08)::$_0::operator()() const at SerialExecutor.cpp:16:48
    frame #6: 0x00000001093cbd55 demo`decltype(__f=0x0000700006e1ff08)::$_0&>(fp)()) std::__1::__invoke<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at type_traits:3918:1
    frame #7: 0x00000001093cbd0d demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(__args=0x0000700006e1ff08)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at invoke.h:61:9
    frame #8: 0x00000001093cbcdd demo`std::__1::__function::__alloc_func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x0000700006e1ff08)() at function.h:178:16
    frame #9: 0x00000001093ca909 demo`std::__1::__function::__func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x0000700006e1ff00)() at function.h:352:12
    frame #10: 0x00000001090839f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x0000700006e1ff00)() const at function.h:505:16
    frame #11: 0x00000001090839b5 demo`std::__1::function<void ()>::operator(this=0x0000700006e1ff00)() const at function.h:1182:12
    frame #12: 0x00000001092c4122 demo`facebook::hermes::inspector::detail::Thread::run(name=<unavailable>, runnable=function<void ()> @ 0x0000700006e1ff00)>) at Thread.h:73:5
    frame #13: 0x00000001092c4f82 demo`decltype(__f=0x00006000017048a8, __args="", __args=0x00006000017048d0)(static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >>(fp0), static_cast<std::__1::function<void ()>>(fp0))) std::__1::__invoke<void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >(void (*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::function<void ()>&&) at type_traits:3918:1
    frame #14: 0x00000001092c4ef7 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>, 2ul, 3ul>(__t=size=4, (null)=__tuple_indices<2, 3> @ 0x0000700006e1ff68)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >&, std::__1::__tuple_indices<2ul, 3ul>) at thread:287:5
    frame #15: 0x00000001092c4642 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> > >(__vp=0x00006000017048a0) at thread:298:5
    frame #16: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #17: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #17, name = 'hermes-inspector'
    frame #0: 0x00007ff8361193da libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff836174a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x00007ff800290be2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001093ca131 demo`void std::__1::condition_variable::wait<facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1>(this=0x0000600000614af8, __lk=0x0000700006ea2d20, __pred=(unnamed class) @ 0x0000700006ea2cc8)::$_1) at __mutex_base:404:9
    frame #4: 0x00000001093c9f35 demo`facebook::hermes::inspector::detail::SerialExecutor::runLoop(this=0x0000600000614a80) at SerialExecutor.cpp:41:15
    frame #5: 0x00000001093cbd88 demo`facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(this=0x0000700006ea2f08)::$_0::operator()() const at SerialExecutor.cpp:16:48
    frame #6: 0x00000001093cbd55 demo`decltype(__f=0x0000700006ea2f08)::$_0&>(fp)()) std::__1::__invoke<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at type_traits:3918:1
    frame #7: 0x00000001093cbd0d demo`void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(__args=0x0000700006ea2f08)::$_0&>(facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&) at invoke.h:61:9
    frame #8: 0x00000001093cbcdd demo`std::__1::__function::__alloc_func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x0000700006ea2f08)() at function.h:178:16
    frame #9: 0x00000001093ca909 demo`std::__1::__function::__func<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0, std::__1::allocator<facebook::hermes::inspector::detail::SerialExecutor::SerialExecutor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>, void ()>::operator(this=0x0000700006ea2f00)() at function.h:352:12
    frame #10: 0x00000001090839f2 demo`std::__1::__function::__value_func<void ()>::operator(this=0x0000700006ea2f00)() const at function.h:505:16
    frame #11: 0x00000001090839b5 demo`std::__1::function<void ()>::operator(this=0x0000700006ea2f00)() const at function.h:1182:12
    frame #12: 0x00000001092c4122 demo`facebook::hermes::inspector::detail::Thread::run(name=<unavailable>, runnable=function<void ()> @ 0x0000700006ea2f00)>) at Thread.h:73:5
    frame #13: 0x00000001092c4f82 demo`decltype(__f=0x00006000017176c8, __args="", __args=0x00006000017176f0)(static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >>(fp0), static_cast<std::__1::function<void ()>>(fp0))) std::__1::__invoke<void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >(void (*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::function<void ()>&&) at type_traits:3918:1
    frame #14: 0x00000001092c4ef7 demo`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>, 2ul, 3ul>(__t=size=4, (null)=__tuple_indices<2, 3> @ 0x0000700006ea2f68)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >&, std::__1::__tuple_indices<2ul, 3ul>) at thread:287:5
    frame #15: 0x00000001092c4642 demo`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> > >(__vp=0x00006000017176c0) at thread:298:5
    frame #16: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #17: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #18, name = 'com.squareup.SocketRocket.NetworkThread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff800c568b4 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
    frame #6: 0x000000010912a5c2 demo`-[_RCTSRRunLoopThread main](self=0x000060000107a620, _cmd="main") at RCTSRWebSocket.m:1729:12
    frame #7: 0x00007ff800c8011b Foundation`__NSThread__start__ + 1009
    frame #8: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
  thread #19, name = 'com.apple.CFStream.LegacyThread'
    frame #0: 0x00007ff83611696a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff836116cd8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff80038788e CoreFoundation`__CFRunLoopServiceMachPort + 145
    frame #3: 0x00007ff800381fdf CoreFoundation`__CFRunLoopRun + 1371
    frame #4: 0x00007ff8003816a7 CoreFoundation`CFRunLoopRunSpecific + 560
    frame #5: 0x00007ff8003ab8a0 CoreFoundation`_legacyStreamRunLoop_workThread + 249
    frame #6: 0x00007ff8361744e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x00007ff83616ff6b libsystem_pthread.dylib`thread_start + 15
(lldb) 

@iwater
Copy link
Author

iwater commented May 25, 2023

As I explained at the beginning, this code is a completely new project, just adding two jsi modules, and the js part is only the template code generated by default by react-native init. The first time I observed this problem was when I found a crash when using react-native-code-push restart method. I've only recently had time to troubleshoot module by module, and have reduced it to simply initializing a new project and adding two jsi modules, cmd+r => crash

@tmikov
Copy link
Contributor

tmikov commented May 25, 2023

@iwater the Hermes team does not own or maintain any of the modules you listed or the RN framework. The symptoms of the crash (crashing randomly), and the the stack traces you provided, clearly indicate that this is a threading problem caused by accessing Hermes from multiple threads, which Hermes does not control.

Hermes is fundamentally single threaded, and it is the responsibility of the caller to ensure that the threading requirements are met.

We can't debug these 3rd partly modules for you. I see that you have filed an issue with the author of these modules, and I hope that they can be of help.

As any software, Hermes and React Native have bugs, but in order to be able to help you constructively, you need to pinpoint the problem, when it is caused by 3rd party code.

@iwater
Copy link
Author

iwater commented May 25, 2023

Thanks, I understand what you mean, and based on your explanation, I know that hermes is non-thread safe and the current problem looks like it is caused by a threading issue. What I mean is that since neither module uses threads and crashes occur in the startup or loading phase, I thought the problem would be caused by a problem with the implementation of this part of the react-native loading jsi module, and react-native and hermes are closely related, so I submitted the issues here, I understand It's not your job to debug third-party modules, so I'd like to ask if there is an official standard implementation of the jsi template (forgive me, but this part is really confusing on documents, I haven't found an official recommended template implementation, and react-native is always being updated), and if there is an official recommended template implementation, I can use the latest official sample jsi template code to generate a minimal jsi module and continue testing to troubleshoot where the problem lies

@tmikov
Copy link
Contributor

tmikov commented May 26, 2023

@iwater I really sympathize with your problem (that's why I reopened the issue). Unfortunately the expertise of the Hermes team doesn't extend to the area you need help with, we are all very narrowly focused on the compiler and the VM. The folks at React Native should be much better qualified to help. I know that there is a similar issue there (facebook/react-native#35720), though I am not sure what the resolution there is.

I will leave this issue open a little longer with the hopes that someone from RN might chime in.

@javache
Copy link
Member

javache commented May 26, 2023

I had a quick look at these packages, and react-native-quick-md5 is unsafely accessing the JS thread from the main thread. I'd recommend reaching out to the author of that package to correct it (especially since react-native-quick-base64 is doing this more correctly).

@tmikov
Copy link
Contributor

tmikov commented May 26, 2023

Thank you @javache! Much appreciated. That's what I am talking about!

Closing the issue now.

@tmikov tmikov closed this as completed May 26, 2023
@iwater
Copy link
Author

iwater commented May 26, 2023

Thank you @javache @tmikov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Awating additional info before proceeding
Projects
None yet
Development

No branches or pull requests

3 participants