Skip to content

Fix FIPS selftest crash by pinning opencv-python-headless#96

Merged
mattshax merged 2 commits intomainfrom
fix/fips-opencv-openssl-crash
Feb 9, 2026
Merged

Fix FIPS selftest crash by pinning opencv-python-headless#96
mattshax merged 2 commits intomainfrom
fix/fips-opencv-openssl-crash

Conversation

@mattshax
Copy link
Member

@mattshax mattshax commented Feb 9, 2026

Summary

  • Root cause: opencv-python-headless >=4.13 bundles a FIPS-enabled OpenSSL 1.1.1k from CentOS/RHEL. On FIPS-enabled HPC hosts, Singularity exposes the host's /proc/sys/crypto/fips_enabled=1, triggering a fatal FIPS selftest failure (crypto/fips/fips.c:154) when OpenCV is imported during vllm serve.
  • Fix: Pin opencv-python-headless==4.12.0.88 which does not bundle OpenSSL.
  • Cleanup: Remove ineffective FIPS workarounds from both Singularity containers (OPENSSL_CONF=/dev/null, OPENSSL_FORCE_FIPS_MODE=0, reinstalling system OpenSSL, rebuilding cryptography from source) — none of these targeted the actual culprit.

Refs: opencv/opencv-python#1184, opencv/opencv-python#1191

Test plan

  • Rebuild vllm.sif from updated Singularity.vllm
  • Run singularity exec vllm.sif vllm serve on a FIPS-enabled host — should no longer crash
  • Run singularity exec vllm.sif python3 -c "import cv2; print(cv2.__version__)" — should print 4.12.0.88
  • Rebuild rag.sif from updated Singularity.rag and verify it starts normally

Replace bare `git lfs pull` (which downloads all LFS files including
duplicate .bin weights) with sparse checkout + targeted LFS fetch.
This prevents hanging on large models by excluding .bin/.gguf/.onnx
files, adding progress output, retry logic, and concurrent transfer
configuration. Falls back to .bin if no safetensors are found.
opencv-python-headless >=4.13 bundles a FIPS-enabled OpenSSL 1.1.1k
from CentOS/RHEL. On FIPS-enabled HPC hosts (where Singularity exposes
/proc/sys/crypto/fips_enabled=1), this bundled library triggers a fatal
FIPS selftest failure at import time, crashing vllm serve.

Pin to 4.12.0.88 which does not bundle OpenSSL.

Also remove ineffective FIPS workarounds from both containers:
- OPENSSL_CONF=/dev/null (targeted system OpenSSL 3.0.2, not the culprit)
- OPENSSL_FORCE_FIPS_MODE=0 (not a real OpenSSL variable)
- apt-get reinstall libssl-dev openssl (wrong library)
- pip rebuild cryptography from source (unnecessary)

Refs: opencv/opencv-python#1184
Refs: opencv/opencv-python#1191
@mattshax mattshax merged commit fbcfda3 into main Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant