Segmentation fault in background thread after successful synchronous inference (VStreams API), Hailo-8, HailoRT 4.24.0

Hi,

I’m hitting a 100% reproducible segfault on Hailo-8 with a simple synchronous single-shot inference script (load one HEF, configure, send one frame, receive outputs, exit). The output is computed and written to disk correctly, print() calls after inference execute fine — but the process still crashes with SIGSEGV afterward, in a background thread HailoRT spawns internally (~40-50 threads for a single synchronous call).

Environment

  • HailoRT: 4.24.0 (hailortcli --version and pip show hailort both confirm)

  • Firmware: 4.24.0 (release,app,extended context switch buffer)

  • Device: HAILO-8 AI ACC M.2 M KEY MODULE EXT TEMP (HAILO8 arch, PCIe)

  • Host: Ubuntu 22.04, inside the official Hailo AI Software Suite docker (hailo8_ai_sw_suite_2026-07)

  • hailo-tappas-core: 5.3.1

  • API: synchronous VStreams (InputVStreamParams/OutputVStreamParams/InputVStreams/OutputVStreams), not async InferModel

Minimal repro

python

import numpy as np
from hailo_platform import (HEF, VDevice, HailoStreamInterface, ConfigureParams,
                            InputVStreamParams, OutputVStreamParams, FormatType,
                            InputVStreams, OutputVStreams)

hef = HEF("scrfd_2.5g.hef")  # any HEF reproduces this
with VDevice() as vdev:
    group = vdev.configure(hef, ConfigureParams.create_from_hef(hef, interface=HailoStreamInterface.PCIe))[0]
    in_names = [i.name for i in group.get_input_vstream_infos()]
    out_names = [o.name for o in group.get_output_vstream_infos()]
    ip = InputVStreamParams.make_from_network_group(group, quantized=False, format_type=FormatType.FLOAT32)
    op = OutputVStreamParams.make_from_network_group(group, quantized=False, format_type=FormatType.FLOAT32)
    with group.activate():
        with InputVStreams(group, ip) as ivs, OutputVStreams(group, op) as ovs:
            dummy = np.zeros((1, 640, 640, 3), dtype=np.float32)
            ivs.get(in_names[0]).send(dummy)
            raw = {n: np.asarray(ovs.get(n).recv()) for n in out_names}

print("done, about to exit cleanly")

Run under gdb: gdb -batch -ex run -ex bt --args python3 repro.py

Backtrace

Thread 29 "python3" received signal SIGSEGV, Segmentation fault.
0x00007fffce3c5d87 in ?? () from /lib/libhailort.so.4.24.0
#0  0x00007fffce3c5d87 in ?? () from /lib/libhailort.so.4.24.0
#1  0x00007fffce5a2248 in ?? () from /lib/libhailort.so.4.24.0
#2  0x00007fffce5780d2 in ?? () from /lib/libhailort.so.4.24.0
#3  0x00007fffce59493f in ?? () from /lib/libhailort.so.4.24.0
#4  0x00007fffce59637c in ?? () from /lib/libhailort.so.4.24.0
#5  0x00007fffcfa54ca6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff7cf2a83 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#7  0x00007ffff7d848e0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

libhailort.so.4.24.0 has no dynamic symbols exported (info symbol $pc returns nothing for all 5 frames), so I can’t resolve which internal function this is.

Already ruled out

  • Not scheduling_algorithm: identical backtrace with ROUND_ROBIN explicitly set and with it removed (default NONE).

  • Not VDevice lifecycle: identical backtrace bare vs. wrapped in with for deterministic teardown.

  • Not my post-processing code: the crashing thread’s stack has zero Python frames, and the crash happens after the output is already written correctly.

Possibly related (different exact trigger — a 1-minute idle timeout in a callback queue, vs. my immediate post-inference crash — but same shape: UB in an internal background thread): https://community.hailo.ai/t/segmentation-fault-std-bad-function-call-while-idling/2639

I’m on Hailo-8 so can’t test whether this reproduces on 5.x. Happy to provide the HEF, more gdb output, or test a suggested patch.