-
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
Fix System vs Inet and BLE shutdown order #7429
Conversation
#### Problem Inet and BLE contain pointers to the System::Layer, but in some implementations System::Layer is shut down first, leaving those pointers invalid. (There appear to be no current uses of those invalid pointers in the tree.) #### Change overview Shut down system layer after the others in: - `DeviceController::Shutdown()` - `GenericPlatformManagerImpl::_Shutdown()` - `JNI_OnUnload()` #### Testing - Some existing unit tests use the correct order (System last), so it's known to work. - Manually tested with platforms using `GenericPlatformManagerImpl::_Shutdown()` (Linux paired with ESP32).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but ideally we would have this ordering dependecy documented on the relevant Shutdown methods....
I will add brief comments for these in the event-loop PR that sparked this change. |
#### Problem Inet and BLE contain pointers to the System::Layer, but in some implementations System::Layer is shut down first, leaving those pointers invalid. (There appear to be no current uses of those invalid pointers in the tree.) #### Change overview Shut down system layer after the others in: - `DeviceController::Shutdown()` - `GenericPlatformManagerImpl::_Shutdown()` - `JNI_OnUnload()` #### Testing - Some existing unit tests use the correct order (System last), so it's known to work. - Manually tested with platforms using `GenericPlatformManagerImpl::_Shutdown()` (Linux paired with ESP32).
#### Problem Inet and BLE contain pointers to the System::Layer, but in some implementations System::Layer is shut down first, leaving those pointers invalid. (There appear to be no current uses of those invalid pointers in the tree.) #### Change overview Shut down system layer after the others in: - `DeviceController::Shutdown()` - `GenericPlatformManagerImpl::_Shutdown()` - `JNI_OnUnload()` #### Testing - Some existing unit tests use the correct order (System last), so it's known to work. - Manually tested with platforms using `GenericPlatformManagerImpl::_Shutdown()` (Linux paired with ESP32).
#### Problem Inet and BLE contain pointers to the System::Layer, but in some implementations System::Layer is shut down first, leaving those pointers invalid. (There appear to be no current uses of those invalid pointers in the tree.) #### Change overview Shut down system layer after the others in: - `DeviceController::Shutdown()` - `GenericPlatformManagerImpl::_Shutdown()` - `JNI_OnUnload()` #### Testing - Some existing unit tests use the correct order (System last), so it's known to work. - Manually tested with platforms using `GenericPlatformManagerImpl::_Shutdown()` (Linux paired with ESP32).
Problem
Inet and BLE contain pointers to the System::Layer, but in some
implementations System::Layer is shut down first, leaving those
pointers invalid. (There appear to be no current uses of those
invalid pointers in the tree.)
Change overview
Shut down system layer after the others in:
DeviceController::Shutdown()
GenericPlatformManagerImpl::_Shutdown()
JNI_OnUnload()
Testing
so it's known to work.
GenericPlatformManagerImpl::_Shutdown()
(Linux paired with ESP32).