monogon-dev / monogon

The Monogon Monorepo. May contain traces of peanuts and a ✨pure Go Linux userland✨. Work in progress!
https://monogon.tech
Apache License 2.0
378 stars 9 forks source link

Re-enable Go race detector #76

Open q3k opened 3 years ago

q3k commented 3 years ago

We currently test without the Go race detector enabled. That's because the Go race detector depends on cgo, and our cgo/musl integration currently doesn't work (as cgo calls our gcc wrapper from a nested directory within execroot, but our gcc wrapper / sysroot makes assumptions that we always run from the execroot).

There might also also be some other complications like the race detector not working with musl - that will have to be investigated.

We could also just enable the race detector for host go_test targets, and nothing else.

leoluk commented 3 years ago

Upstream bugs:

q3k commented 2 years ago

We should at least re-enable it when running host tests, which shouldn't depend on the above two bugs being fixed.

q3k commented 1 month ago

Letting someone else deal with this. This will either require waiting for the Go race detector to work without CGO, or getting CGO to work.

There's some early work in https://review.monogon.dev/c/monogon/+/1833 ; good luck.