Skip to content
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

Commissioner shutdown during BLE discovery may not work very well #20781

Open
bzbarsky-apple opened this issue Jul 15, 2022 · 2 comments
Open
Labels
commissioning Involves placing devices on the network, initial setup

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

If a DeviceCommissioner is shut down while in the middle of doing BLE discovery for a commissioning attempt, we may end up with use-after-free, because some of our platforms don't have an obvious way to cancel BLE discovery, and when it calls back it will be touching deleted objects.

Proposed Solution

Figure out whether we can tie the BLE discovery handling to something that has long-enough lifetime and holds weak refs to the SetUpCodePairer that get nulled out as needed, or whether we can make BLE discovery be consistently cancelable.

@bzbarsky-apple bzbarsky-apple added the commissioning Involves placing devices on the network, initial setup label Jul 15, 2022
@stale
Copy link

stale bot commented Jan 13, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Jan 13, 2023
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Jan 13, 2023
@stale
Copy link

stale bot commented Aug 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Aug 7, 2023
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commissioning Involves placing devices on the network, initial setup
Projects
None yet
Development

No branches or pull requests

1 participant