forked from apache/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Free SASL connection objects when negotiation completes
The SASL connections are only currently used during negotiation, and then can be dropped following that. So, it makes sense to dispose of the objects as soon as possible from a memory consumption standpoint, since they probably hold some buffers. More importantly, though, this also works around a bug I saw occasionally when running a Kerberized Kudu CLI: - the CLI main would make some RPC call and get an "unauthorized" status. - it would then drop its reference to the KuduClient and exit. - this would call Messenger::AllExternalReferencesDropped() which initiates an asynchronous shutdown of the reactor threads. - the main thread would get to 'exit()' and start unloading dynamic libraries, including libkrb5. - the reactor thread would call sasl_dispose on a sasl_connection_t during its shutdown sequence, which would crash with an assertion failure in k5_mutex.h if this happened after krb5 was unloaded. Rather than futz with the shutdown sequence of the reactor, it was much simpler to just dispose the connections earlier as done in this patch. Change-Id: Ib7aada1e44a80af94c5c069e9f583aedcd78a68b Reviewed-on: http://gerrit.cloudera.org:8080/4761 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <[email protected]>
- Loading branch information
1 parent
7138468
commit 1096d66
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters