-
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
Assert that holders are added to sessions only with the Matter lock held. #20180
Merged
andy31415
merged 1 commit into
project-chip:master
from
bzbarsky-apple:session-threading-asserts
Jul 11, 2022
Merged
Assert that holders are added to sessions only with the Matter lock held. #20180
andy31415
merged 1 commit into
project-chip:master
from
bzbarsky-apple:session-threading-asserts
Jul 11, 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,
arkq,
Byungjoo-Lee,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
franck-apple,
gjc13,
harsha-rajendran,
hawk248,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jtung-apple,
kpschoedel,
lazarkov,
LuDuda,
msandstedt,
mspang,
robszewczyk and
saurabhst
June 30, 2022 17:23
pullapprove
bot
requested review from
tcarmelveilleux,
tecimovic,
tehampson,
turon,
vijs,
vivien-apple,
wbschiller,
woody-apple,
xylophone21 and
yunhanw-google
June 30, 2022 17:23
tcarmelveilleux
approved these changes
Jun 30, 2022
msandstedt
reviewed
Jun 30, 2022
msandstedt
approved these changes
Jun 30, 2022
PR #20180: Size comparison from d6c3519 to 04728aa Increases (29 builds for cc13x2_26x2, efr32, esp32, k32w, linux, p6, telink)
Decreases (4 builds for cc13x2_26x2, linux, nrfconnect)
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
mrjerryjohns
approved these changes
Jun 30, 2022
bzbarsky-apple
force-pushed
the
session-threading-asserts
branch
from
July 1, 2022 01:05
04728aa
to
390c22c
Compare
PR #20180: Size comparison from c1d5431 to 390c22c Increases (26 builds for efr32, esp32, k32w, linux, nrfconnect, p6)
Decreases (3 builds for linux, telink)
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
woody-apple
force-pushed
the
session-threading-asserts
branch
from
July 2, 2022 16:41
390c22c
to
950be21
Compare
PR #20180: Size comparison from 4664072 to 950be21 Increases (29 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6)
Decreases (7 builds for cc13x2_26x2, linux, nrfconnect, telink)
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
@andy31415 Is this a real failure? (look repeated?) (Edit: Nevermind, I see that it is, and the dependency) |
…eld. Adding/removing holders manipulates circular lists, and if we end up with data races on these manipulations we can end up in bad states. Since sessions are somewhat singleton resources, and the "hold on to a session" operation is pretty hidden in many cases, it's easy to end up with a situation where a session is being pointed to by objects being manipulated on multiple threads and hard to catch this via manual code inspection.
bzbarsky-apple
force-pushed
the
session-threading-asserts
branch
from
July 11, 2022 05:54
950be21
to
692ba08
Compare
PR #20180: Size comparison from 776c06d to 692ba08 Increases (26 builds for efr32, esp32, k32w, linux, p6, telink)
Decreases (6 builds for cyw30739, linux, nrfconnect, telink)
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
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.
Adding/removing holders manipulates circular lists, and if we end up with data
races on these manipulations we can end up in bad states. Since sessions are
somewhat singleton resources, and the "hold on to a session" operation is pretty
hidden in many cases, it's easy to end up with a situation where a session is
being pointed to by objects being manipulated on multiple threads and hard to
catch this via manual code inspection.
Problem
See above.
Change overview
Add asserts.
Testing
CI should tell.