-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Crashe when scanning QR code - VerifyOrDie failure at ../../../../../../../../../../../connectedhomeip/src/lib/support/Pool.h:217: Allocated() == 0 #15760
Comments
@bzbarsky-apple here's an example of a crash occurring during shutdown. |
Looks not iOS related |
Relevant stack:
|
So presumably we have an outstanding unclosed exchange when the shutdown happens? I see nothing in I also see nothing in |
We already handled shutdown of any ongoing PASE bits. This PR adds two more things: 1) Shutting down any ongoing CASE session establishment exchanges for which we are the initiator. This is done by shutting down all the operational device proxies on our mCASESessionManager (since we own all of those anyway) and fixing operational device proxy shutdown/destruction to actually clean up the CASEClient if we're still in the middle of CASE establishment. 2) Expiring the SecureSessions for our fabric, so that any still-open operational exchanges for those sessions get closed correctly (with a timeout). This is needed because our client cluster APIs don't give us any way to cancel the operation (invoke, read, write, etc) and we need to make sure those get cleaned up when we shut down. Fixes project-chip#15760
We already handled shutdown of any ongoing PASE bits. This PR adds two more things: 1) Shutting down any ongoing CASE session establishment exchanges for which we are the initiator. This is done by shutting down all the operational device proxies on our mCASESessionManager (since we own all of those anyway) and fixing operational device proxy shutdown/destruction to actually clean up the CASEClient if we're still in the middle of CASE establishment. 2) Expiring the SecureSessions for our fabric, so that any still-open operational exchanges for those sessions get closed correctly (with a timeout). This is needed because our client cluster APIs don't give us any way to cancel the operation (invoke, read, write, etc) and we need to make sure those get cleaned up when we shut down. In addition to that: * Reject wrong-fabric results in DeviceCommissioner::OnOperationalNodeResolved (due to buggy minimal mdns), so if we start sharing a CASESessionManager across controllers we will not be in a position where we are ending up with CASE sessions we create but can't tear down. * Fix CASE shutdown to not leave a dangling MRP entry after it shuts down the exchange. Fixes project-chip#15760
…15816) We already handled shutdown of any ongoing PASE bits. This PR adds two more things: 1) Shutting down any ongoing CASE session establishment exchanges for which we are the initiator. This is done by shutting down all the operational device proxies on our mCASESessionManager (since we own all of those anyway) and fixing operational device proxy shutdown/destruction to actually clean up the CASEClient if we're still in the middle of CASE establishment. 2) Expiring the SecureSessions for our fabric, so that any still-open operational exchanges for those sessions get closed correctly (with a timeout). This is needed because our client cluster APIs don't give us any way to cancel the operation (invoke, read, write, etc) and we need to make sure those get cleaned up when we shut down. In addition to that: * Reject wrong-fabric results in DeviceCommissioner::OnOperationalNodeResolved (due to buggy minimal mdns), so if we start sharing a CASESessionManager across controllers we will not be in a position where we are ending up with CASE sessions we create but can't tear down. * Fix CASE shutdown to not leave a dangling MRP entry after it shuts down the exchange. Fixes #15760
Problem
iOS chiptool crashes when trying to scanning QR. code
SHA: 3f78165
In step 2, chiptool crashes..20% of times
022-03-02 15:01:20.221121-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080221] [3912:194118] CHIP: [CTL] Setup in progress, stopping setup before shutting down
2022-03-02 15:01:20.221212-0800 localhost CHIPTool[3912]: (CHIP) DevicePairingDelegate status updated: 1
2022-03-02 15:01:20.221391-0800 localhost CHIPTool[3912]: (CHIP) DevicePairingDelegate Pairing complete. Status ../../../../../../../../../../../connectedhomeip/src/controller/CHIPDeviceController.cpp:660: CHIP Error 0x00000002: Connection aborted
2022-03-02 15:01:20.221516-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080221] [3912:194118] CHIP: [CTL] Shutting down the controller
2022-03-02 15:01:20.221590-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080221] [3912:194118] CHIP: [CTL] Shutting down the System State, this will teardown the CHIP Stack
2022-03-02 15:01:20.221647-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080221] [3912:194118] CHIP: [DMG] IM WH moving to [Uninitialized]
2022-03-02 15:01:20.221611-0800 localhost CHIPTool[3912]: (CoreFoundation) [com.apple.CFBundle:strings] Bundle: CFBundle 0x10e1041e0 </private/var/containers/Bundle/Application/1F15B8D0-0430-49D7-AEE2-A589DB036320/CHIPTool.app> (executable, loaded), key: Undefined error:%u., value: , table: Localizable, localizationName: (null), result: Undefined error:%u.
2022-03-02 15:01:20.221701-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080221] [3912:194118] CHIP: [DMG] IM WH moving to [Uninitialized]
2022-03-02 15:01:20.221754-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080221] [3912:194118] CHIP: [DMG] IM WH moving to [Uninitialized]
2022-03-02 15:01:20.221806-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080221] [3912:194118] CHIP: [DMG] IM WH moving to [Uninitialized]
2022-03-02 15:01:20.221820-0800 localhost CHIPTool[3912]: Got pairing error back Error Domain=CHIPErrorDomain Code=1 "Undefined error:2." UserInfo={NSLocalizedDescription=Undefined error:2., errorCode=2}
2022-03-02 15:01:20.222061-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080222] [3912:194118] CHIP: [BLE] CancelConnection
2022-03-02 15:01:20.222123-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080222] [3912:194118] CHIP: [DL] Inet Layer shutdown
2022-03-02 15:01:20.222243-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080222] [3912:194118] CHIP: [DL] BLE shutdown
2022-03-02 15:01:20.222391-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080222] [3912:194118] CHIP: [DL] System Layer shutdown
2022-03-02 15:01:20.222554-0800 localhost CHIPTool[3912]: (CHIP) [com.zigbee.chip:all] � [1646262080222] [3912:194118] CHIP: [SPT] VerifyOrDie failure at ../../../../../../../../../../../connectedhomeip/src/lib/support/Pool.h:217: Allocated() == 0
Proposed Solution
<suggested fix, suggested enhancement>
chiptool-crash-scanning-qr-code2.txt
chiptool-crash-scanning-qr-code.txt
The text was updated successfully, but these errors were encountered: