Hello Dan Burkert, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/4761
to look at the new patch set (#2).
Change subject: Free SASL connection objects when negotiation completes
......................................................................
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
---
M src/kudu/rpc/sasl_client.cc
M src/kudu/rpc/sasl_client.h
M src/kudu/rpc/sasl_server.cc
M src/kudu/rpc/sasl_server.h
4 files changed, 21 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/61/4761/2
--
To view, visit http://gerrit.cloudera.org:8080/4761
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib7aada1e44a80af94c5c069e9f583aedcd78a68b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>