-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix SessionManager::Shutdown to actually shut-down sessions #20487
Merged
mrjerryjohns
merged 1 commit into
project-chip:master
from
mrjerryjohns:shutdown-sessions
Jul 8, 2022
Merged
Fix SessionManager::Shutdown to actually shut-down sessions #20487
mrjerryjohns
merged 1 commit into
project-chip:master
from
mrjerryjohns:shutdown-sessions
Jul 8, 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
SessionManager::Shutdown() wasn't actually shutting down any sessions that were resident in the session table. This meant that they would only get torn down on program termination, which causes issues in the Python REPL since it results in Log prints being emitted well after we've actually disconnected the logging subsystem.
pullapprove
bot
requested review from
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
franck-apple,
gjc13,
harimau-qirex,
harsha-rajendran,
hawk248,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jtung-apple,
kghost,
kpschoedel,
lazarkov,
LuDuda and
msandstedt
July 8, 2022 14:28
pullapprove
bot
requested review from
jtung-apple,
kghost,
kpschoedel,
lazarkov,
LuDuda,
msandstedt,
mspang,
saurabhst,
selissia,
tcarmelveilleux,
tecimovic,
tehampson,
turon,
vijs,
vivien-apple,
wbschiller,
woody-apple,
xylophone21 and
yufengwangca
July 8, 2022 14:28
PR #20487: Size comparison from 8ebd7f0 to 2e07871 Increases above 0.2%:
Increases (29 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
Decreases (5 builds for cc13x2_26x2)
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
woody-apple
approved these changes
Jul 8, 2022
turon
approved these changes
Jul 8, 2022
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this pull request
Jul 14, 2022
…ning window. After project-chip#20487 if we shut down with a commissioning window open we end up in a loop where the session manager shutdown marks the tentative PASE session for eviction, we treat that as a commissioning error and start listening for PASE again, creating a new session, etc. With a heap pool this ends up happening to work in that we keep evicting the new sessions until we hit the 20-attempt limit and close the commissioning window. With a non-heap pool, I sort of wonder what happens, exactly. The fix here is in two parts, with either part enough on its own to fix the behavior described above: 1) Shut down the commissioning window manager earlier, before we shut down the session manager. And correspondingly move its initialization during server init later. 2) Once session manager starts shutdown, refuse to create any new sessions.
bzbarsky-apple
added a commit
that referenced
this pull request
Jul 14, 2022
…ning window. (#20715) * Fix session allocation loop when shutting down with an open commissioning window. After #20487 if we shut down with a commissioning window open we end up in a loop where the session manager shutdown marks the tentative PASE session for eviction, we treat that as a commissioning error and start listening for PASE again, creating a new session, etc. With a heap pool this ends up happening to work in that we keep evicting the new sessions until we hit the 20-attempt limit and close the commissioning window. With a non-heap pool, I sort of wonder what happens, exactly. The fix here is in two parts, with either part enough on its own to fix the behavior described above: 1) Shut down the commissioning window manager earlier, before we shut down the session manager. And correspondingly move its initialization during server init later. 2) Once session manager starts shutdown, refuse to create any new sessions. * Fix unit tests.
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.
SessionManager::Shutdown()
wasn't actually shutting down any sessions that were resident in the session table.This meant that they would only get torn down on program termination, which causes issues in the Python REPL since it results in Log prints being emitted after we've actually disconnected the logging subsystem. This has been a great way to actually catch objects that should be torn down as part of Shutdown, but weren't.