Repository: incubator-impala Updated Branches: refs/heads/master bb36433b1 -> 8ea21d099
IMPALA-4497: Fix Kudu client crash w/ SASL initialization Kudu commit cd40d1c5126d0fd541d95370cdb2998b60f2f82c added a call to sasl_set_mutex, which ends up in the client process (Impala). That conflicts with Impala's SASL initialization code resulting in a crash when the Kudu client is used to open a connection to Kudu. Kudu commit f2aeba6c059ea61f9cf8984d3e84d6c27b64d463 provided a method to disable the Kudu client's SASL initialization to avoid this. This commit calls this method on process startup. Testing on kerberized cluster which was previously crashing. Change-Id: Ic465c31406a6df2753f6cc7481b6b391ed5e671b Reviewed-on: http://gerrit.cloudera.org:8080/5139 Reviewed-by: Matthew Jacobs <[email protected]> Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/de88f0c4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/de88f0c4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/de88f0c4 Branch: refs/heads/master Commit: de88f0c4af3a07ae6bd6b8c94edcb8748468f522 Parents: bb36433 Author: Matthew Jacobs <[email protected]> Authored: Fri Nov 18 07:15:58 2016 -0800 Committer: Internal Jenkins <[email protected]> Committed: Sat Nov 19 09:55:51 2016 +0000 ---------------------------------------------------------------------- be/src/rpc/authentication.cc | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/de88f0c4/be/src/rpc/authentication.cc ---------------------------------------------------------------------- diff --git a/be/src/rpc/authentication.cc b/be/src/rpc/authentication.cc index 09ea5e4..cf6432a 100644 --- a/be/src/rpc/authentication.cc +++ b/be/src/rpc/authentication.cc @@ -36,6 +36,7 @@ #include <ldap.h> +#include "exec/kudu-util.h" #include "rpc/auth-provider.h" #include "rpc/thrift-server.h" #include "transport/TSaslClientTransport.h" @@ -638,6 +639,13 @@ Status InitAuth(const string& appname) { return Status(err_msg.str()); } + // Kudu client shouldn't attempt to initialize SASL which would conflict with + // Impala's SASL initialization. This must be called before any KuduClients are + // created to ensure that Kudu doesn't init SASL first, and this returns an error if + // Kudu has already initialized SASL. + KUDU_RETURN_IF_ERROR(kudu::client::DisableSaslInitialization(), + "Unable to disable Kudu SASL initialization."); + // Add our auxprop plugin, which gives us a hook before authentication int rc = sasl_auxprop_add_plugin(IMPALA_AUXPROP_PLUGIN.c_str(), &ImpalaAuxpropInit); if (rc != SASL_OK) {
