Skip to content

SIGSEGV on Netbsd #186

@AlexanderSchuetz97

Description

@AlexanderSchuetz97

There appears to be threading problems on netbsd.

libloading causes a segfault when running cargo test.
The segfault is sporadic, it only happens about 80% of times.

To run the tests without segfaults one has to pass "-- --test-threads=1" and disable the one test that itself spawn 16 threads.

uname -a from a physical netbsd machine where this occured:

NetBSD nbsd10 10.0 NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

It is reproducible in a VM too aswell as with different versions of netbsd.

If further investigation concludes that this is indeed a threading problem then
a potencial solution to this would be to have a global lock (std) or spinlock (no-std) for netbsd.
Let me know what you think about this.

This is very low priority for me because I have a global spinlock around libloading for all platforms in all of my code anyways.
I only ran into this when executing libloading's own tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions