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 deadlock when registering two extensions #6745

Merged

Conversation

nickcollier
Copy link
Contributor

@nickcollier nickcollier force-pushed the fix-deadlock-registering-two-extensions branch from a7179e3 to 629ab50 Compare November 2, 2020 15:37
@mike-myers-tob mike-myers-tob added the extensions Related to osquery extension SDK or to extensions themselves label Nov 4, 2020
@theopolis
Copy link
Member

I reviewed quickly and it seems that all of the "unsafe" calling functions are holding read locks or greater. @Smjert, in office hours today we wanted to double check this assertion. If this is indeed the case then this looks OK. But we should reconsider the higher level functionality (beyond the Registry internals) to determine what actions should be atomic.

@theopolis
Copy link
Member

I double checked and I think this looks OK.

@theopolis
Copy link
Member

I tested this with TSAN and a broad suppressions file:

race:onClientDisconnected
race:/usr/local/osquery-toolchain/usr/bin/../include/c++/v1
race:apache::thrift::server::TConnectedClient::cleanup
race:apache::thrift::server::TServerFramework::disposeConnectedClient
race:apache::thrift::concurrency

So I am not 100% confident but close enough. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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