Skip to content

device.init purego dlopen SIGSEGV on darwin crashes any importing test binary (Go 1.26.2, ztensor v1.19.0) #171

Description

@dndungu

Found during zerfoo Phase 0 work (zerfoo T129.1, PR zerfoo#916): on a darwin dev host with Go 1.26.2 and ztensor v1.19.0, ANY test binary that imports the compute/device path crashes at process startup inside device.init (purego dlopen SIGSEGV) — before any test runs, so even tests that would Skip on non-GPU hosts cannot run.

Reproduces on zerfoo main with pre-existing tests (tests/training bf16/gemma3 suites) and with the new fixture file removed — pre-existing and framework-wide on darwin, NOT introduced by the new test.

On Linux CI the same path is clean: device.init returns, NewGPUEngine errors gracefully, tests Skip as designed.

Impact: darwin developers cannot run any test package that transitively imports ztensor device init; zerfoo's tests/training is fully broken on mac hosts.

Suggested angle: guard the darwin dlopen probe (missing library should yield a clean 'no GPU' error, not a SIGSEGV in init).

Severity: dev-experience (no production impact); worth fixing before Phase 2 external contributors hit it on macs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions