-
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
Use assertChipStackLockedByCurrentThread when accessing statics in src/system/SystemStats.cpp #25485
Merged
bzbarsky-apple
merged 2 commits into
project-chip:master
from
vivien-apple:SystemStats_ChipThreadOnly
Mar 8, 2023
Merged
Use assertChipStackLockedByCurrentThread when accessing statics in src/system/SystemStats.cpp #25485
bzbarsky-apple
merged 2 commits into
project-chip:master
from
vivien-apple:SystemStats_ChipThreadOnly
Mar 8, 2023
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
amitnj,
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
cliffamzn,
CodeChronos928,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
franck-apple,
gjc13,
harsha-rajendran,
hawk248,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jmeg-sfy,
jtung-apple,
kkasperczyk-no,
ksperling-apple,
lazarkov and
lpbeliveau-silabs
March 6, 2023 10:30
PR #25485: Size comparison from 32fb896 to 5a1ec7e Increases (1 build for cc32xx)
Full report (1 build for cc32xx)
|
vivien-apple
changed the title
System stats chip thread only
Use assertChipStackLockedByCurrentThread when accessing statics in src/system/SystemStats.cpp
Mar 6, 2023
vivien-apple
force-pushed
the
SystemStats_ChipThreadOnly
branch
from
March 6, 2023 12:47
5a1ec7e
to
3dc49d7
Compare
This issue is somehow similar to #25313 where a static is used from multiple threads/queues. |
PR #25485: Size comparison from 32fb896 to 3dc49d7 Increases (1 build for cc32xx)
Full report (2 builds for cc32xx, mbed)
|
Damian-Nordic
approved these changes
Mar 6, 2023
For reference I found that while working on #25374. The Tsan stack was:
|
bzbarsky-apple
requested changes
Mar 6, 2023
…c/system/SystemStats.cpp
…does not creates a PacketBufferHandle from the ble work queue but from the chip work queue
vivien-apple
force-pushed
the
SystemStats_ChipThreadOnly
branch
from
March 7, 2023 11:15
3dc49d7
to
91a04fb
Compare
PR #25485: Size comparison from fc0e4a2 to 91a04fb Increases (1 build for cc32xx)
Decreases (1 build for cc32xx)
Full report (1 build for cc32xx)
|
bzbarsky-apple
approved these changes
Mar 8, 2023
lecndav
pushed a commit
to lecndav/connectedhomeip
that referenced
this pull request
Mar 22, 2023
…c/system/SystemStats.cpp (project-chip#25485) * Use assertChipStackLockedByCurrentThread when accessing statics in src/system/SystemStats.cpp * Update src/platform/Darwin/BleConnectionDelegateImpl.mm such that it does not creates a PacketBufferHandle from the ble work queue but from the chip work queue
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
SystemStats.cpp
accesses some static variables but does not check that the access is from the chip thread. The ble darwin implementation does access those from the ble work queue because it tries to create a PacketBufferHandle.This PR ensure that those are accesses onto the chip work queue, and that
SystemStats.cpp
will complains if that happens again.