Skip to content

Segmentation fault on startup — RAG embeddings warmup crashes on AMD Radeon 8060S (gfx1100) / ROCm 6.3 #7331

Closed

Description

@LuckyPhil631

Note: Please do not remove the questions. Answer beside them.

  1. Did you update? pip install --upgrade unsloth unsloth_zoo — Yes, fresh install via curl -fsSL https://unsloth.ai/install.sh | sh today (2026.7.4)
  2. Colab or Kaggle or local / cloud — Local
  3. Number GPUs used, use nvidia-smi — 1 GPU (AMD, not NVIDIA — nvidia-smi not applicable). rocminfo shows: AMD Ryzen AI MAX+ 395 w/ Radeon 8060S, gfx1100, ROCm HIP 6.3.42134
  4. Which notebook? Please link! — Not using a notebook. Running Unsloth Studio via unsloth studio -p 8888 on Linux Mint desktop.
  5. Which Unsloth version, TRL version, transformers version, PyTorch version? — Unsloth: 2026.7.4 | Transformers: 5.10.2 | PyTorch: 2.9.1+rocm6.3 | TRL: installed via Unsloth Studio installer
  6. Which trainer? SFTTrainer, GRPOTrainer etc — Not reached training yet. Studio crashes on startup before any trainer is selected, in the RAG embeddings warmup thread (studio/backend/core/rag/embeddings.py → SentenceTransformer.init → .to(device) → segfault)

Minimal reproduction: Unsloth Studio RAG embeddings warmup segfault on AMD ROCm

No HF token needed — crash happens before any model is loaded from HF

Environment:

OS: Linux Mint

GPU: AMD Radeon 8060S (gfx1100), integrated/unified memory, 128GB RAM

ROCm: 6.3.0

PyTorch: 2.9.1+rocm6.3

Unsloth: 2026.7.4

To reproduce:

1. Install Unsloth Studio: curl -fsSL https://unsloth.ai/install.sh | sh

2. Create /opt/rocm symlink if not present: sudo ln -s /opt/rocm-6.3.0 /opt/rocm

3. Run: unsloth studio -p 8888

Studio starts, server comes up, then segfaults in background thread

The crash can also be reproduced directly:

from sentence_transformers import SentenceTransformer
import torch

model = SentenceTransformer("all-MiniLM-L6-v2")
model.to("cuda") # .to(device) on AMD ROCm GPU causes segfault

Expected: model moves to GPU

Actual: Segmentation fault (core dumped)


🦥 You can also ask via our Reddit page: https://reddit.com/r/unsloth/

Activity

  1. VectorCipher commented on Jul 24, 2026

    @VectorCipher
    Contributor

    Thanks for the detailed reproduction!

    Since the segmentation fault can be reproduced with the minimal example below, without importing or using Unsloth:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("all-MiniLM-L6-v2")
    model.to("cuda")

    it seems the crash is occurring outside of Unsloth itself. Based on the reproduction, this looks more likely to be related to the PyTorch ROCm/HIP stack, SentenceTransformers, or the underlying AMD GPU runtime rather than Unsloth Studio.

    It may be worth checking whether the same minimal script reproduces across different PyTorch/ROCm versions, or reporting it upstream if it consistently crashes outside of Unsloth.

  2. LuckyPhil631 commented on Jul 28, 2026

    @LuckyPhil631
    Author
  3. VectorCipher commented on Jul 28, 2026

    @VectorCipher
    Contributor

    Thanks for investigating this and for narrowing it down!

    The fact that the same segmentation fault occurs with a minimal SentenceTransformer example outside of Unsloth Studio is a very useful data point. That suggests the issue is likely in the ROCm/PyTorch stack for gfx1151 rather than in Unsloth Studio itself.

    Since:

    • torch.cuda.is_available() returns True
    • the GPU is detected correctly
    • the crash occurs with a standalone PyTorch script
    • the same behavior has been reported for Strix Halo (gfx1151) with ROCm 6.3

    this does appear consistent with the known ROCm compatibility issue you referenced.

    Could one of the maintainers clarify:

    • Is there currently an Unsloth Studio build that bundles PyTorch + ROCm 7.2 (or newer) with support for gfx1151?
    • If not, is there a recommended way to replace the bundled PyTorch/ROCm runtime with a newer version for testing?
    • Is official support for Strix Halo (gfx1151) planned in a future Unsloth Studio release?

    The minimal reproducer below may also help confirm the issue:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("all-MiniLM-L6-v2")
    model.to("cuda")

    If this crashes in the bundled environment as well, it would further indicate that the issue lies upstream in the current ROCm/PyTorch stack rather than in Unsloth Studio itself.

  4. LuckyPhil631 commented on Jul 31, 2026

    @LuckyPhil631
    Author
  5. LuckyPhil631 commented on Aug 1, 2026

    @LuckyPhil631
    Author
  6. LuckyPhil631 commented on Aug 1, 2026

    @LuckyPhil631
    Author
  7. danielhanchen commented on Aug 13, 2026

    @danielhanchen
    Member

    For anyone landing here from search: the second half of this landed in #8609.

    #8480 stopped the mismatched ROCm wheel from being installed, which is what fixed the crash for the reporter here. #8609 handles the other half, that a mismatched wheel took the whole backend down rather than degrading: the RAG embedder now tests the device in a short-lived child process first, so a driver-level fault kills the probe instead of uvicorn, and the embedder falls back to CPU sentence-transformers with the same vector space, so no knowledge base needs reindexing.

    Detection is unaffected, since on this host torch.cuda.is_available() returned True and only the first real allocation died.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions