I have a user jenkins that is hanging when running certain scripts or commands (this is an android build server).  When running the same scripts/commands as root, they are executing OK.Example:As user jenkins:> java-- hangs --As user root:> java-- Usage help output -- This happens for many commands run as jenkins, such as android and java, but commands like ps and cat work just fine.This is a recent development so it's probably some sort of permissions issue, but I can't pin it down.Update: Adding set -x to the beginning of the script reveals that it hangs when calling java, on this line:+ exec /etc/alternatives/java_sdk_1.8.0/bin/java -Dorg.gradle.appname=gradlew -classpath /var/lib/jenkins/workspace/android-project/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain assembleDebugThe diff between running strace -fo java on both jenkins and root users shows a divergence at the following lines:5319  stat(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.e | 5302  stat(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.e5319  open(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.e | 5302  open(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.e5319  stat(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.e | 5302  stat(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.e5319  open(/opt/glibc-2.14/lib/tls/x86_64/libpthread.so.0,  | 5302  open(/etc/ld.so.cache, O_RDONLY) = 35319  stat(/opt/glibc-2.14/lib/tls/x86_64, 0x7ffe601248c0)  | 5302  fstat(3, {st_mode=S_IFREG|0644, st_size=49448, ...}) =5319  open(/opt/glibc-2.14/lib/tls/libpthread.so.0, O_RDONL | 5302  mmap(NULL, 49448, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fa5319  stat(/opt/glibc-2.14/lib/tls, 0x7ffe601248c0) = -1 EN | 5302  close(3)                          = 05319  open(/opt/glibc-2.14/lib/x86_64/libpthread.so.0, O_RD | 5302  open(/lib64/libpthread.so.0, O_RDONLY) = 35319  stat(/opt/glibc-2.14/lib/x86_64, 0x7ffe601248c0) = -1 | 5302  read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\05319  open(/opt/glibc-2.14/lib/libpthread.so.0, O_RDONLY) = | 5302  fstat(3, {st_mode=S_IFREG|0755, st_size=146592, ...}) =where the left side is the jenkins user.  It seems to be failing in an area regarding glibc-2.14, which is pointed to via environment variable LD_LIBRARY_PATH.
Running certain scripts / commands hangs as user, OK as root
permissions;terminal
TL;DR: Some users had an environment variable set to use glibc-2.14, which causes java VM execution to fail.Looking through the strace diff, there is this line in particular:5319  open(/opt/glibc-2.14/lib/libpthread.so.0, O_RDONLY)This indicated that some users were using the glibc-2.14 binaries, while others were using the system glibc libs (which are at 2.12).The difference is that some users had the LD_LIBRARY_PATH environment variable set to the glibc-2.14 directory and others didn't, defaulting to the system's 2.12.  Clearing LD_LIBRARY_PATH allowed the java command to be run successfully for these users.