NVHPC 25.3 libaccdevaux.so fails to dlopen on glibc 2.41: “cannot enable executable stack (Invalid argument)”

Product & version
NVIDIA HPC SDK 25.3 (latest public release, downloaded 2025-04-xx)
Target: x86_64, CUDA 12.4; using CoreNEURON 2.6 built with NVHPC.

Environment

  • Distro: Arch Linux (fully updated 2025-04-24)
  • Kernel: Linux 6.14.3-zen1-1-zen
  • glibc: 2.41
  • GPU: RTX 3070 driver 570.144
  • NVHPC root: /opt/nvidia/hpc_sdk/Linux_x86_64/25.3

Reproducer

$ python - <<'PY'
from neuron import h   # loads CoreNEURON GPU backend via NVHPC OpenACC runtime
PY
libaccdevaux.so: cannot enable executable stack as shared object requires: Invalid argument
NEURON: Could not dlopen CoreNEURON mechanism library:  …/libcorenrnmech_internal.so

Strace shows the dynamic loader tries mprotect(PROT_EXEC) on the main stack and receives EINVAL.

Analysis

The library requests an executable stack.
Starting with glibc 2.41, if the kernel rejects making the stack executable, the loader aborts with the error above.
Clearing the flag fixes the issue:

sudo patchelf --clear-execstack libaccdevaux.so
# Now python can import NEURON/CoreNEURON successfully.

Expected result
NVHPC runtime libraries should not require an executable stack, so CoreNEURON should load cleanly on glibc 2.41+ without manual patching.

Actual result
Import fails unless every copy of libaccdevaux.so is patched with --clear-execstack, or glibc < 2.41 is used.

Attachments

  • env.txt – output of uname -a, /etc/os-release, ldd --version
  • readelf.txt – full readelf -a libaccdevaux.so
  • strace.gz – strace log of failing import
  • fix_test.log – output after applying patchelf --clear-execstack

Impact
Blocks all GPU-enabled CoreNEURON users on bleeding-edge distros (Arch, Fedora 40, etc.) and any system shipping glibc 2.41 or later.

Workaround
Manually clear the exec-stack flag with patchelf or downgrade glibc. A corrected build of libaccdevaux.so would remove the need for workarounds.

Hi and welcome!

Yes, we are aware of the issue and will look to address it as we add support for these newer OSs.

The list of supported platforms can be found in the NVHPC Release Notes.

Thanks,
Mat