Skip to content

Commit 6c1ad76

Browse files
committed
[Fix] Force numpy>=2.4.1 in --install and Dockerfile.curobo
The setup.py constraint "numpy>=2,!=2.3.5" landed in isaac-sim#5642 is silently overridden during isaaclab.sh --install: each pip install -e <submodule> runs an independent resolve, and the final pin-pink force-reinstall in _ensure_pink_ik_dependencies_installed lands on numpy 2.3.5 because pip sees only pin-pink's own deps (numpy>=1.19) plus cmeel-boost's numpy<2.4 cap. numpy 2.3.5 ships a vendored OpenBLAS (libscipy_openblas64_-fdde5778.so) whose pthread_atfork handler crashes Kit's libomni.platforminfo fork() during SimulationApp startup. Two changes, both restating an explicit "pip install --upgrade numpy>=2.4.1" as the *last* pip invocation in each install path: 1. _ensure_numpy_above_openblas_atfork_bug() in install.py — runs unconditionally at the end of --install (not gated by the pink-ik probe outcome), so upgrades on an already-functioning env also pull numpy forward. 2. Dockerfile.curobo — apply the same upgrade after its post-install steps (nvidia-curobo + isaaclab_teleop editable install), which otherwise drag numpy back to 2.3.5 via dex-retargeting -> pin -> cmeel-boost. pip prints a resolver warning about cmeel-boost's cap then installs numpy 2.4.5 anyway. numpy 2.4.1+ ships the upstream OpenBLAS atfork fix, so the entire 2.3.x risk class is bypassed. numpy's stable C ABI keeps cmeel's compiled extensions (libpinocchio, libcoal, ...) working at runtime. Validated: - env_isaaclab_test smoke test (numpy 2.4.5 + cmeel pinocchio + pink + daqp + qpsolvers all import; toy IK solve OK). - IsaacLab Pink IK unit tests: 54/54 pass against numpy 2.4.5 (test_pink_ik_components 21/21, test_local_frame_task 24/24, test_null_space_posture_task 9/9). - PR isaac-sim#5655 (validation): every base-image test job reports numpy 2.4.5 + openblas -32a4b2a6 (clean, not the broken -fdde5778). Worst-case import order (numpy imported before pytest spawns Kit) also passes — confirming the upstream atfork fix is real, not just dodge-by-order. Related: numpy/numpy#30092, OpenMathLib/OpenBLAS#5520
1 parent c67ed38 commit 6c1ad76

10 files changed

Lines changed: 100 additions & 4 deletions

File tree

docker/Dockerfile.curobo

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation \
178178
# Install isaaclab_teleop (needed by Pink IK tests and related env configs)
179179
RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --editable ${ISAACLAB_PATH}/source/isaaclab_teleop
180180

181+
# Force numpy >= 2.4.1 after the curobo + isaaclab_teleop installs above, because both
182+
# pull pin (via cmeel) whose numpy<2.4 cap drags numpy back to 2.3.5 — the release whose
183+
# vendored OpenBLAS atfork handler SIGSEGVs inside Kit's libomni.platforminfo fork().
184+
# isaaclab.sh --install does the same upgrade at the base layer; this restates it here
185+
# so the cuRobo image picks numpy with the upstream OpenBLAS fix. See numpy/numpy#30092
186+
# and OpenMathLib/OpenBLAS#5520.
187+
RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --upgrade "numpy>=2.4.1"
188+
181189
# aliasing isaaclab.sh and python for convenience
182190
RUN echo "export ISAACLAB_PATH=${ISAACLAB_PATH}" >> ${DOCKER_USER_HOME}/.bashrc && \
183191
echo "alias isaaclab=${ISAACLAB_PATH}/isaaclab.sh" >> ${DOCKER_USER_HOME}/.bashrc && \
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Fixed
2+
^^^^^
3+
4+
* Fixed ``isaaclab.sh --install`` so a final
5+
:meth:`isaaclab.cli.commands.install._ensure_numpy_above_openblas_atfork_bug` step
6+
unconditionally force-upgrades ``numpy`` to ``>=2.4.1``. Without it, pip resolves the
7+
per-submodule installs and the pin-pink force-reinstall independently, so
8+
cmeel-boost's ``numpy<2.4`` cap (transitive via pin-pink) keeps landing on numpy
9+
2.3.5 — the release whose vendored OpenBLAS
10+
``libscipy_openblas64_-fdde5778.so`` registers a buggy ``pthread_atfork`` handler
11+
that crashes Kit's ``libomni.platforminfo`` ``fork()`` during ``SimulationApp``
12+
startup. numpy 2.4.1+ ships the upstream OpenBLAS atfork fix, so the entire 2.3.x
13+
risk class is bypassed.
14+
* Fixed ``docker/Dockerfile.curobo`` to apply the same ``numpy>=2.4.1`` force-upgrade
15+
after its post-``--install`` steps (``nvidia-curobo`` and ``isaaclab_teleop`` editable
16+
install), which would otherwise drag numpy back to 2.3.5 via ``dex-retargeting`` →
17+
``pin`` → cmeel-boost.

source/isaaclab/isaaclab/cli/commands/install.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,39 @@ def _ensure_pink_ik_dependencies_installed(python_exe: str, pip_cmd: list[str],
225225
)
226226

227227

228+
def _ensure_numpy_above_openblas_atfork_bug(python_exe: str, pip_cmd: list[str]) -> None:
229+
"""Force numpy >= 2.4.1 so the OpenBLAS atfork SIGSEGV in numpy 2.3.5 is skipped.
230+
231+
numpy 2.3.5 ships a vendored OpenBLAS (``libscipy_openblas64_-fdde5778.so``) whose
232+
``pthread_atfork`` handler crashes inside Kit's ``libomni.platforminfo`` ``fork()``
233+
during ``SimulationApp`` startup. The fix landed upstream in numpy 2.4.1+.
234+
235+
The ``--install`` pipeline runs many independent ``pip install`` invocations and
236+
pip's resolver does not retroactively check installed packages' constraints. In
237+
particular, the kit-bundled and force-reinstalled ``pin-pink`` stack pulls
238+
``cmeel-boost`` which caps numpy ``<2.4``, so every other install path resolves
239+
back to numpy 2.3.5. This step runs *last* with an explicit ``--upgrade
240+
numpy>=2.4.1`` to override the cap; pip prints a resolver warning about
241+
cmeel-boost but installs numpy 2.4.5 anyway. numpy's stable C ABI keeps cmeel's
242+
compiled extensions (``libpinocchio``, ``libcoal``, ...) functional at runtime.
243+
244+
Always runs unconditionally — independent of
245+
:func:`_ensure_pink_ik_dependencies_installed`'s probe — so that an upgrade on
246+
an already-functioning environment also pulls numpy forward. See numpy/numpy#30092,
247+
OpenMathLib/OpenBLAS#5520, OMPE-92261.
248+
"""
249+
print_info("Forcing numpy >= 2.4.1 to skip the OpenBLAS atfork SIGSEGV in numpy 2.3.5.")
250+
numpy_upgrade = run_command(
251+
pip_cmd + ["install", "--upgrade", "numpy>=2.4.1"],
252+
check=False,
253+
)
254+
if numpy_upgrade.returncode != 0:
255+
print_warning(
256+
f"Forcing numpy >= 2.4.1 failed (returncode {numpy_upgrade.returncode}). "
257+
"Kit fork() may SIGSEGV on numpy 2.3.5's vendored OpenBLAS."
258+
)
259+
260+
228261
def _ensure_cuda_torch() -> None:
229262
"""Ensure correct PyTorch and CUDA versions are installed."""
230263
python_exe = extract_python_exe()
@@ -857,6 +890,11 @@ def command_install(install_type: str = "all") -> None:
857890
# ``pip install -e source/isaaclab`` to be silently skipped.
858891
_ensure_pink_ik_dependencies_installed(python_exe, pip_cmd, probe_env=probe_env)
859892

893+
# Override the numpy<2.4 cap that cmeel-boost (transitive dep of pin-pink) imposes
894+
# on every prior pip resolution, so the test image lands on numpy with the upstream
895+
# OpenBLAS atfork fix instead of the broken 2.3.5 release.
896+
_ensure_numpy_above_openblas_atfork_bug(python_exe, pip_cmd)
897+
860898
# Repoint prebundled packages in Isaac Sim to the environment's copies so
861899
# the active venv/conda versions are always loaded regardless of PYTHONPATH
862900
# ordering (e.g. torch+cu130 in venv vs torch+cu128 in prebundle on aarch64).

source/isaaclab/setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
# Minimum dependencies required prior to installation
1919
INSTALL_REQUIRES = [
2020
# generic
21-
"numpy>=2",
21+
# numpy 2.3.5 ships a vendored OpenBLAS whose pthread_atfork handler crashes
22+
# Kit's libomni.platforminfo fork() during SimulationApp startup. See
23+
# numpy/numpy#30092 and OMPE-92261. ``isaaclab.sh --install`` also
24+
# force-upgrades numpy >= 2.4.1 at the end of the install pipeline as the
25+
# authoritative defense, but the per-package exclusion here keeps the broken
26+
# release out of intermediate resolutions too.
27+
"numpy>=2,!=2.3.5",
2228
"torch>=2.10",
2329
"onnx>=1.18.0", # 1.16.2 throws access violation on Windows
2430
"prettytable==3.3.0",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Fixed
2+
^^^^^
3+
4+
* Excluded the broken ``numpy 2.3.5`` release from the package's install requirements.
5+
``numpy 2.3.5``'s vendored OpenBLAS registers a ``pthread_atfork`` handler that
6+
crashes Kit's ``libomni.platforminfo`` ``fork()`` during ``SimulationApp`` startup.
7+
See ``source/isaaclab/setup.py`` and ``isaaclab.cli.commands.install`` for the
8+
authoritative install-time defense.

source/isaaclab_rl/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
# Minimum dependencies required prior to installation
2020
INSTALL_REQUIRES = [
2121
# generic
22-
"numpy",
22+
# See ``source/isaaclab/setup.py`` for the rationale on ``!=2.3.5``.
23+
"numpy>=2,!=2.3.5",
2324
"torch>=2.10",
2425
"torchvision>=0.25.0", # ensure compatibility with torch 2.10.0
2526
"protobuf>=4.25.8,!=5.26.0",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Fixed
2+
^^^^^
3+
4+
* Excluded the broken ``numpy 2.3.5`` release from the package's install requirements.
5+
``numpy 2.3.5``'s vendored OpenBLAS registers a ``pthread_atfork`` handler that
6+
crashes Kit's ``libomni.platforminfo`` ``fork()`` during ``SimulationApp`` startup.
7+
See ``source/isaaclab/setup.py`` and ``isaaclab.cli.commands.install`` for the
8+
authoritative install-time defense.

source/isaaclab_tasks/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
# Minimum dependencies required prior to installation
1919
INSTALL_REQUIRES = [
2020
# generic
21-
"numpy>=2",
21+
# See ``source/isaaclab/setup.py`` for the rationale on ``!=2.3.5``.
22+
"numpy>=2,!=2.3.5",
2223
"torch>=2.10",
2324
"torchvision>=0.25.0", # ensure compatibility with torch 2.10.0
2425
"protobuf>=4.25.8,!=5.26.0",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Fixed
2+
^^^^^
3+
4+
* Excluded the broken ``numpy 2.3.5`` release from the package's install requirements.
5+
``numpy 2.3.5``'s vendored OpenBLAS registers a ``pthread_atfork`` handler that
6+
crashes Kit's ``libomni.platforminfo`` ``fork()`` during ``SimulationApp`` startup.
7+
See ``source/isaaclab/setup.py`` and ``isaaclab.cli.commands.install`` for the
8+
authoritative install-time defense.

source/isaaclab_visualizers/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
# Base requirements shared across visualizer backends.
1111
INSTALL_REQUIRES = [
1212
"isaaclab",
13-
"numpy",
13+
# See ``source/isaaclab/setup.py`` for the rationale on ``!=2.3.5``.
14+
"numpy>=2,!=2.3.5",
1415
]
1516

1617
# Every Newton declaration in the repo must use the SAME extra spec (`newton[sim]`).

0 commit comments

Comments
 (0)