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

Fix extensions crash on shutdown #7075

Conversation

Smjert
Copy link
Member

@Smjert Smjert commented Apr 23, 2021

The crash was happening due to the ExtensionWatcher thread still running
and attempting to call the watch() function,
while the extension was exiting.

Use the Initializer::shutdown() function so that all threads/services are stopped before
exiting.

Also update the documentation with the example extension.

@Smjert Smjert added bug documentation extensions Related to osquery extension SDK or to extensions themselves labels Apr 23, 2021
@Smjert Smjert requested review from a team as code owners April 23, 2021 19:27
The crash was happening due to the ExtensionWatcher thread still running
and attempting to call the watch() function,
while the extension was exiting.

Use the Initializer::shutdown() function so that all threads/services are stopped before
exiting.

Also update the documentation with the example extension.
@Smjert Smjert force-pushed the stefano/fix/extension-crash-on-shutdown branch from d277123 to 4599ae6 Compare April 23, 2021 19:28
@Smjert Smjert changed the title Fix example extensions crash on shutdown Fix extensions crash on shutdown Apr 23, 2021
@directionless directionless merged commit f0881a6 into osquery:master Apr 26, 2021
@Smjert Smjert deleted the stefano/fix/extension-crash-on-shutdown branch May 6, 2021 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation extensions Related to osquery extension SDK or to extensions themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants