google / gvisor

Application Kernel for Containers
https://gvisor.dev
Apache License 2.0
15.63k stars 1.29k forks source link

TestDiscardsUDPPacketsWithMcastSourceAddressV6 is flaky #3793

Closed tamird closed 4 years ago

tamird commented 4 years ago

See https://source.cloud.google.com/results/invocations/ac5955dc-c302-4db0-a5b1-08cc51eedbb5/targets/bazel-testlogs%2Ftest%2Fpacketimpact%2Ftests%2Fudp_discard_mcast_source_addr_netstack_test/tests, which happened on a totally unrelated change (https://github.com/google/gvisor/pull/3792).

=== RUN   TestOne
    TestOne: packetimpact_test.go:315: test error: process terminated with status: 1, expect failure: false

        ====== Begin of DUT Logs ======

        posix_server is starting.
        Got IP 0.0.0.0 and port 40000.
        Server listening on 0.0.0.0:40000

        ====== End of DUT Logs ======

        ====== Begin of Testbench Logs ======

        --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6 (3.30s)
            --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6/srcaddr=fe01::42 (0.04s)
                udp_discard_mcast_source_addr_test.go:90: Recv got unexpected result, ret=0, payload="", errno=transport endpoint is not connected
        FAIL

        ====== End of Testbench Logs ======
--- FAIL: TestOne (47.20s)

Interestingly this happened on only one of the test cases. In any event, the error doesn't make any sense, and suggests that there's a bug in the test server (unsychronized access to errno?).

@jayzhuang can you take a look?

tamird commented 4 years ago

Another kind of flake on the same test https://source.cloud.google.com/results/invocations/018807ef-5d7a-4612-aa54-157062acbc71/targets/bazel-testlogs%2Ftest%2Fpacketimpact%2Ftests%2Fudp_discard_mcast_source_addr_netstack_test/tests

=== RUN   TestOne
    TestOne: packetimpact_test.go:315: test error: process terminated with status: 1, expect failure: false

        ====== Begin of DUT Logs ======

        posix_server is starting.
        Got IP 0.0.0.0 and port 40000.
        Server listening on 0.0.0.0:40000

        ====== End of DUT Logs ======

        ====== Begin of Testbench Logs ======

        --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6 (3.32s)
            --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6/srcaddr=fe01::42 (0.04s)
                udp_discard_mcast_source_addr_test.go:90: Recv got unexpected result, ret=0, payload="", errno=errno 0
        FAIL

        ====== End of Testbench Logs ======
--- FAIL: TestOne (48.64s)