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

Reset all device objects on controller shutdown #7894

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

Fixes #7892

Change overview

The device objects were getting destructed as part of DeviceController destructor. If the CASE Session was in progress, the device object tries to clear the state. That required it to access some of the system layer objects that were already freed as part of controller shutdown (that happened before the destructor was called).

This change clears the device objects as part of the controller shutdown. It clears all the state that may require access to system level objects, so that the device destructor doesn't need to access that state.

Testing

Tested using patch mentioned in #7892.
Reproduced the crash, fixed the problem and tested that the crash is gone.

@bzbarsky-apple bzbarsky-apple merged commit 336533f into project-chip:master Jun 25, 2021
@pan-apple pan-apple deleted the fix-shutdown-crash branch June 25, 2021 15:01
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash during shutdown due to still-pending CASE session
4 participants