KUDU-3404 disable TLS in glog
Glog 0.4.0 introduced support for using thread local storage for its
buffer. This feature is controlled by the WITH_TLS CMake variable, and
it defaults to ON.  When Kudu upgraded to glog 0.6.0 as part of the
Apple Silicon (M Series) fixes , it increased the thread local
storage usage by >30000 bytes.
This is a problem for Impala, because Impala starts a JVM. There are
certain JVM threads (like the "reaper thread") that have very small
stacks (e.g. 32KB) and with glibc the TLS space is allocated at the
expense of stack space.  30k of TLS usage leaves very little for the
reaper thread. There are a series of bugs where the Java reaper thread
hits a StackOverflowException because of high TLS usage.  This can
cause various symptoms including hangs.
To resolve Impala's problem, it would be useful to build
libkudu_client.so with glog's WITH_TLS=OFF.
 JDK bugs: JDK-8217475, JDK-8225035
Tested-by: Kudu Jenkins
Reviewed-by: Attila Bukor <email@example.com>
1 file changed