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

[darwin_framework_tool] Add a shortcut (CTL('^')) to restart the stac… #22268

Conversation

vivien-apple
Copy link
Contributor

@vivien-apple vivien-apple commented Aug 30, 2022

…k while in interactive mode

Problem

I'm trying to reproduce some crashes that happens on darwin. Some crashes seems related to the stack trying to shutting down.

With the current patch and the following steps I can reproduce 2 crashes:

# Shell 1
$ ./out/debug/standalone/chip-all-clusters-app --KVS /tmp/chip_allclusters_kvs

# Shell 2
$ ./out/debug/standalone/darwin-framework-tool interactive start
# In the interactive mode window, do a full commissioning
pairing code 0x12344321 MT:-24J042C00KA0648G00
# Wait for the pairing to succeed

# Shell 1
# Ctrl^C the all-clusters-app
$ rm -rf /tmp/chip_allclusters_kvs
$ ./out/debug/standalone/chip-all-clusters-app --KVS /tmp/chip_allclusters_kvs

# Shell 2
# In the interactive mode window, do a full commissioning
pairing code 0x12344321 MT:-24J042C00KA0648G00
# At the "right time" do a Ctrl + ^. For a definition of right time see below

The "right time" is hard to get since operations are going very fast locally.

To make it easier to get some crashes, one can drop some sleep at the right place on the server side.
For example sleep(5) at the beginning of emberAfGeneralCommissioningClusterArmFailSafeCallback should allow to reproduce #21811.
But adding sleep(5) at the beginning of emberAfGeneralCommissioningClusterCommissioningCompleteCallback should get you a different stack. Pretty similar to #21130 but not coming from a timer firing.
For reference the stack is:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x17f0000c4)
  * frame #0: 0x0000000104b81e84 Matter`chip::Controller::DeviceCommissioner::CommissioningStageComplete(this=0x0000623000001d00, err=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 224), report=CommissioningReport @ 0x00007ffeefbfd608) at CHIPDeviceController.cpp:1551:58
    frame #1: 0x0000000104b85802 Matter`chip::Controller::OnBasicFailure(context=0x0000623000001d00, error=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 224)) at CHIPDeviceController.cpp:1448:19
    frame #2: 0x0000000104088271 Matter`chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(this=0x000060f00001ab18, aError=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 224))(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)::operator()(chip::ChipError) const at CHIPCluster.h:83:70
    frame #3: 0x0000000104088203 Matter`decltype(__f=0x000060f00001ab18, __args=0x00007ffeefbfd800)(std::__1::forward<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&>(fp0)...)) std::__1::__invoke<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&, chip::ChipError>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type&&, chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&...) at type_traits:3747:1
    frame #4: 0x0000000104088172 Matter`void std::__1::__invoke_void_return_wrapper<void>::__call<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(__args=0x000060f00001ab18, __args=0x00007ffeefbfd800)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&, chip::ChipError>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type&&...) at __functional_base:348:9
    frame #5: 0x0000000104088132 Matter`std::__1::__function::__alloc_func<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError), std::__1::allocator<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)>, void (chip::ChipError)>::operator(this=0x000060f00001ab18, __arg=0x00007ffeefbfd800)(chip::ChipError&&) at functional:1553:16
    frame #6: 0x0000000104086e93 Matter`std::__1::__function::__func<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError), std::__1::allocator<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)>, void (chip::ChipError)>::operator(this=0x000060f00001ab10, __arg=0x00007ffeefbfd800)(chip::ChipError&&) at functional:1727:12
    frame #7: 0x000000010343dded Matter`std::__1::__function::__value_func<void (chip::ChipError)>::operator(this=0x000060f00001ab10, __args=0x00007ffeefbfd800)(chip::ChipError&&) const at functional:1880:16
    frame #8: 0x000000010343227c Matter`std::__1::function<void (chip::ChipError)>::operator(this=0x000060f00001ab10, __arg=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 224))(chip::ChipError) const at functional:2555:12
    frame #9: 0x0000000104082d23 Matter`chip::Controller::TypedCommandCallback<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType>::OnError(this=0x000060f00001aad0, apCommandSender=0x00006130000264c0, aError=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 224)) at TypedCommandCallback.h:72:9
    frame #10: 0x0000000104b21f41 Matter`chip::app::CommandSender::OnResponseTimeout(this=0x00006130000264c0, apExchangeContext=0x000060c000032500) at CommandSender.cpp:224:21
    frame #11: 0x000000010344f085 Matter`chip::Messaging::ExchangeHolder::OnResponseTimeout(this=0x00006130000264c8, ec=0x000060c000032500) at ExchangeHolder.h:122:87
    frame #12: 0x0000000104c32c19 Matter`chip::Messaging::ExchangeContext::NotifyResponseTimeout(this=0x000060c000032500, aCloseIfNeeded=false) at ExchangeContext.cpp:481:19
    frame #13: 0x0000000104c32a71 Matter`chip::Messaging::ExchangeContext::OnSessionReleased(this=0x000060c000032500) at ExchangeContext.cpp:408:9
    frame #14: 0x0000000104b93010 Matter`chip::SessionHolderWithDelegate::SessionReleased(this=0x000060c000032540) at SessionHolder.h:98:19
    frame #15: 0x0000000104c65559 Matter`chip::Transport::Session::NotifySessionReleased(this=0x00006110001de100) at Session.h:124:31
    frame #16: 0x0000000104c5889c Matter`chip::Transport::SecureSession::MarkForEviction(this=0x00006110001de100) at SecureSession.cpp:149:9
    frame #17: 0x0000000104c65bf4 Matter`auto chip::SessionManager::ExpireAllSessionsForFabric(this=0x00007ffeefbfda98, session=0x00006110001de100)::$_2::operator()<chip::Transport::SecureSession*>(chip::Transport::SecureSession*) const at SessionManager.cpp:370:22
    frame #18: 0x0000000104c65b53 Matter`chip::internal::LambdaProxy<chip::Transport::SecureSession, chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>::Call(context=0x00007ffeefbfda98, target=0x00006110001de100) at Pool.h:126:16
    frame #19: 0x0000000104c2d217 Matter`chip::internal::HeapObjectList::ForEachNode(this=0x00006110001ad078, context=0x00007ffeefbfda98, lambda=(Matter`chip::internal::LambdaProxy<chip::Transport::SecureSession, chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>::Call(void*, void*) at Pool.h:125))(void*, void*)) at Pool.cpp:126:17
    frame #20: 0x0000000104c65add Matter`chip::Loop chip::HeapObjectPool<chip::Transport::SecureSession>::ForEachActiveObject<chip::SessionManager::ExpireAllSessionsForFabric(this=0x00006110001ad068, function=0x00007ffeefbfdaf8)::$_2>(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2&&) at Pool.h:401:25
    frame #21: 0x0000000104c5fda3 Matter`chip::Loop chip::Transport::SecureSessionTable::ForEachSession<chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>(this=0x00006110001ad060, function=0x00007ffeefbfdaf8)::$_2&&) at SecureSessionTable.h:84:25
    frame #22: 0x0000000104c5fd63 Matter`chip::SessionManager::ExpireAllSessionsForFabric(this=0x00006110001ad000, fabricIndex='\x01') at SessionManager.cpp:367:21
    frame #23: 0x0000000104b7e34d Matter`chip::Controller::DeviceController::Shutdown(this=0x0000623000001d00) at CHIPDeviceController.cpp:304:37
    frame #24: 0x0000000104b7fdaa Matter`chip::Controller::DeviceCommissioner::Shutdown(this=0x0000623000001d00) at CHIPDeviceController.cpp:495:23
    frame #25: 0x0000000103557030 Matter`-[MTRDeviceController shutDownCppController](self=0x000061b000000780, _cmd="shutDownCppController") at MTRDeviceController.mm:133:27
    frame #26: 0x000000010338956c Matter`-[MTRControllerFactory(self=0x000060b000084a90, _cmd="controllerShuttingDown:", controller=0x000061b000000780) controllerShuttingDown:] at MTRControllerFactory.mm:554:9
    frame #27: 0x0000000103556fdc Matter`-[MTRDeviceController cleanupAfterStartup](self=0x000061b000000780, _cmd="cleanupAfterStartup") at MTRDeviceController.mm:124:5
    frame #28: 0x0000000103556fa8 Matter`-[MTRDeviceController shutdown](self=0x000061b000000780, _cmd="shutdown") at MTRDeviceController.mm:118:5
    frame #29: 0x00000001000e01b2 darwin-framework-tool`CHIPCommandBridge::RestartCommissioners(this=0x00007ffeefbfe080) at CHIPCommandBridge.mm:142:9
    frame #30: 0x0000000101d81103 darwin-framework-tool`(anonymous namespace)::RestartCommand::RunCommand(this=0x00007ffeefbfe080) at InteractiveCommands.mm:43:9
    frame #31: 0x0000000101d80f0c darwin-framework-tool`RestartFunction() at InteractiveCommands.mm:84:9
    frame #32: 0x0000000101de5d44 darwin-framework-tool`emacs(c=30) at editline.c:1118:13
    frame #33: 0x0000000101de3c86 darwin-framework-tool`editinput(complete=1) at editline.c:1201:21
    frame #34: 0x0000000101de3e71 darwin-framework-tool`readline(prompt=">>> ") at editline.c:1580:22
    frame #35: 0x0000000101d80d24 darwin-framework-tool`GetCommand(command=0x0000000000000000) at InteractiveCommands.mm:70:15
    frame #36: 0x0000000101d81282 darwin-framework-tool`InteractiveStartCommand::RunCommand(this=0x0000611000001300) at InteractiveCommands.mm:100:19
    frame #37: 0x00000001000dc428 darwin-framework-tool`CHIPCommandBridge::Run(this=0x0000611000001300) at CHIPCommandBridge.mm:43:5
    frame #38: 0x000000010009a5fd darwin-framework-tool`Commands::RunCommand(this=0x00007ffeefbff640, argc=3, argv=0x00007ffeefbff768, interactive=false) at Commands.cpp:147:65
    frame #39: 0x0000000100098c55 darwin-framework-tool`Commands::Run(this=0x00007ffeefbff640, argc=3, argv=0x00007ffeefbff768) at Commands.cpp:51:11
    frame #40: 0x0000000100221f57 darwin-framework-tool`main(argc=3, argv=0x00007ffeefbff768) at main.mm:41:21

Change overview

  • Add a new option in interactive mode for the darwin-framework-tool in order to restart the stack. Using a shortcut to make it fast.

Testing

Aș explained in the description I have used this setup to reproduce some crashes.
I am pretty sure that those are not related to darwin, one may implement a similar mechanism for chip-tool.

I would like to land that in master as I believed it does not affect the core SDK but only provide another way of reproducing some SDK behaviour via a tool.

@vivien-apple
Copy link
Contributor Author

I suspect that #22245 should have fixed the second crash (the one with the stack trace) but I have not tried yet.

@vivien-apple
Copy link
Contributor Author

| I suspect that #22245 should have fixed the second crash (the one with the stack trace) but I have not tried yet.

Seems like there is still a crash, but happening a little bit later now:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1308000e2)
    frame #0: 0x000000010537f2b4 Matter`chip::Controller::AutoCommissioner::GetCommandTimeout(this=0x0000623000002eb0, device=0x000061d000041080, stage=kCleanup) const at AutoCommissioner.cpp:374:34
   371 	
   372 	    // Adjust the timeout for our session transport latency, if we have access
   373 	    // to a session.
-> 374 	    auto sessionHandle = device->GetSecureSession();
   375 	    if (sessionHandle.HasValue())
   376 	    {
   377 	        timeout = sessionHandle.Value()->ComputeRoundTripTimeout(timeout);
Target 0: (darwin-framework-tool) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1308000e2)
  * frame #0: 0x000000010537f2b4 Matter`chip::Controller::AutoCommissioner::GetCommandTimeout(this=0x0000623000002eb0, device=0x000061d000041080, stage=kCleanup) const at AutoCommissioner.cpp:374:34
    frame #1: 0x000000010538145c Matter`chip::Controller::AutoCommissioner::PerformStep(this=0x0000623000002eb0, nextStage=kCleanup) at AutoCommissioner.cpp:564:45
    frame #2: 0x000000010538043e Matter`chip::Controller::AutoCommissioner::CommissioningStepFinished(this=0x0000623000002eb0, err=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 248), report=CommissioningReport @ 0x00007ffeefbfd490) at AutoCommissioner.cpp:541:12
    frame #3: 0x0000000105387caa Matter`chip::Controller::DeviceCommissioner::CommissioningStageComplete(this=0x0000623000001d00, err=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 248), report=CommissioningReport @ 0x00007ffeefbfd578) at CHIPDeviceController.cpp:1598:53
    frame #4: 0x000000010538b51e Matter`chip::Controller::OnBasicFailure(context=0x0000623000001d00, error=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 248)) at CHIPDeviceController.cpp:1471:19
    frame #5: 0x00000001043d82b1 Matter`chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(this=0x000060f0000116f8, aError=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 248))(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)::operator()(chip::ChipError) const at CHIPCluster.h:83:70
    frame #6: 0x00000001043d8243 Matter`decltype(__f=0x000060f0000116f8, __args=0x00007ffeefbfd780)(std::__1::forward<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&>(fp0)...)) std::__1::__invoke<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&, chip::ChipError>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type&&, chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&...) at type_traits:3747:1
    frame #7: 0x00000001043d81b2 Matter`void std::__1::__invoke_void_return_wrapper<void>::__call<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(__args=0x000060f0000116f8, __args=0x00007ffeefbfd780)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)&, chip::ChipError>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type&&...) at __functional_base:348:9
    frame #8: 0x00000001043d8172 Matter`std::__1::__function::__alloc_func<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError), std::__1::allocator<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)>, void (chip::ChipError)>::operator(this=0x000060f0000116f8, __arg=0x00007ffeefbfd780)(chip::ChipError&&) at functional:1553:16
    frame #9: 0x00000001043d6ed3 Matter`std::__1::__function::__func<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError), std::__1::allocator<chip::ChipError chip::Controller::ClusterBase::InvokeCommand<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type>(chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type const&, void*, void (*)(void*, chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType const&), void (*)(void*, chip::ChipError), chip::Optional<unsigned short> const&)::'lambda'(chip::ChipError)>, void (chip::ChipError)>::operator(this=0x000060f0000116f0, __arg=0x00007ffeefbfd780)(chip::ChipError&&) at functional:1727:12
    frame #10: 0x000000010364f6cd Matter`std::__1::__function::__value_func<void (chip::ChipError)>::operator(this=0x000060f0000116f0, __args=0x00007ffeefbfd780)(chip::ChipError&&) const at functional:1880:16
    frame #11: 0x0000000103642a5c Matter`std::__1::function<void (chip::ChipError)>::operator(this=0x000060f0000116f0, __arg=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 248))(chip::ChipError) const at functional:2555:12
    frame #12: 0x00000001043d2d63 Matter`chip::Controller::TypedCommandCallback<chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType>::OnError(this=0x000060f0000116b0, apCommandSender=0x0000613000024380, aError=(mError = 50, mFile = "../../../../../../../../../../src/app/CommandSender.cpp", mLine = 248)) at TypedCommandCallback.h:72:9
    frame #13: 0x0000000105327571 Matter`chip::app::CommandSender::OnResponseTimeout(this=0x0000613000024380, apExchangeContext=0x000060c000040a80) at CommandSender.cpp:248:21
    frame #14: 0x0000000103660cd5 Matter`chip::Messaging::ExchangeHolder::OnResponseTimeout(this=0x0000613000024388, ec=0x000060c000040a80) at ExchangeHolder.h:157:87
    frame #15: 0x0000000105430829 Matter`chip::Messaging::ExchangeContext::NotifyResponseTimeout(this=0x000060c000040a80, aCloseIfNeeded=false) at ExchangeContext.cpp:499:19
    frame #16: 0x00000001054306b2 Matter`chip::Messaging::ExchangeContext::OnSessionReleased(this=0x000060c000040a80) at ExchangeContext.cpp:434:13
    frame #17: 0x0000000105398aa0 Matter`chip::SessionHolderWithDelegate::SessionReleased(this=0x000060c000040ac0) at Session.h:138:19
    frame #18: 0x0000000105466429 Matter`chip::Transport::Session::NotifySessionReleased(this=0x00006110001dc300) at Session.h:248:31
    frame #19: 0x000000010545843c Matter`chip::Transport::SecureSession::MarkForEviction(this=0x00006110001dc300) at SecureSession.cpp:149:9
    frame #20: 0x0000000105466d39 Matter`auto chip::SessionManager::ExpireAllSessionsForFabric(this=0x00007ffeefbfdaf0, session=0x00006110001dc300)::$_2::operator()<chip::Transport::SecureSession>(chip::Transport::SecureSession*) const at SessionManager.cpp:418:71
    frame #21: 0x0000000105466d0c Matter`auto void chip::SessionManager::ForEachMatchingSession<chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>(this=0x00007ffeefbfda40, session=0x00006110001dc300)::$_2&&)::'lambda'(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2*)::operator()<chip::Transport::SecureSession>(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2*) const at SessionManager.h:211:17
    frame #22: 0x0000000105466c63 Matter`chip::internal::LambdaProxy<chip::Transport::SecureSession, void chip::SessionManager::ForEachMatchingSession<chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>(unsigned char, chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2&&)::'lambda'(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2*)>::Call(context=0x00007ffeefbfda40, target=0x00006110001dc300) at Pool.h:126:16
    frame #23: 0x000000010542ae17 Matter`chip::internal::HeapObjectList::ForEachNode(this=0x000061100019a978, context=0x00007ffeefbfda40, lambda=(Matter`chip::internal::LambdaProxy<chip::Transport::SecureSession, void chip::SessionManager::ForEachMatchingSession<chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>(unsigned char, chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2&&)::'lambda'(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2*)>::Call(void*, void*) at Pool.h:125))(void*, void*)) at Pool.cpp:126:17
    frame #24: 0x0000000105466bed Matter`chip::Loop chip::HeapObjectPool<chip::Transport::SecureSession>::ForEachActiveObject<void chip::SessionManager::ForEachMatchingSession<chip::SessionManager::ExpireAllSessionsForFabric(this=0x000061100019a968, function=0x00007ffeefbfdaa8)::$_2>(unsigned char, chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2&&)::'lambda'(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2*)>(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2&&) at Pool.h:401:25
    frame #25: 0x0000000105466b93 Matter`chip::Loop chip::Transport::SecureSessionTable::ForEachSession<void chip::SessionManager::ForEachMatchingSession<chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>(unsigned char, chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2&&)::'lambda'(chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2*)>(this=0x000061100019a960, function=0x00007ffeefbfdaa8)::$_2&&) at SecureSessionTable.h:84:25
    frame #26: 0x000000010546025a Matter`void chip::SessionManager::ForEachMatchingSession<chip::SessionManager::ExpireAllSessionsForFabric(unsigned char)::$_2>(this=0x000061100019a900, fabricIndex='\x01', function=0x00007ffeefbfdaf0)::$_2&&) at SessionManager.h:208:25
    frame #27: 0x0000000105460217 Matter`chip::SessionManager::ExpireAllSessionsForFabric(this=0x000061100019a900, fabricIndex='\x01') at SessionManager.cpp:418:5
    frame #28: 0x000000010538405d Matter`chip::Controller::DeviceController::Shutdown(this=0x0000623000001d00) at CHIPDeviceController.cpp:340:37
    frame #29: 0x000000010538589d Matter`chip::Controller::DeviceCommissioner::Shutdown(this=0x0000623000001d00) at CHIPDeviceController.cpp:506:23
    frame #30: 0x000000010376dda0 Matter`-[MTRDeviceController shutDownCppController](self=0x000061b000000780, _cmd="shutDownCppController") at MTRDeviceController.mm:143:27
    frame #31: 0x0000000103595abc Matter`-[MTRControllerFactory(self=0x000060b0000862a0, _cmd="controllerShuttingDown:", controller=0x000061b000000780) controllerShuttingDown:] at MTRControllerFactory.mm:572:9
    frame #32: 0x000000010376dd4c Matter`-[MTRDeviceController cleanupAfterStartup](self=0x000061b000000780, _cmd="cleanupAfterStartup") at MTRDeviceController.mm:134:5
    frame #33: 0x000000010376dd18 Matter`-[MTRDeviceController shutdown](self=0x000061b000000780, _cmd="shutdown") at MTRDeviceController.mm:128:5
    frame #34: 0x00000001000de5f2 darwin-framework-tool`CHIPCommandBridge::RestartCommissioners(this=0x00007ffeefbfe080) at CHIPCommandBridge.mm:142:9
    frame #35: 0x0000000101eed683 darwin-framework-tool`(anonymous namespace)::RestartCommand::RunCommand(this=0x00007ffeefbfe080) at InteractiveCommands.mm:43:9
    frame #36: 0x0000000101eed48f darwin-framework-tool`RestartFunction() at InteractiveCommands.mm:84:9
    frame #37: 0x0000000101f5bb14 darwin-framework-tool`emacs(c=30) at editline.c:1118:13
    frame #38: 0x0000000101f59a56 darwin-framework-tool`editinput(complete=1) at editline.c:1201:21
    frame #39: 0x0000000101f59c41 darwin-framework-tool`readline(prompt=">>> ") at editline.c:1580:22
    frame #40: 0x0000000101eed2b4 darwin-framework-tool`GetCommand(command=0x0000000000000000) at InteractiveCommands.mm:70:15
    frame #41: 0x0000000101eed802 darwin-framework-tool`InteractiveStartCommand::RunCommand(this=0x00006110000011c0) at InteractiveCommands.mm:100:19
    frame #42: 0x00000001000da868 darwin-framework-tool`CHIPCommandBridge::Run(this=0x00006110000011c0) at CHIPCommandBridge.mm:43:5
    frame #43: 0x000000010009897d darwin-framework-tool`Commands::RunCommand(this=0x00007ffeefbff640, argc=3, argv=0x00007ffeefbff768, interactive=false) at Commands.cpp:147:65
    frame #44: 0x0000000100096fd5 darwin-framework-tool`Commands::Run(this=0x00007ffeefbff640, argc=3, argv=0x00007ffeefbff768) at Commands.cpp:51:11
    frame #45: 0x0000000100223d27 darwin-framework-tool`main(argc=3, argv=0x00007ffeefbff768) at main.mm:41:21
    frame #46: 0x00007fff2034ef5d libdyld.dylib`start + 1
    frame #47: 0x00007fff2034ef5d libdyld.dylib`start + 1

@github-actions
Copy link

github-actions bot commented Aug 30, 2022

PR #22268: Size comparison from 9bde9e3 to 9a804b4

Increases (3 builds for cc13x2_26x2, telink)
platform target config section 9bde9e3 9a804b4 change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read/write) 167616 167624 8 0.0
telink light-switch-app tlsr9518adk80d (read/write) 808656 808664 8 0.0
text 571260 571262 2 0.0
lighting-app tlsr9518adk80d text 589374 589376 2 0.0
Decreases (4 builds for bl602, cc13x2_26x2, nrfconnect, psoc6)
platform target config section 9bde9e3 9a804b4 change % change
bl602 lighting-app bl602 (read/write) 1385118 1385110 -8 -0.0
.text 1051520 1051516 -4 -0.0
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 674087 674079 -8 -0.0
.text 596936 596928 -8 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 814792 814788 -4 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 26701651 26701650 -1 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, telink)
platform target config section 9bde9e3 9a804b4 change % change
bl602 lighting-app bl602 (read/write) 1385118 1385110 -8 -0.0
.bss 120274 120274 0 0.0
.data 4488 4488 0 0.0
.text 1051520 1051516 -4 -0.0
bl602+rpc (read/write) 1431006 1431006 0 0.0
.bss 127706 127706 0 0.0
.data 4600 4600 0 0.0
.text 1083532 1083532 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 673051 673051 0 0.0
(read/write) 178340 178340 0 0.0
.bss 74284 74284 0 0.0
.data 3372 3372 0 0.0
.rodata 88835 88835 0 0.0
.text 583900 583900 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 637747 637747 0 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77979 77979 0 0.0
.text 559444 559444 0 0.0
lock-ftd LP_CC2652R7 (read only) 674087 674079 -8 -0.0
(read/write) 167616 167624 8 0.0
.bss 71484 71484 0 0.0
.data 3296 3296 0 0.0
.rodata 76671 76671 0 0.0
.text 596936 596928 -8 -0.0
lock-mtd LP_CC2652R7 (read only) 657027 657027 0 0.0
(read/write) 180364 180364 0 0.0
.bss 67172 67172 0 0.0
.data 3296 3296 0 0.0
.rodata 101883 101883 0 0.0
.text 554664 554664 0 0.0
pump-app LP_CC2652R7 (read only) 684811 684811 0 0.0
(read/write) 157596 157596 0 0.0
.bss 71420 71420 0 0.0
.data 3296 3296 0 0.0
.rodata 89947 89947 0 0.0
.text 594380 594380 0 0.0
pump-controller-app LP_CC2652R7 (read only) 669311 669311 0 0.0
(read/write) 173208 173208 0 0.0
.bss 71532 71532 0 0.0
.data 3292 3292 0 0.0
.rodata 85503 85503 0 0.0
.text 583328 583328 0 0.0
shell LP_CC2652R7 (read only) 665758 665758 0 0.0
(read/write) 181152 181152 0 0.0
.bss 76604 76604 0 0.0
.data 3376 3376 0 0.0
.rodata 85782 85782 0 0.0
.text 579660 579660 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 586754 586754 0 0.0
.app_xip_area 463412 463412 0 0.0
.bss 65776 65776 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592506 592506 0 0.0
.app_xip_area 464380 464380 0 0.0
.bss 70560 70560 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 599498 599498 0 0.0
.app_xip_area 476876 476876 0 0.0
.bss 65088 65088 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1107616 1107616 0 0.0
.bss 136332 136332 0 0.0
.data 2072 2072 0 0.0
.text 969192 969192 0 0.0
BRD4161A+rpc (read/write) 971636 971636 0 0.0
.bss 150844 150844 0 0.0
.data 2252 2252 0 0.0
.text 818520 818520 0 0.0
BRD4161A+rs911x (read/write) 1001352 1001352 0 0.0
.bss 169088 169088 0 0.0
.data 2064 2064 0 0.0
.text 830180 830180 0 0.0
lock-app BRD4161A+wf200 (read/write) 1149796 1149796 0 0.0
.bss 152168 152168 0 0.0
.data 2072 2072 0 0.0
.text 995536 995536 0 0.0
window-app BRD4161A (read/write) 1098872 1098872 0 0.0
.bss 137772 137772 0 0.0
.data 2096 2096 0 0.0
.text 958984 958984 0 0.0
esp32 all-clusters-app c3devkit (read only) 1033554 1033554 0 0.0
(read/write) 1493486 1493486 0 0.0
.dram0.bss 71088 71088 0 0.0
.dram0.data 13696 13696 0 0.0
.flash.rodata 218032 218032 0 0.0
.flash.text 1033554 1033554 0 0.0
.iram0.text 65160 65160 0 0.0
m5stack (read only) 1085891 1085891 0 0.0
(read/write) 490772 490772 0 0.0
.dram0.bss 76608 76608 0 0.0
.dram0.data 34152 34152 0 0.0
.flash.rodata 247344 247344 0 0.0
.flash.text 1080507 1080507 0 0.0
.iram0.text 123939 123939 0 0.0
k32w light k32w0+release (read/write) 647356 647356 0 0.0
.bss 70424 70424 0 0.0
.data 2068 2068 0 0.0
.text 572136 572136 0 0.0
lock k32w0+release (read/write) 704352 704352 0 0.0
.bss 70864 70864 0 0.0
.data 2076 2076 0 0.0
.text 628684 628684 0 0.0
linux all-clusters-app debug (read only) 3043833 3043833 0 0.0
(read/write) 156032 156032 0 0.0
.bss 61792 61792 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 85768 85768 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1176 1176 0 0.0
.rodata 275307 275307 0 0.0
.text 2589090 2589090 0 0.0
all-clusters-minimal-app debug (read only) 2879633 2879633 0 0.0
(read/write) 147632 147632 0 0.0
.bss 61024 61024 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 78264 78264 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 275467 275467 0 0.0
.text 2427506 2427506 0 0.0
bridge-app debug+rpc (read only) 2377897 2377897 0 0.0
(read/write) 127752 127752 0 0.0
.bss 50656 50656 0 0.0
.data 3600 3600 0 0.0
.data.rel.ro 67640 67640 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 204168 204168 0 0.0
.text 2010818 2010818 0 0.0
chip-tool debug (read only) 10909393 10909393 0 0.0
(read/write) 657384 657384 0 0.0
.bss 25240 25240 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 622352 622352 0 0.0
.dynamic 608 608 0 0.0
.got 5096 5096 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 564213 564213 0 0.0
.text 8824340 8824340 0 0.0
chip-tool-ipv6only arm64 (read only) 10290068 10290068 0 0.0
(read/write) 705233 705233 0 0.0
.bss 33297 33297 0 0.0
.data 3280 3280 0 0.0
.data.rel.ro 649832 649832 0 0.0
.dynamic 560 560 0 0.0
.got 13848 13848 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 494660 494660 0 0.0
.text 8142948 8142948 0 0.0
lighting-app debug+rpc (read only) 2602825 2602825 0 0.0
(read/write) 130536 130536 0 0.0
.bss 49792 49792 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72680 72680 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 221008 221008 0 0.0
.text 2210626 2210626 0 0.0
lock-app debug (read only) 2585793 2585793 0 0.0
(read/write) 125712 125712 0 0.0
.bss 48288 48288 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69688 69688 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 238000 238000 0 0.0
.text 2180850 2180850 0 0.0
ota-provider-app debug (read only) 2363049 2363049 0 0.0
(read/write) 119144 119144 0 0.0
.bss 47808 47808 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63512 63512 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 209976 209976 0 0.0
.text 1989314 1989314 0 0.0
ota-requestor-app debug (read only) 2528377 2528377 0 0.0
(read/write) 127552 127552 0 0.0
.bss 50368 50368 0 0.0
.data 2304 2304 0 0.0
.data.rel.ro 68920 68920 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 856 856 0 0.0
.rodata 216704 216704 0 0.0
.text 2138770 2138770 0 0.0
shell debug (read only) 2612137 2612137 0 0.0
(read/write) 142184 142184 0 0.0
.bss 57704 57704 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 77376 77376 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 235410 235410 0 0.0
.text 2218018 2218018 0 0.0
thermostat-no-ble arm64 (read only) 2361844 2361844 0 0.0
(read/write) 141857 141857 0 0.0
.bss 55233 55233 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 76112 76112 0 0.0
.dynamic 560 560 0 0.0
.got 5056 5056 0 0.0
.init 24 24 0 0.0
.init_array 416 416 0 0.0
.rodata 141276 141276 0 0.0
.text 1982528 1982528 0 0.0
tv-app debug (read only) 3188841 3188841 0 0.0
(read/write) 258040 258040 0 0.0
.bss 167352 167352 0 0.0
.data 4752 4752 0 0.0
.data.rel.ro 79368 79368 0 0.0
.dynamic 608 608 0 0.0
.got 4856 4856 0 0.0
.init 27 27 0 0.0
.init_array 1080 1080 0 0.0
.rodata 259784 259784 0 0.0
.text 2739026 2739026 0 0.0
tv-casting-app debug (read only) 5509393 5509393 0 0.0
(read/write) 160536 160536 0 0.0
.bss 51352 51352 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 100304 100304 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 344945 344945 0 0.0
.text 4892546 4892546 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2454936 2454936 0 0.0
.bss 215044 215044 0 0.0
.data 5872 5872 0 0.0
.text 1417580 1417580 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180755 1180755 0 0.0
bss 143641 143641 0 0.0
rodata 143380 143380 0 0.0
text 814792 814788 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1159935 1159935 0 0.0
bss 142868 142868 0 0.0
rodata 134968 134968 0 0.0
text 803184 803184 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 842216 842216 0 0.0
(read/write) 1741812 1741812 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188464 188464 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1221363 1221363 0 0.0
.debug_aranges 111704 111704 0 0.0
.debug_frame 372868 372868 0 0.0
.debug_info 26701651 26701650 -1 -0.0
.debug_line 3655208 3655208 0 0.0
.debug_loc 3568779 3568779 0 0.0
.debug_ranges 337568 337568 0 0.0
.debug_str 3426748 3426748 0 0.0
.heap 842216 842216 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 570503 570503 0 0.0
.symtab 421456 421456 0 0.0
.text 1542296 1542296 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842952 842952 0 0.0
(read/write) 1684980 1684980 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187728 187728 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1213202 1213202 0 0.0
.debug_aranges 111176 111176 0 0.0
.debug_frame 375948 375948 0 0.0
.debug_info 26438273 26438273 0 0.0
.debug_line 3675724 3675724 0 0.0
.debug_loc 3556416 3556416 0 0.0
.debug_ranges 336184 336184 0 0.0
.debug_str 3415753 3415753 0 0.0
.heap 842952 842952 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 534977 534977 0 0.0
.symtab 408048 408048 0 0.0
.text 1486200 1486200 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 851184 851184 0 0.0
(read/write) 1602284 1602284 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 179704 179704 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1048021 1048021 0 0.0
.debug_aranges 103352 103352 0 0.0
.debug_frame 346216 346216 0 0.0
.debug_info 21900555 21900555 0 0.0
.debug_line 3246189 3246189 0 0.0
.debug_loc 3254757 3254757 0 0.0
.debug_ranges 301656 301656 0 0.0
.debug_str 3220973 3220973 0 0.0
.heap 851184 851184 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 468276 468276 0 0.0
.symtab 375136 375136 0 0.0
.text 1411736 1411736 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 846152 846152 0 0.0
(read/write) 1639956 1639956 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184720 184720 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1055456 1055456 0 0.0
.debug_aranges 104024 104024 0 0.0
.debug_frame 349044 349044 0 0.0
.debug_info 22280302 22280302 0 0.0
.debug_line 3255010 3255010 0 0.0
.debug_loc 3294625 3294625 0 0.0
.debug_ranges 305000 305000 0 0.0
.debug_str 3248394 3248394 0 0.0
.heap 846152 846152 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 474491 474491 0 0.0
.symtab 378320 378320 0 0.0
.text 1444376 1444376 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 808656 808664 8 0.0
bss 71344 71344 0 0.0
noinit 43488 43488 0 0.0
text 571260 571262 2 0.0
lighting-app tlsr9518adk80d (read/write) 830564 830564 0 0.0
bss 72200 72200 0 0.0
noinit 43488 43488 0 0.0
text 589374 589376 2 0.0

@andy31415
Copy link
Contributor

Accepted for 1.0: changes in /examples subdirectory only

@bzbarsky-apple
Copy link
Contributor

Seems like there is still a crash, but happening a little bit later now:

Fwiw, just tested using the above excellent steps to reproduce, and I can reproduce the crash and can also confirm that #22282 does not fix it.

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this pull request Aug 31, 2022
Before project-chip#21256
AutoCommissioner used the operational proxy if it existed at all.  This could
happen even if it was disconnected, as long as it had been connected at some
point in the past.

This was accidentally changed to "use the operational proxy only if it's
connected" in project-chip#21256.

This can lead to a crash, as described in
project-chip#22268 (comment),
if shutdown happens after the operational proxy is connected but before we get
a response to CommissioningComplete.  In that case, we will evict our CASE
session, which will error out the CommissioningComplete command we sent and try
to clean up, but it will select the (now dangling!) mCommissioneeDeviceProxy
instead of correctly selecting mOperationalDeviceProxy, because the
mOperationalDeviceProxy no longer has a session at that point.

The fix is to check for an "initialized" (in the sense that it has a valid peer
node id) mOperationalDeviceProxy instead of checking for a connected one.  This
matches the semantics of the check we used to have before
project-chip#21256.

Fixes project-chip#22293
@bzbarsky-apple
Copy link
Contributor

Seems like there is still a crash, but happening a little bit later now:

#22294 will fix that.

@vivien-apple vivien-apple force-pushed the DarwinFrameworkTool_ShortcutRestart branch from 9a804b4 to ac532d1 Compare August 31, 2022 07:54
@github-actions
Copy link

github-actions bot commented Aug 31, 2022

PR #22268: Size comparison from 0a36d9f to ac532d1

Increases (1 build for cc13x2_26x2)
platform target config section 0a36d9f ac532d1 change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 676131 676139 8 0.0
.text 598576 598584 8 0.0
Decreases (9 builds for bl602, cc13x2_26x2, nrfconnect, psoc6, qpg, telink)
platform target config section 0a36d9f ac532d1 change % change
bl602 lighting-app bl602 .text 1052324 1052320 -4 -0.0
cc13x2_26x2 lock-ftd LP_CC2652R7 (read/write) 165588 165580 -8 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 814840 814836 -4 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 26708632 26708631 -1 -0.0
all-clusters-minimal cy8ckit_062s2_43012 .debug_info 26445255 26445254 -1 -0.0
lock cy8ckit_062s2_43012 .debug_info 22287285 22287284 -1 -0.0
qpg lock-app qpg6105+debug (read/write) 1100064 1100056 -8 -0.0
.text 547164 547156 -8 -0.0
telink light-switch-app tlsr9518adk80d (read/write) 808728 808720 -8 -0.0
text 571326 571324 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 830628 830620 -8 -0.0
text 589438 589436 -2 -0.0
Full report (34 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 0a36d9f ac532d1 change % change
bl602 lighting-app bl602 (read/write) 1385942 1385942 0 0.0
.bss 120298 120298 0 0.0
.data 4488 4488 0 0.0
.text 1052324 1052320 -4 -0.0
bl602+rpc (read/write) 1431590 1431590 0 0.0
.bss 127730 127730 0 0.0
.data 4600 4600 0 0.0
.text 1084080 1084080 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 675087 675087 0 0.0
(read/write) 176320 176320 0 0.0
.bss 74300 74300 0 0.0
.data 3380 3380 0 0.0
.rodata 89231 89231 0 0.0
.text 585544 585544 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 639791 639791 0 0.0
(read/write) 157868 157868 0 0.0
.bss 73572 73572 0 0.0
.data 3380 3380 0 0.0
.rodata 78375 78375 0 0.0
.text 561096 561096 0 0.0
lock-ftd LP_CC2652R7 (read only) 676131 676139 8 0.0
(read/write) 165588 165580 -8 -0.0
.bss 71500 71500 0 0.0
.data 3304 3304 0 0.0
.rodata 77075 77075 0 0.0
.text 598576 598584 8 0.0
lock-mtd LP_CC2652R7 (read only) 659123 659123 0 0.0
(read/write) 178284 178284 0 0.0
.bss 67188 67188 0 0.0
.data 3304 3304 0 0.0
.rodata 102339 102339 0 0.0
.text 556304 556304 0 0.0
pump-app LP_CC2652R7 (read only) 684959 684959 0 0.0
(read/write) 157464 157464 0 0.0
.bss 71436 71436 0 0.0
.data 3296 3296 0 0.0
.rodata 89951 89951 0 0.0
.text 594524 594524 0 0.0
pump-controller-app LP_CC2652R7 (read only) 669459 669459 0 0.0
(read/write) 173076 173076 0 0.0
.bss 71548 71548 0 0.0
.data 3292 3292 0 0.0
.rodata 85507 85507 0 0.0
.text 583472 583472 0 0.0
shell LP_CC2652R7 (read only) 665898 665898 0 0.0
(read/write) 181028 181028 0 0.0
.bss 76620 76620 0 0.0
.data 3376 3376 0 0.0
.rodata 85786 85786 0 0.0
.text 579796 579796 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 586770 586770 0 0.0
.app_xip_area 463428 463428 0 0.0
.bss 65776 65776 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592522 592522 0 0.0
.app_xip_area 464396 464396 0 0.0
.bss 70560 70560 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 599554 599554 0 0.0
.app_xip_area 476932 476932 0 0.0
.bss 65088 65088 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1107840 1107840 0 0.0
.bss 136332 136332 0 0.0
.data 2072 2072 0 0.0
.text 969416 969416 0 0.0
BRD4161A+rpc (read/write) 971828 971828 0 0.0
.bss 150844 150844 0 0.0
.data 2252 2252 0 0.0
.text 818712 818712 0 0.0
BRD4161A+rs911x (read/write) 1001596 1001596 0 0.0
.bss 169168 169168 0 0.0
.data 2064 2064 0 0.0
.text 830344 830344 0 0.0
lock-app BRD4161A+wf200 (read/write) 1150008 1150008 0 0.0
.bss 152248 152248 0 0.0
.data 2072 2072 0 0.0
.text 995668 995668 0 0.0
window-app BRD4161A (read/write) 1099096 1099096 0 0.0
.bss 137772 137772 0 0.0
.data 2096 2096 0 0.0
.text 959208 959208 0 0.0
esp32 all-clusters-app c3devkit (read only) 1033722 1033722 0 0.0
(read/write) 1493526 1493526 0 0.0
.dram0.bss 71120 71120 0 0.0
.dram0.data 13696 13696 0 0.0
.flash.rodata 218040 218040 0 0.0
.flash.text 1033722 1033722 0 0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1086075 1086075 0 0.0
(read/write) 490804 490804 0 0.0
.dram0.bss 76640 76640 0 0.0
.dram0.data 34152 34152 0 0.0
.flash.rodata 247344 247344 0 0.0
.flash.text 1080691 1080691 0 0.0
.iram0.text 123939 123939 0 0.0
k32w light k32w0+release (read/write) 648092 648092 0 0.0
.bss 70712 70712 0 0.0
.data 2068 2068 0 0.0
.text 572584 572584 0 0.0
lock k32w0+release (read/write) 705096 705096 0 0.0
.bss 71160 71160 0 0.0
.data 2076 2076 0 0.0
.text 629132 629132 0 0.0
linux chip-tool-ipv6only arm64 (read only) 10291284 10291284 0 0.0
(read/write) 705233 705233 0 0.0
.bss 33297 33297 0 0.0
.data 3280 3280 0 0.0
.data.rel.ro 649832 649832 0 0.0
.dynamic 560 560 0 0.0
.got 13848 13848 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 494724 494724 0 0.0
.text 8144100 8144100 0 0.0
thermostat-no-ble arm64 (read only) 2361988 2361988 0 0.0
(read/write) 141857 141857 0 0.0
.bss 55233 55233 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 76112 76112 0 0.0
.dynamic 560 560 0 0.0
.got 5056 5056 0 0.0
.init 24 24 0 0.0
.init_array 416 416 0 0.0
.rodata 141276 141276 0 0.0
.text 1982672 1982672 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2454936 2454936 0 0.0
.bss 215044 215044 0 0.0
.data 5872 5872 0 0.0
.text 1417580 1417580 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180803 1180803 0 0.0
bss 143641 143641 0 0.0
rodata 143380 143380 0 0.0
text 814840 814836 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1159983 1159983 0 0.0
bss 142868 142868 0 0.0
rodata 134968 134968 0 0.0
text 803232 803232 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841960 841960 0 0.0
(read/write) 1742252 1742252 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188720 188720 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1221468 1221468 0 0.0
.debug_aranges 111712 111712 0 0.0
.debug_frame 372900 372900 0 0.0
.debug_info 26708632 26708631 -1 -0.0
.debug_line 3655731 3655731 0 0.0
.debug_loc 3569692 3569692 0 0.0
.debug_ranges 337616 337616 0 0.0
.debug_str 3426920 3426920 0 0.0
.heap 841960 841960 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 570576 570576 0 0.0
.symtab 421488 421488 0 0.0
.text 1542480 1542480 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842696 842696 0 0.0
(read/write) 1685420 1685420 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187984 187984 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1213307 1213307 0 0.0
.debug_aranges 111184 111184 0 0.0
.debug_frame 375980 375980 0 0.0
.debug_info 26445255 26445254 -1 -0.0
.debug_line 3676247 3676247 0 0.0
.debug_loc 3557329 3557329 0 0.0
.debug_ranges 336232 336232 0 0.0
.debug_str 3415925 3415925 0 0.0
.heap 842696 842696 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 535050 535050 0 0.0
.symtab 408080 408080 0 0.0
.text 1486384 1486384 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850928 850928 0 0.0
(read/write) 1602700 1602700 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 179960 179960 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1048126 1048126 0 0.0
.debug_aranges 103360 103360 0 0.0
.debug_frame 346248 346248 0 0.0
.debug_info 21907537 21907537 0 0.0
.debug_line 3246712 3246712 0 0.0
.debug_loc 3255672 3255672 0 0.0
.debug_ranges 301704 301704 0 0.0
.debug_str 3221145 3221145 0 0.0
.heap 850928 850928 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 468349 468349 0 0.0
.symtab 375168 375168 0 0.0
.text 1411896 1411896 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845896 845896 0 0.0
(read/write) 1640396 1640396 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184976 184976 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1055561 1055561 0 0.0
.debug_aranges 104032 104032 0 0.0
.debug_frame 349076 349076 0 0.0
.debug_info 22287285 22287284 -1 -0.0
.debug_line 3255533 3255533 0 0.0
.debug_loc 3295525 3295525 0 0.0
.debug_ranges 305048 305048 0 0.0
.debug_str 3248566 3248566 0 0.0
.heap 845896 845896 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 474564 474564 0 0.0
.symtab 378352 378352 0 0.0
.text 1444560 1444560 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1129060 1129060 0 0.0
.bss 106112 106112 0 0.0
.data 1028 1028 0 0.0
.text 576156 576156 0 0.0
lock-app qpg6105+debug (read/write) 1100064 1100056 -8 -0.0
.bss 102344 102344 0 0.0
.data 1032 1032 0 0.0
.text 547164 547156 -8 -0.0
telink light-switch-app tlsr9518adk80d (read/write) 808728 808720 -8 -0.0
bss 71344 71344 0 0.0
noinit 43488 43488 0 0.0
text 571326 571324 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 830628 830620 -8 -0.0
bss 72200 72200 0 0.0
noinit 43488 43488 0 0.0
text 589438 589436 -2 -0.0

bzbarsky-apple added a commit that referenced this pull request Aug 31, 2022
Before #21256
AutoCommissioner used the operational proxy if it existed at all.  This could
happen even if it was disconnected, as long as it had been connected at some
point in the past.

This was accidentally changed to "use the operational proxy only if it's
connected" in #21256.

This can lead to a crash, as described in
#22268 (comment),
if shutdown happens after the operational proxy is connected but before we get
a response to CommissioningComplete.  In that case, we will evict our CASE
session, which will error out the CommissioningComplete command we sent and try
to clean up, but it will select the (now dangling!) mCommissioneeDeviceProxy
instead of correctly selecting mOperationalDeviceProxy, because the
mOperationalDeviceProxy no longer has a session at that point.

The fix is to check for an "initialized" (in the sense that it has a valid peer
node id) mOperationalDeviceProxy instead of checking for a connected one.  This
matches the semantics of the check we used to have before
#21256.

Fixes #22293
@andy31415 andy31415 enabled auto-merge (squash) September 1, 2022 16:54
@andy31415 andy31415 merged commit dfcabf5 into project-chip:master Sep 1, 2022
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
Before project-chip#21256
AutoCommissioner used the operational proxy if it existed at all.  This could
happen even if it was disconnected, as long as it had been connected at some
point in the past.

This was accidentally changed to "use the operational proxy only if it's
connected" in project-chip#21256.

This can lead to a crash, as described in
project-chip#22268 (comment),
if shutdown happens after the operational proxy is connected but before we get
a response to CommissioningComplete.  In that case, we will evict our CASE
session, which will error out the CommissioningComplete command we sent and try
to clean up, but it will select the (now dangling!) mCommissioneeDeviceProxy
instead of correctly selecting mOperationalDeviceProxy, because the
mOperationalDeviceProxy no longer has a session at that point.

The fix is to check for an "initialized" (in the sense that it has a valid peer
node id) mOperationalDeviceProxy instead of checking for a connected one.  This
matches the semantics of the check we used to have before
project-chip#21256.

Fixes project-chip#22293
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants