Featuretests test data race/panic due to Testing.Log called after test finishes #6055
Labels
kind/failing-test
Categorizes issue or PR as related to a consistently or frequently failing test.
kind/flake
Categorizes issue or PR as related to a flaky test.
See test runs:
Tests have a data race/panic because
Testing.Logf
is called after the test endsThe offending call comes from here:
contour/internal/xds/v3/contour.go
Line 88 in 8d63b86
We set up and wait for teardown of the Contour gRPC server here:
contour/internal/featuretests/v3/featuretests.go
Lines 162 to 211 in 8d63b86
GracefulStop()
andServe
should be waiting for all server handler goroutines to exit before returning, the test cleanup function should then be waiting for these to return before letting the test end, e.g.contour/internal/featuretests/v3/extensionservice_test.go
Lines 427 to 428 in 8d63b86
However as can be seen in the tests above, this is not strictly the case, it seems the server is allowed to exit before some of the handlers fully return. Repro by running
make check-test-race
, modified with-count=50
(we can exacerbate this by adding a sleep to thedone
function in the contour xDS server).This issue seems to have popped up post bumping grpc-go to 1.60.0+, I cannot repro it on 1.59.0
Ironically, this was an issue that was supposedly addressed in 1.60.0:
The text was updated successfully, but these errors were encountered: