Skip to content

Commit

Permalink
IMPALA-11738: Add toolchain libstdc++ to LD_LIBRARY_PATH for HiveServer2
Browse files Browse the repository at this point in the history
libfesupport.so is built against the toolchain libstdc++,
which may be newer than the OS libstdc++. Since HiveServer2
has libfesupport.so on its java.library.path, we should also
put the toolchain libstdc++ in LD_LIBRARY_PATH so that
libfesupport.so can resolve all its symbols properly.

This fixes an issue with a Hive crash in Ubuntu 18 dataload.

Testing:
 - Ran dataload on Ubuntu 18

Change-Id: Ib35e778850618b35073d102b89a4de02071b4a19
Reviewed-on: http://gerrit.cloudera.org:8080/19276
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
  • Loading branch information
joemcdonnell committed Dec 7, 2022
1 parent 8cd4a1e commit 4c772f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testdata/bin/run-hive-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ fi
# Include the latest libfesupport.so in the JAVA_LIBRARY_PATH
export JAVA_LIBRARY_PATH="${JAVA_LIBRARY_PATH-}:${IMPALA_HOME}/be/build/latest/service/"

# Add the toolchain's libstdc++ to the LD_LIBRARY_PATH, because libfesupport.so may
# need the newer version.
GCC_HOME="${IMPALA_TOOLCHAIN_PACKAGES_HOME}/gcc-${IMPALA_GCC_VERSION}"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH-}:${GCC_HOME}/lib64"

export HIVESERVER2_HADOOP_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,\
suspend=n,address=30020"
if [ ${START_HIVESERVER} -eq 1 ]; then
Expand Down

0 comments on commit 4c772f9

Please sign in to comment.