Skip to content

[Bug]: Segfault (SIGSEGV) in scene.build() with an articulated robot on AMD gfx942 (CDNA3 / MI300-class), works on gfx950 (CDNA4 / MI350) #2962

Description

@ZJLi2013

Bug Description

Summary

Building any scene that contains a robot with convex-decomposed collision
geometry (e.g. the bundled Franka Panda) crashes the process with a bare
SIGSEGV (exit code 139, no Python traceback)
during scene.build() on an
AMD Instinct MI300X (gfx942, CDNA3) GPU.

The exact same image, code, and Genesis/Quadrants versions run fine on an AMD
Instinct MI350 (gfx950, CDNA4)
. The crash is therefore architecture
specific to gfx942
, and is independent of box_box_detection and
use_gjk_collision (both toggles still crash at the same point).

A scene with only primitives (plane + box), with or without cameras and
rendering, builds and steps fine on the same gfx942 GPU — so general GPU kernel
codegen works. The crash only appears once a robot's convex collision geometry
is added.

This looks like the same class of LLVM ISel / codegen failure previously
reported in #2570 for the convex collision kernel on CDNA3, resurfacing on a
different code path with current versions.

Minimal reproduction

Pure Genesis, no third-party code, using the bundled Franka MJCF:

import genesis as gs

gs.init(backend=gs.gpu, logging_level="warning")
scene = gs.Scene(show_viewer=False)
scene.add_entity(gs.morphs.Plane())
scene.add_entity(gs.morphs.MJCF(file="xml/franka_emika_panda/panda.xml"))
print("ENTITIES_ADDED", flush=True)
scene.build()                      # <-- SIGSEGV here on gfx942
print("BUILD_OK", flush=True)
for _ in range(10):
    scene.step()
print("STEP_OK", flush=True)

Run inside the ROCm container:

python -u franka_baseline.py ; echo "EXIT=$?"

Observed behavior (gfx942)

Process dies with exit code 139 right after the neutral-config
self-collision filtering, with no Python traceback:

[Genesis] [WARNING] (MJCF) Approximating tendon by joint actuator for `finger_joint1`
[Genesis] [WARNING] (MJCF) Approximating tendon by joint actuator for `finger_joint2`
[Genesis] [WARNING] Neutral robot position (qpos0) exceeds joint limits.
[Genesis] [WARNING] Constraint solver time constant should be greater than 2*substep_dt.
                    timeconst is changed from `0.005` to `0.00833333`.
[Genesis] [WARNING] Filtered out geometry pairs causing self-collision for the
                    neutral configuration (qpos0): (6, 11), (7, 11), (14, 21),
                    (15, 20), (16, 23), (17, 22).
<process exits 139 — SIGSEGV, no traceback, "BUILD_OK" never printed>

STEP_OK / BUILD_OK are never reached.

Workarounds already ruled out (all still SIGSEGV at the same point, gfx942)

Attempt Result
RigidOptions(box_box_detection=False) (the #2570 workaround) still exit 139
RigidOptions(use_gjk_collision=True) still exit 139
Plane + Box only (no robot) OK (build + step)
Plane + Box + 2 cameras + cam.render() OK (build + render)

Hardware / version matrix

Same image, same package versions; only the GPU differs:

GPU Arch Family scene.build() with Franka Source
AMD Instinct MI300X gfx942 CDNA3 SIGSEGV (exit 139) this report (minimal repro)
AMD Instinct MI350 gfx950 CDNA4 OK prior full-pipeline runs on this node

Environment

Component Version
Genesis 1.0.0
Quadrants 0.8.0
ROCm (container) 7.2.0
HIP 7.2.26015-fc0010cf6a
AMD clang / LLVM 22.0.0git (roc-7.2.0, 26014, 7b800a1)
PyTorch 2.10.0+rocm7.2.0
NumPy 2.2.6
Python 3.13
OS Ubuntu 24.04.4 LTS
Base image rocm/pytorch:rocm7.2_ubuntu24.04_py3.13_pytorch_release_2.10.0
Host ROCm 6.3.2-66

Questions

  1. Is the convex collision narrow-phase kernel expected to codegen on gfx942
    with LLVM 22 / ROCm 7.2? Is there a known-good Genesis/Quadrants combination
    for CDNA3?
  2. Is there a runtime/codegen flag to work around the gfx942 ISel crash short
    of changing GPU?

Steps to Reproduce

Minimal reproduction

Pure Genesis, no third-party code, using the bundled Franka MJCF:

import genesis as gs

gs.init(backend=gs.gpu, logging_level="warning")
scene = gs.Scene(show_viewer=False)
scene.add_entity(gs.morphs.Plane())
scene.add_entity(gs.morphs.MJCF(file="xml/franka_emika_panda/panda.xml"))
print("ENTITIES_ADDED", flush=True)
scene.build()                      # <-- SIGSEGV here on gfx942
print("BUILD_OK", flush=True)
for _ in range(10):
    scene.step()
print("STEP_OK", flush=True)

Run inside the ROCm container:

python -u franka_baseline.py ; echo "EXIT=$?"

Expected Behavior

no build error

Screenshots/Videos

No response

Relevant log output

Environment

GPU Arch Family scene.build() with Franka Source
AMD Instinct MI300X gfx942 CDNA3 SIGSEGV (exit 139) this report (minimal repro)
AMD Instinct MI350 gfx950 CDNA4 OK prior full-pipeline runs on this node

Release version or Commit ID

Environment

Component Version
Genesis 1.0.0
Quadrants 0.8.0
ROCm (container) 7.2.0
HIP 7.2.26015-fc0010cf6a
AMD clang / LLVM 22.0.0git (roc-7.2.0, 26014, 7b800a1)
PyTorch 2.10.0+rocm7.2.0
NumPy 2.2.6
Python 3.13
OS Ubuntu 24.04.4 LTS
Base image rocm/pytorch:rocm7.2_ubuntu24.04_py3.13_pytorch_release_2.10.0
Host ROCm 6.3.2-66

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions