-
Notifications
You must be signed in to change notification settings - Fork 117
Description
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.