Skip to content

Segfaults when built with DL backend #3182

Closed
@vikanezrimaya

Description

@vikanezrimaya

Originally reported as NixOS/nixpkgs#409684, but then, during bisection, discovered that it's caused by an upstream change.

Bisection led me to commit 21d890d.

Reproduction

  1. cmake -B build -GNinja -DGGML_BACKEND_DL=TRUE
  2. ninja -C build
  3. build/bin/whisper-cli -m ~/ggml-base.en.bin -f samples/jfk.wav
  4. Observe a segfault caused by the most spectacular null pointer dereference I've ever seen 🤯
  5. rm -rf build (just in case)
  6. git revert --no-edit 21d890d53441a08e36992b0f68221f38b715789d
  7. cmake -B build . -GNinja -DGGML_BACKEND_DL=TRUE && ninja -C build && build/bin/whisper-cli -m ~/ggml-base.en.bin -f ./samples/jfk.wav
  8. Observe Whisper magically working again ✨

Notes

Well, obviously, reverting a commit that, on the other hand, improves Whisper.cpp's device support is a no-no. (This commit is part of #2863, which claims to expand aarch64 support.) But this clearly seems to be a bug.

Workarounds

Uh, don't build with the DL backend. But then I assume whisper.cpp gets locked into the architecture of the machine it was built on, whereas with the DL backend, one could use another CMake option to build shared libraries for several CPU types at once and, supposedly, choose the right one at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions