-
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
[Darwin] Get the ShutDown event to work #15151
Merged
vivien-apple
merged 1 commit into
project-chip:master
from
vivien-apple:Darwin_ShutDownEvent
Feb 16, 2022
Merged
[Darwin] Get the ShutDown event to work #15151
vivien-apple
merged 1 commit into
project-chip:master
from
vivien-apple:Darwin_ShutDownEvent
Feb 16, 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
pullapprove
bot
requested review from
andy31415,
anush-apple,
balducci-apple,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
franck-apple,
gjc13,
hawk248,
holbrookt,
harsha-rajendran,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kpschoedel,
lazarkov and
LuDuda
February 14, 2022 16:05
pullapprove
bot
requested review from
mlepage-google,
mrjerryjohns,
msandstedt,
robszewczyk,
sagar-apple,
saurabhst,
selissia,
tcarmelveilleux,
tecimovic,
vijs,
wbschiller,
woody-apple,
xylophone21,
yufengwangca and
yunhanw-google
February 14, 2022 16:05
vivien-apple
force-pushed
the
Darwin_ShutDownEvent
branch
from
February 14, 2022 16:22
fe8188d
to
d48e334
Compare
PR #15151: Size comparison from 75c7845 to d48e334 Increases above 0.2%:
Increases (7 builds for linux)
Decreases (10 builds for linux)
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
mrjerryjohns
approved these changes
Feb 14, 2022
bzbarsky-apple
approved these changes
Feb 15, 2022
vivien-apple
force-pushed
the
Darwin_ShutDownEvent
branch
from
February 15, 2022 20:40
d48e334
to
fc58cc0
Compare
PR #15151: Size comparison from 01ae39f to fc58cc0 Increases above 0.2%:
Increases (7 builds for linux)
Decreases (10 builds for linux)
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
vivien-apple
force-pushed
the
Darwin_ShutDownEvent
branch
from
February 16, 2022 08:11
fc58cc0
to
91020a5
Compare
PR #15151: Size comparison from d671a52 to 91020a5 Increases above 0.2%:
Increases (7 builds for linux)
Decreases (10 builds for linux)
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
jamesluo11
pushed a commit
to jamesluo11/connectedhomeip
that referenced
this pull request
Apr 26, 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.
Problem
In #15103 I was trying to get the
ShutDown
event to work on Darwin. But there was a few different issues.PlatformManager::Shutdown
ends up into aheap-use-after-free
with Asan, basically becauseServer::Shutdown
was not called properlyShutDown
event has been moved intosrc/include/platform/internal/GenericPlatformManager.cpp
in Trigger StartUp & ShutDown event on all platforms uniformly #14731 but I just don't understand how it is supposed to be effectively dispatched so I moved it back into a method inServer.h
The reason why I do not understand how it is supposed to be dispatched is because the event goes through
LogEvent
which eventually callScheduleWork
. But right after the rest of the platform is turned off, which results into tsan/asan complaining...Change overview
ShutDown
event frominternal
toServer.h
src/platform/Linux
toexamples/platform/Linux
so both Darwin/Linux benefits from them (sadly I add to replacesigaction
by signal because of Tsan signal interceptors not playing nicely with darwin)Server
code to shutdown properly