question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] CPU usage trigger when app in background

See original GitHub issue

The app crashes after 15 seconds as it is in the background. In the active state, there is no such problem

Received (FATAL) CPU usage trigger: 
  myApp[848] (/private/var/containers/Bundle/Application/20C482CF-E70A-404A-A38B-3D159A68B5A0/myApp.app/myApp) used 9.00s of CPU over 9.57 seconds (averaging 94%), violating a CPU usage limit of 9.00s over 15 seconds.

Expected behavior

The app will continue to run in the background.

Platform information

  • React Native version: 3.0.4
  • Plugin version: 1.89.1
  • OS: iOS
  • OS version: 3.0.4

Full trace:

Date/Time:        2021-05-10 14:30:02.278 +0300
End time:         2021-05-10 14:30:12.137 +0300
OS Version:       iPhone OS 14.5.1 (Build 18E212)
Architecture:     arm64
Report Version:   32
Incident Identifier: 786BA64D-1464-4C5C-B167-7A60FF9F9589

Data Source:      Microstackshots
Shared Cache:     37970F6F-094A-3648-89BE-18C4EDCDD145 slid base address 0x188d70000, slide 0x8d70000

Command:          myApp
Path:             /private/var/containers/Bundle/Application/BC14B7C8-06F2-4C9D-8512-EE5497A7B937/myApp.app/myApp
Identifier:       com.random.myApp
Version:          1.8.0 (1)
Beta Identifier:  A73EF235-117D-4674-BC1B-6BE247F96D60
PID:              1753

Event:            cpu usage
Action taken:     Process killed
CPU:              9 seconds cpu time over 10 seconds (91% cpu average), exceeding limit of 60% cpu over 15 seconds
CPU limit:        9s
Limit duration:   15s
CPU used:         9s
CPU duration:     10s
Duration:         9.86s
Duration Sampled: 8.62s
Steps:            11

Hardware model:   iPhone10,4
Active cpus:      6


Heaviest stack for the target process:
7  ??? (libsystem_pthread.dylib + 40056) [0x1d14dfc78]
3  ??? (JavaScriptCore + 15255736) [0x192cb08b8]
3  ??? (JavaScriptCore + 15245552) [0x192cae0f0]
3  ??? (JavaScriptCore + 14896288) [0x192c58ca0]
2  ??? (JavaScriptCore + 15097868) [0x192c8a00c]
2  ??? (JavaScriptCore + 15093960) [0x192c890c8]
2  ??? (JavaScriptCore + 7693708) [0x19257a58c]
2  ??? (JavaScriptCore + 7830308) [0x19259bb24]
2  ??? (JavaScriptCore + 7828936) [0x19259b5c8]
1  ??? (JavaScriptCore + 7839764) [0x19259e014]
1  ??? (JavaScriptCore + 11703892) [0x19294d654]


Powerstats for:   myApp [1753]
UUID:             4F31993D-0C2C-3B2C-A1B7-9EB7124BF9B5
Beta Identifier:  A73EF235-117D-4674-BC1B-6BE247F96D60
App Version:      1.8.0
Build Version:    1
Path:             /private/var/containers/Bundle/Application/BC14B7C8-06F2-4C9D-8512-EE5497A7B937/myApp.app/myApp
Architecture:     arm64
Footprint:        86.66 MB
Pageins:          3 pages
Start time:       2021-05-10 14:30:02.535 +0300
End time:         2021-05-10 14:30:11.158 +0300
Num samples:      11 (100%)
Primary state:    6 samples Non-Frontmost App, Non-Suppressed, User mode, Effective Thread QoS Default, Requested Thread QoS User Interactive, Override Thread QoS Unspecified
User Activity:    0 samples Idle, 11 samples Active
Power Source:     11 samples on Battery, 0 samples on AC
7   _pthread_start + 287 (libsystem_pthread.dylib + 40056) [0x1d14dfc78]
3   WTF::wtfThreadEntryPoint + 11 (JavaScriptCore + 15255736) [0x192cb08b8]
3   WTF::Thread::entryPoint + 323 (JavaScriptCore + 15245552) [0x192cae0f0]
3   WTF::Detail::CallableWrapper<WTF::AutomaticThread::start::$_0, void>::call() + 503 (JavaScriptCore + 14896288) [0x192c58ca0]
2   WTF::ParallelHelperPool::Thread::work + 27 (JavaScriptCore + 15097868) [0x192c8a00c]
2   WTF::ParallelHelperClient::runTask>, WTF::RawPtrTraits<WTF::SharedTask<void ()> >, WTF::DefaultRefDerefTraits<WTF::SharedTask<void ()> > > const&) + 51 (JavaScriptCore + 15093960) [0x192c890c8]
2   WTF::SharedTaskFunctor<void, JSC::Heap::runBeginPhase(JSC::GCConductor)::$_19>::run() + 171 (JavaScriptCore + 7693708) [0x19257a58c]
2   JSC::SlotVisitor::drainFromShared + 79 (JavaScriptCore + 7830308) [0x19259bb24]
2   JSC::SlotVisitor::drain + 167 (JavaScriptCore + 7828936) [0x19259b5c8]
1   JSC::SlotVisitor::drain::$_3::operator()(JSC::MarkStackArray&) const + 259 (JavaScriptCore + 7839764) [0x19259e014]
1   JSC::JSObject::visitChildren + 132 (JavaScriptCore + 11703892) [0x19294d654]
1   <Requested Thread QoS User Initiated>
1   JSC::SlotVisitor::drain::$_3::operator()(JSC::MarkStackArray&) const + 243 (JavaScriptCore + 7839748) [0x19259e004]
1   JSC::JSFinalObject::visitChildren + 1319 (JavaScriptCore + 11714548) [0x19294fff4]
1   JSC::SlotVisitor::appendHiddenSlow + 108 (JavaScriptCore + 7827280) [0x19259af50]
1   <Requested Thread QoS User Initiated>
1   JSC::Heap::HeapThread::work + 31 (JavaScriptCore + 7684012) [0x192577fac]
1   JSC::Heap::runCurrentPhase + 347 (JavaScriptCore + 7662048) [0x1925729e0]
1   JSC::Heap::runEndPhase + 1379 (JavaScriptCore + 7668432) [0x1925742d0]
1   JSC::WeakBlock::reap + 280 (JavaScriptCore + 7845312) [0x19259f5c0]
1   <Requested Thread QoS User Initiated>
3   __NSThread__start__ + 847 (Foundation + 1461616) [0x18a503d70]
3   +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:266 in myApp + 1760572) [0x100b29d3c]
3   CFRunLoopRunSpecific + 571 (CoreFoundation + 603816) [0x1891576a8]
3   __CFRunLoopRun + 1731 (CoreFoundation + 606900) [0x1891582b4]
3   __CFRunLoopDoBlocks + 403 (CoreFoundation + 628596) [0x18915d774]
3   __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 19 (CoreFoundation + 632032) [0x18915e4e0]
3   ___ZN8facebook5react16RCTMessageThread8runAsyncENSt3__18functionIFvvEEE_block_invoke (RCTMessageThread.mm:44 in myApp + 2127424) [0x100b83640]
3   std::__1::function<void>::operator()() const (functional:2555) (functional:2555 in myApp + 4544268) [0x100dd170c]
3   std::__1::__function::__value_func<void>::operator()() const (functional:1880) (functional:1880 in myApp + 4544500) [0x100dd17f4]
3   std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueue>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()() (functional:1727) (functional:1727 in myApp + 2148404) [0x100b88834]
3   std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueue>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()() (functional:1553) (functional:1553 in myApp + 2153992) [0x100b89e08]
3   void std::__1::__invoke_void_return_wrapper<void>::__call<facebook::react::RCTMessageThread::runOnQueue>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) (__functional_base:348) (__functional_base:348 in myApp + 2154032) [0x100b89e30]
3   decltype>&&)::$_1&>(fp)()) std::__1::__invoke<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) (type_traits:3747) (type_traits:3747 in myApp + 2154108) [0x100b89e7c]
3   facebook::react::RCTMessageThread::runOnQueue>&&)::$_1::operator()() const (RCTMessageThread.mm:82) (RCTMessageThread.mm:82 in myApp + 2154220) [0x100b89eec]
3   facebook::react::RCTMessageThread::tryFunc> const&) (RCTMessageThread.mm:68) (RCTMessageThread.mm:68 in myApp + 2128328) [0x100b839c8]
3   facebook::react::tryAndReturnError> const&) (RCTCxxUtils.mm:74) (RCTCxxUtils.mm:74 in myApp + 1961548) [0x100b5ae4c]
3   std::__1::function<void>::operator()() const (functional:2555) (functional:2555 in myApp + 4544268) [0x100dd170c]
3   std::__1::__function::__value_func<void>::operator()() const (functional:1880) (functional:1880 in myApp + 4544500) [0x100dd17f4]
3   std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()() (functional:1727) (functional:1727 in myApp + 4047400) [0x100d58228]
3   std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::runOnExecutorQueue>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()() (functional:1553) (functional:1553 in myApp + 4053548) [0x100d59a2c]
3   void std::__1::__invoke_void_return_wrapper<void>::__call<facebook::react::NativeToJsBridge::runOnExecutorQueue>)::$_8&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&) (__functional_base:348) (__functional_base:348 in myApp + 4053588) [0x100d59a54]
3   decltype>)::$_8&>(fp)()) std::__1::__invoke<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&) (type_traits:3747) (type_traits:3747 in myApp + 4053664) [0x100d59aa0]
3   facebook::react::NativeToJsBridge::runOnExecutorQueue>)::$_8::operator()() const (NativeToJsBridge.cpp:301) (NativeToJsBridge.cpp:301 in myApp + 4053800) [0x100d59b28]
3   std::__1::function<void>::operator()(facebook::react::JSExecutor*) const (functional:2555) (functional:2555 in myApp + 4053868) [0x100d59b6c]
3   std::__1::__function::__value_func<void>::operator()(facebook::react::JSExecutor*&&) const (functional:1880) (functional:1880 in myApp + 4054008) [0x100d59bf8]
3   std::__1::__function::__func<facebook::react::NativeToJsBridge::callFunction::$_2, std::__1::allocator<facebook::react::NativeToJsBridge::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, folly::dynamic&&)::$_2>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) (functional:1727) (functional:1727 in myApp + 3994944) [0x100d4b540]
3   std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::callFunction::$_2, std::__1::allocator<facebook::react::NativeToJsBridge::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, folly::dynamic&&)::$_2>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) (functional:1553) (functional:1553 in myApp + 4000752) [0x100d4cbf0]
3   void std::__1::__invoke_void_return_wrapper<void>::__call<facebook::react::NativeToJsBridge::callFunction::$_2&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, folly::dynamic&&)::$_2&, facebook::react::JSExecutor*&&) (__functional_base:348) (__functional_base:348 in myApp + 4000828) [0x100d4cc3c]
3   decltype::$_2&>(fp)(std::__1::forward<facebook::react::JSExecutor*>(fp0))) std::__1::__invoke<facebook::react::NativeToJsBridge::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, folly::dynamic&&)::$_2&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, folly::dynamic&&)::$_2&, facebook::react::JSExecutor*&&) (type_traits:3747) (type_traits:3747 in myApp + 4000932) [0x100d4cca4]
3   facebook::react::NativeToJsBridge::callFunction::$_2::operator()(facebook::react::JSExecutor*) const (NativeToJsBridge.cpp:198) (NativeToJsBridge.cpp:198 in myApp + 4001588) [0x100d4cf34]
3   facebook::react::JSIExecutor::callFunction (JSIExecutor.cpp:229) (JSIExecutor.cpp:229 in myApp + 4219092) [0x100d820d4]
3   std::__1::function<void> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)>::operator()(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>) const (functional:2555) (functional:2555 in myApp + 4219852) [0x100d823cc]
3   std::__1::__function::__value_func<void> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)>::operator()(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>&&) const (functional:1880) (functional:1880 in myApp + 4289388) [0x100d9336c]
3   std::__1::__function::__func<void(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>), std::__1::allocator<void (*)(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)>, void (std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)>::operator()(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>&&) (functional:1727) (functional:1727 in myApp + 1591228) [0x100b007bc]
3   std::__1::__function::__alloc_func<void(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>), std::__1::allocator<void (*)(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)>, void (std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)>::operator()(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>&&) (functional:1553) (functional:1553 in myApp + 1597072) [0x100b01e90]
3   void std::__1::__invoke_void_return_wrapper<void>::__call<void(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>), std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()> >(void (*&)(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>), std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>&&) (__functional_base:348) (__functional_base:348 in myApp + 1597212) [0x100b01f1c]
3   decltype(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)>(fp)(std::__1::forward<std::__1::function<void ()> const&>(fp0), std::__1::forward<std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()> >(fp0))) std::__1::__invoke<void (*&)(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>), std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()> >(void (*&)(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>), std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>&&) (type_traits:3747) (type_traits:3747 in myApp + 1597384) [0x100b01fc8]
3   facebook::react::JSIExecutor::defaultTimeoutInvoker> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>) (JSIExecutor.h:107) (JSIExecutor.h:107 in myApp + 1584268) [0x100afec8c]
3   std::__1::function<void>::operator()() const (functional:2555) (functional:2555 in myApp + 4544268) [0x100dd170c]
3   std::__1::__function::__value_func<void>::operator()() const (functional:1880) (functional:1880 in myApp + 4544500) [0x100dd17f4]
3   std::__1::__function::__func<facebook::react::JSIExecutor::callFunction::$_5, std::__1::allocator<facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, folly::dynamic const&)::$_5>, void ()>::operator()() (functional:1727) (functional:1727 in myApp + 4292216) [0x100d93e78]
3   std::__1::__function::__alloc_func<facebook::react::JSIExecutor::callFunction::$_5, std::__1::allocator<facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, folly::dynamic const&)::$_5>, void ()>::operator()() (functional:1553) (functional:1553 in myApp + 4297212) [0x100d951fc]
3   void std::__1::__invoke_void_return_wrapper<void>::__call<facebook::react::JSIExecutor::callFunction::$_5&>(facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, folly::dynamic const&)::$_5&) (__functional_base:348) (__functional_base:348 in myApp + 4297252) [0x100d95224]
3   decltype::$_5&>(fp)()) std::__1::__invoke<facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, folly::dynamic const&)::$_5&>(facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, folly::dynamic const&)::$_5&) (type_traits:3747) (type_traits:3747 in myApp + 4297328) [0x100d95270]
3   facebook::react::JSIExecutor::callFunction::$_5::operator()() const (JSIExecutor.cpp:231) (JSIExecutor.cpp:231 in myApp + 4297516) [0x100d9532c]
3   facebook::jsi::Value facebook::jsi::Function::call<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, facebook::jsi::Value> const (jsi-inl.h:237) (jsi-inl.h:237 in myApp + 4297936) [0x100d954d0]
3   facebook::jsi::Function::call const (jsi-inl.h:229) (jsi-inl.h:229 in myApp + 4177032) [0x100d77c88]
3   facebook::jsi::Function::call const (jsi-inl.h:224) (jsi-inl.h:224 in myApp + 4177224) [0x100d77d48]
3   facebook::jsc::JSCRuntime::call (JSCRuntime.cpp:1253) (JSCRuntime.cpp:1253 in myApp + 4111772) [0x100d67d9c]
3   JSObjectCallAsFunction + 647 (JavaScriptCore + 2832284) [0x1920d779c]
3   JSC::profiledCall + 155 (JavaScriptCore + 10669820) [0x192850efc]
3   JSC::Interpreter::executeCall + 527 (JavaScriptCore + 8546048) [0x19264a700]
3   vmEntryToNative + 279 (JavaScriptCore + 2071912) [0x19201dd68]
3   JSC::boundThisNoArgsFunctionCall + 671 (JavaScriptCore + 11346016) [0x1928f6060]
3   JSC::Interpreter::executeCall + 479 (JavaScriptCore + 8546000) [0x19264a6d0]
3   vmEntryToJavaScript + 263 (JavaScriptCore + 2071480) [0x19201dbb8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 139007 (JavaScriptCore + 2211200) [0x19203fd80]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 144467 (JavaScriptCore + 2216660) [0x1920412d4]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 139007 (JavaScriptCore + 2211200) [0x19203fd80]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 139007 (JavaScriptCore + 2211200) [0x19203fd80]
3   llint_entry + 139007 (JavaScriptCore + 2211200) [0x19203fd80]
3   llint_entry + 149471 (JavaScriptCore + 2221664) [0x192042660]
3   JSC::boundThisNoArgsFunctionCall + 671 (JavaScriptCore + 11346016) [0x1928f6060]
3   JSC::Interpreter::executeCall + 479 (JavaScriptCore + 8546000) [0x19264a6d0]
3   vmEntryToJavaScript + 263 (JavaScriptCore + 2071480) [0x19201dbb8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
3   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
2   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
2   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
1   llint_entry + 138839 (JavaScriptCore + 2211032) [0x19203fcd8]
1   llint_entry + 149471 (JavaScriptCore + 2221664) [0x192042660]
1   JSC::dateNow + 48 (JavaScriptCore + 10980688) [0x19289cd50]
1   llint_entry + 15476 (JavaScriptCore + 2087668) [0x192021af4]
1   llint_entry + 22836 (JavaScriptCore + 2095028) [0x1920237b4]
1   rtc::PlatformThread::StartThread (platform_thread.cc:67) (platform_thread.cc:67 in WebRTC + 445532) [0x102684c5c]
1   webrtc::ProcessThreadImpl::Run (process_thread_impl.cc:198) (process_thread_impl.cc:198 in WebRTC + 1218872) [0x102741938]
1   webrtc::ProcessThreadImpl::Process (process_thread_impl.cc:230) (process_thread_impl.cc:230 in WebRTC + 1220452) [0x102741f64]
1   rtc::TimeMillis (time_utils.cc:215) (time_utils.cc:215 in WebRTC + 444596) [0x1026848b4]
1   mach_absolute_time + 44 (libsystem_kernel.dylib + 11384) [0x1b4e4fc78]
1   <Effective Thread QoS Unspecified, Requested Thread QoS Unspecified>
2   _pthread_wqthread + 271 (libsystem_pthread.dylib + 46524) [0x1d14e15bc]
2   _dispatch_workloop_worker_thread + 691 (libdispatch.dylib + 292468) [0x188dfd674]
2   _dispatch_lane_invoke$VARIANT$armv81 + 399 (libdispatch.dylib + 253492) [0x188df3e34]
2   _dispatch_lane_serial_drain$VARIANT$armv81 + 567 (libdispatch.dylib + 250700) [0x188df334c]
2   _dispatch_client_callout + 15 (libdispatch.dylib + 397976) [0x188e17298]
2   _dispatch_call_block_and_release + 23 (libdispatch.dylib + 393904) [0x188e162b0]
1   ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke (RCTNativeModule.mm:67 in myApp + 2238136) [0x100b9e6b8]
1   facebook::react::RCTNativeModule::invoke::$_0::operator()() const (RCTNativeModule.mm:75) (RCTNativeModule.mm:75 in myApp + 2238276) [0x100b9e744]
1   facebook::react::invokeInner (RCTNativeModule.mm:114) (RCTNativeModule.mm:114 in myApp + 2239332) [0x100b9eb64]
1   -[RCTModuleMethod invokeWithBridge:module:arguments:] (RCTModuleMethod.mm:584 in myApp + 2226208) [0x100b9b820]
1   -[NSInvocation invokeWithTarget:] + 75 (CoreFoundation + 6980) [0x1890c5b44]
1   -[NSInvocation invoke] + 299 (CoreFoundation + 5600) [0x1890c55e0]
1   __invoking___ + 143 (CoreFoundation + 1178464) [0x1891e3b60]
1   -[RCTUIManager updateView:viewName:props:] (RCTUIManager.m:1032 in myApp + 2608248) [0x100bf8c78]
1   -[RCTComponentData setProps:forShadowView:] (RCTComponentData.m:368 in myApp + 1684396) [0x100b173ac]
1   -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 203 (CoreFoundation + 6676) [0x1890c5a14]
1   __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 15 (CoreFoundation + 546404) [0x189149664]
1   __43-[RCTComponentData setProps:forShadowView:]_block_invoke (RCTComponentData.m:369 in myApp + 1684632) [0x100b17498]
1   __49-[RCTComponentData propBlockForKey:isShadowView:]_block_invoke (RCTComponentData.m:337 in myApp + 1683340) [0x100b16f8c]
1   +[NSString stringWithFormat:] + 71 (Foundation + 30644) [0x18a3a67b4]
1   _CFStringCreateWithFormatAndArgumentsReturningMetadata + 159 (CoreFoundation + 781880) [0x189182e38]
1   __CFStringAppendFormatCore + 10479 (CoreFoundation + 777568) [0x189181d60]
1   CFStringAppend + 451 (CoreFoundation + 838132) [0x1891909f4]
1   __CFStringChangeSizeMultiple + 716 (CoreFoundation + 861840) [0x189196690]
1   __32-[RCTCxxBridge batchDidComplete]_block_invoke (RCTCxxBridge.mm:1379 in myApp + 1814304) [0x100b36f20]
1   -[RCTUIManager batchDidComplete] (RCTUIManager.m:1138 in myApp + 2613268) [0x100bfa014]
1   -[RCTUIManager _layoutAndMount] (RCTUIManager.m:1155 in myApp + 2613616) [0x100bfa170]
1   -[RCTUIManager uiBlockWithLayoutUpdateForRootView:] (RCTUIManager.m:529 in myApp + 2587424) [0x100bf3b20]
1   -[RCTRootShadowView layoutWithAffectedShadowViews:] (RCTRootShadowView.m:35 in myApp + 2387228) [0x100bc2d1c]
1   -[RCTShadowView layoutWithMinimumSize:maximumSize:layoutDirection:layoutContext:] (RCTShadowView.m:278 in myApp + 2464456) [0x100bd5ac8]
1   YGNodeCalculateLayout (Yoga.cpp:4310 in myApp + 4877720) [0x100e22d98]
1   YGNodeCalculateLayoutWithContext (Yoga.cpp:4208 in myApp + 4873908) [0x100e21eb4]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3559) (Yoga.cpp:3559 in myApp + 4872164) [0x100e217e4]
1   YGNodeAbsoluteLayoutChild (Yoga.cpp:1589) (Yoga.cpp:1589 in myApp + 4903628) [0x100e292cc]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3559) (Yoga.cpp:3559 in myApp + 4872164) [0x100e217e4]
1   YGNodeAbsoluteLayoutChild (Yoga.cpp:1589) (Yoga.cpp:1589 in myApp + 4903628) [0x100e292cc]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3203) (Yoga.cpp:3203 in myApp + 4866968) [0x100e20398]
1   YGLayoutNodeInternal (Yoga.cpp:3952) (Yoga.cpp:3952 in myApp + 4860400) [0x100e1e9f0]
1   YGNodelayoutImpl (Yoga.cpp:3025) (Yoga.cpp:3025 in myApp + 4865012) [0x100e1fbf4]
1   YGResolveFlexibleLength (Yoga.cpp:2428) (Yoga.cpp:2428 in myApp + 4896868) [0x100e27864]
1   YGDistributeFreeSpaceSecondPass (Yoga.cpp:2240) (Yoga.cpp:2240 in myApp + 4915360) [0x100e2c0a0]
1   YGConstrainMaxSizeForMode (Yoga.cpp:1247) (Yoga.cpp:1247 in myApp + 4899856) [0x100e28410]
1   YGNode::getMarginForAxis const (YGNode.cpp:141) (YGNode.cpp:141 in myApp + 4798488) [0x100e0f818]
1   YGNode::getTrailingMargin const (YGNode.cpp:134) (YGNode.cpp:134 in myApp + 4798332) [0x100e0f77c]
1   facebook::yoga::detail::CompactValue::ofZero (CompactValue.h:79) (CompactValue.h:79 in myApp + 4798092) [0x100e0f68c]
1   start_wqthread + 0 (libsystem_pthread.dylib + 59492) [0x1d14e4864]
1   <Kernel mode>
1   start + 3 (libdyld.dylib + 4416) [0x188e36140]
1   main (main.m:14 in myApp + 21792) [0x100981520]
1   UIApplicationMain + 163 (UIKitCore + 11749612) [0x18ba7a8ec]
1   -[UIApplication _run] + 1051 (UIKitCore + 11727728) [0x18ba75370]
1   GSEventRunModal + 159 (GraphicsServices + 13680) [0x19f807570]
1   CFRunLoopRunSpecific + 571 (CoreFoundation + 603816) [0x1891576a8]
1   __CFRunLoopRun + 1011 (CoreFoundation + 606180) [0x189157fe4]
1   __CFRunLoopDoObservers + 587 (CoreFoundation + 604744) [0x189157a48]
1   __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 31 (CoreFoundation + 627736) [0x18915d418]
1   _afterCACommitHandler + 75 (UIKitCore + 11924096) [0x18baa5280]
1   _cleanUpAfterCAFlushAndRunDeferredBlocks + 199 (UIKitCore + 11722544) [0x18ba73f30]
1   _runAfterCACommitDeferredBlocks + 635 (UIKitCore + 11791288) [0x18ba84bb8]
1   objc_release + 0 (libobjc.A.dylib + 146432) [0x19ceefc00]

Binary Images:
0x10097c000 -                ???  com.random.myApp 1.8.0 (1) <4F31993D-0C2C-3B2C-A1B7-9EB7124BF9B5>  /private/var/containers/Bundle/Application/BC14B7C8-06F2-4C9D-8512-EE5497A7B937/myApp.app/myApp
0x102618000 -                ???  ???                         <DD5B43ED-D026-38F4-80E0-8B73495E6C4D>  WebRTC
0x188db6000 -        0x188e34fff  libdispatch.dylib           <16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E>  /usr/lib/system/libdispatch.dylib
0x188e35000 -        0x188e6bfff  libdyld.dylib               <19E502BE-AFC1-3E00-AD3F-D28C0AE1287E>  /usr/lib/system/libdyld.dylib
0x1890c4000 -        0x18946ffff  CoreFoundation              <373EC2DD-3A29-3E74-B85D-BE4EE925167A>  /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x18a39f000 -        0x18a634fff  Foundation                  <43EFCCFB-D4FE-3F57-8653-DDD0CB5F2BFF>  /System/Library/Frameworks/Foundation.framework/Foundation
0x18af46000 -        0x18c26dfff  UIKitCore                   <7E4F912A-868A-3669-96D1-6D89F785509F>  /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x191e24000 -        0x192e15fff  JavaScriptCore              <1EC98662-94C8-3B60-A6B2-52D4EFAC8DB3>  /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
0x19cecc000 -        0x19cf01fff  libobjc.A.dylib             <B64F5B7A-FFB8-3802-90CF-D92F73AEE4ED>  /usr/lib/libobjc.A.dylib
0x19f804000 -        0x19f80cfff  GraphicsServices            <069A6354-4A62-3DA8-A5CD-4D4168D3D417>  /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1b4e4d000 -        0x1b4e7dfff  libsystem_kernel.dylib      <269E9333-8D3B-3CC5-8A93-AEB94FE3E32E>  /usr/lib/system/libsystem_kernel.dylib
0x1d14d6000 -        0x1d14e6fff  libsystem_pthread.dylib     <32A07BA4-7865-3AD4-9BCF-AD54DA07CF54>  /usr/lib/system/libsystem_pthread.dylib

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
vishaldahercommented, Jul 27, 2022

@saghul thanks for your help! Able to figure out issue it was due to setIntervals() used in code to update UIs which were using CPU in background.

0reactions
saghulcommented, Jul 27, 2022

WebRTC runs its operation in multiple other threads. That one there is the JS thread that runs the bridge, WebRTC doesn’t make use of it once the call is up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does iOS kill my app for high CPU usage? - Apple Developer
I am aware that high CPU usage will get my app killed in the background, but mine is getting killed in the foreground...
Read more >
iOS app CPU usage get greatly increased when put in ...
So I found that the app has ~50% CPU usage when running in foreground, but once I put it in background, the CPU...
Read more >
Xcode & Instruments: Measuring Launch time, CPU Usage ...
App Startup has a Very High CPU Usage. We're calling CommandMapper.mapAllCommands() which triggers 75 different command events to initialize ...
Read more >
App Tamer on Setapp | Smart CPU manager for your apps
CPU use by background apps can lead to slower performance, shorter battery life, prompt heating and trigger your Mac's fans. App Tamer helps...
Read more >
This Is What Happens to Your iPhone Every Time You Turn ...
Background App Refresh is turned off system-wide when Low Power Mode is enabled, so none of the important notifications will come through. When ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found