Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GATK should warn the user when the temp dir is "noexec" #8453

Open
droazen opened this issue Aug 4, 2023 · 2 comments · May be fixed by #8951
Open

GATK should warn the user when the temp dir is "noexec" #8453

droazen opened this issue Aug 4, 2023 · 2 comments · May be fixed by #8951

Comments

@droazen
Copy link
Collaborator

droazen commented Aug 4, 2023

As reported recently by Eric Jones:

"Many newer Linux distributions will mount /tmp with the noexec mount option. If /tmp is noexec, then any JNA code (Java code that extracts native binary components into shareable libraries and then executes that code) will fail. There are a number of GATK methods that do this.

A typical error looks like:

java.lang.UnsatisfiedLinkError: /tmp/libbwa.2929202181066681888.jnilib: /tmp/libbwa.2929202181066681888.jnilib: failed to map segment from shared object

There's an easy fix for it: you can use --tmpdir or one of the typical java methods that reset java.io.tmpdir to name a directory that isn't noexec. But it's amazingly hard to find clues about that being necessary. I found no references to noexec on the forum nor in the help section of the gatk site"

We should address this by explicitly checking on GATK startup whether the selected temp dir is marked noexec, and warn the user in that case.

@mdondrup
Copy link

mdondrup commented Jan 23, 2024

I have also stumbled over this. I am adding a detailed error log.
I think that the incompatibility of accelerated PairHMM with a tmp directory mounted noexec should be mentioned in
the installation requirements. I found it well-documented in the troubleshooting section. But everyone with this setup will experience falling back to the slow implementation for no other reason.

INFO  NativeLibraryLoader - Loading libgkl_utils.so from jar:file:/
miniconda2/envs/polyploidPhasing/share/gatk4-4.3.0.0-0/gatk-package-4.3.0.0-local.jar!/com/intel/gkl/native/libgkl_utils.so
WARN  NativeLibraryLoader - Unable to load libgkl_utils.so from native/libgkl_utils.so (/tmp/libgkl_utils9418239050694741169.so: /tmp/libgkl_utils9
418239050694741169.so: failed to map segment from shared object: Operation not permitted)
WARN  IntelPairHmm - Intel GKL Utils not loaded
PairHMM - OpenMP multi-threaded AVX-accelerated native PairHMM implementation is not supported

@rickymagner
Copy link
Contributor

To bump an old issue: I could take a look at this if you knew of a good Java library method to test whether a directory is noexec or not, especially something cross-platform friendly (if this is an issue anywhere else other than Linux). This just happened to me and I found this issue more useful to debugging than the output.

Also, for anyone else who stumbles upon this in the meantime, the flag to pass to GATK is --TMP_DIR and then point to some random directory you made on your local fs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants