Running pip install flash-attn without MAX_JOBS on a multi-core box
Ninja spawns dozens of parallel nvcc/cicc processes that eat 100+ GB of RAM and fail mid-compile.
Operator task guide
Three environment failures kill training pipelines before or mid-epoch: FlashAttention C++/CUDA ABI mismatches (error compiling objects for extension or undefined symbol), DataLoader worker crashes (exited unexpectedly from /dev/shm Bus error or host RAM OOM), and DeepSpeed nvcc/ZeRO-3 initialization errors.
Check exact PyTorch C++11 ABI and CUDA toolkit versions before building wheels, size container /dev/shm cleanly using our DataLoader SHM calculator, and separate host cgroup OOM kills from CUDA VRAM exhaustion when running ZeRO-3 CPU offload.
Reviewed . Reference guidance is not a diagnosis of your workload.
Verify nvcc version matches torch.version.cuda and check PyTorch _GLIBCXX_USE_CXX11_ABI before installing or compiling flash-attn, limiting MAX_JOBS so parallel nvcc processes do not OOM-kill host RAM.
python3 -c "import torch; print('torch:', torch.__version__, 'cuda:', torch.version.cuda, 'abi:', torch._C._GLIBCXX_USE_CXX11_ABI)"
nvcc --version
MAX_JOBS=4 pip install flash-attn --no-build-isolationCheck dmesg and /dev/shm inside the container. Signal 7 (SIGBUS) means /dev/shm filled up passing worker batches; Signal 9 (SIGKILL) means host RAM or container cgroup memory ran out.
df -h /dev/shm
dmesg -T | grep -iE 'Killed process|Out of memory|memory cgroup' | tail -n 20Run python3 -m deepspeed.env_report to check CUDA_HOME and ninja/nvcc availability. For ZeRO-3 OOM during model load, ensure the model is constructed inside deepspeed.zero.Init().
python3 -m deepspeed.env_report
which nvcc ninjaRe-run with matched DataLoader num_workers and persistent_workers settings, confirming zero worker restarts and steady host RSS across at least one checkpoint boundary.
| Signal | What it means | Next action |
|---|---|---|
| flash-attn undefined symbol (_ZN3c10...) | Wheel built with mismatched PyTorch version or CXX11 ABI. | Match prebuilt wheel to exact torch + CUDA + cxx11abi tag or compile with MAX_JOBS=4. |
| error compiling objects for extension / g++ killed | Host RAM exhausted by parallel nvcc jobs or wrong nvcc version. | Cap MAX_JOBS=2 or 4 and verify nvcc matches torch.version.cuda. |
| DataLoader worker pid N exited unexpectedly (Bus error) | Container /dev/shm (often 64 MB default) is exhausted. | Increase Docker --shm-size or K8s emptyDir memory size, or lower num_workers. |
| DataLoader worker exited with SIGKILL / no traceback | Python dataset caching or worker duplication exhausted host RAM. | Check sacct MaxRSS / dmesg OOM, avoid duplicating huge arrays per worker, lower num_workers. |
Ninja spawns dozens of parallel nvcc/cicc processes that eat 100+ GB of RAM and fail mid-compile.
DataLoader workers live in host RAM and /dev/shm, not GPU VRAM.
cxx11abiTRUE vs cxx11abiFALSE mismatches compile/install cleanly and crash at import with undefined symbol.
Fix CUDA_HOME, MAX_JOBS, and ABI mismatches.
Size container shared memory for num_workers and batch tensors.
Match PyTorch, CUDA, Python, and driver versions.
Fix ZeRO-3 init OOMs, offload kills, and inflight parameter asserts.
Usually either nvcc does not match torch.version.cuda, CUDA_HOME is unset, or unrestricted parallel compilation exhausted host RAM (fix by setting MAX_JOBS=4).
The installed flash-attn wheel was compiled against a different PyTorch version or _GLIBCXX_USE_CXX11_ABI setting. Print torch._C._GLIBCXX_USE_CXX11_ABI and install the matching wheel.
Most crashes are either SIGBUS from a tiny 64 MB container /dev/shm or SIGKILL from host RAM OOM when each worker duplicates large dataset metadata or images.
Wrap model construction inside with deepspeed.zero.Init(): (or initialize HfDeepSpeedConfig before from_pretrained) so weights partition as they load instead of materializing full-size on every GPU.
Get the likely cause, supporting evidence, and next safe steps with the same cloud reasoning used by paid plans. A crash the engine recognizes is answered in seconds, then checked by an independent AI review that updates this page when it finishes. A crash it does not recognize waits for the AI's own answer, which can take a few minutes. No account, card, or installation. Logs are masked at Denpex API ingress and are not saved to account history.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
No credit card. No automatic subscription. See whether Denpex helps with an incident you already understand.
Up to 50 diagnoses a day for 30 days. Verify your work email to activate an eligible company evaluation, then replay a resolved incident and compare the evidence and next steps with your team's confirmed cause.
Use the three free diagnoses to review your error and relevant evidence. Keep reference guidance separate from the cause and recovery status of your own workload.
Diagnose your incident