-
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
Ensure that we shut down open exchanges when controller shuts down. #15816
Merged
andy31415
merged 1 commit into
project-chip:master
from
bzbarsky-apple:fix-shutdown-exchange-leaks-controller
Mar 3, 2022
Merged
Ensure that we shut down open exchanges when controller shuts down. #15816
andy31415
merged 1 commit into
project-chip:master
from
bzbarsky-apple:fix-shutdown-exchange-leaks-controller
Mar 3, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR #15816: Size comparison from 3b83461 to 6b6ffe4 Increases (29 builds for cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, qpg, telink)
Full report (31 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
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
bzbarsky-apple
force-pushed
the
fix-shutdown-exchange-leaks-controller
branch
from
March 3, 2022 20:05
6b6ffe4
to
527126c
Compare
pullapprove
bot
requested review from
andy31415,
anush-apple,
austinh0,
balducci-apple,
Byungjoo-Lee,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
erjiaqing,
franck-apple,
gjc13,
hawk248,
harsha-rajendran,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kpschoedel and
lazarkov
March 3, 2022 20:06
pullapprove
bot
requested review from
LuDuda,
lzgrablic02,
mlepage-google,
mrjerryjohns,
msandstedt,
robszewczyk,
sagar-apple,
saurabhst,
selissia,
tecimovic,
turon,
vijs,
vivien-apple,
wbschiller,
woody-apple and
xylophone21
March 3, 2022 20:06
PR #15816: Size comparison from 3b83461 to 527126c Increases (30 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (31 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
msandstedt
approved these changes
Mar 3, 2022
woody-apple
approved these changes
Mar 3, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We already handled shutdown of any ongoing PASE bits.
This PR adds two more things:
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.
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:
Fixes #15760
Problem
Leaking exchanges on the controller in various cases.
Change overview
Fix the leaks.
Testing
Tried shutting down the controller while in the middle of a chunked read. Without this fix, fails a VerifyOrDie; with this fix is ok.