gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.69k stars 1.77k forks source link

`TestRootScript` flakiness #16908

Open nklaassen opened 2 years ago

nklaassen commented 2 years ago

Failure

Link(s) to logs

Relevant snippet

PASS
panic: Log in goroutine after TestRootScript has completed: Failed to run script: <nil>.

goroutine 246 [running]:
testing.(*common).logDepth(0xc0002a7520, {0xc000844560, 0x1c}, 0x3)
    /opt/go/src/testing/testing.go:894 +0x6d9
testing.(*common).log(...)
    /opt/go/src/testing/testing.go:876
testing.(*common).Logf(0xc0002a7520, {0x43a80a2, 0x19}, {0xc000e86fa0, 0x1, 0x1})
    /opt/go/src/testing/testing.go:927 +0xa5
github.com/gravitational/teleport/lib/bpf.TestRootScript.func1()
    /workspace/lib/bpf/bpf_test.go:246 +0x1da
created by github.com/gravitational/teleport/lib/bpf.TestRootScript
    /workspace/lib/bpf/bpf_test.go:237 +0x2f6
FAIL    github.com/gravitational/teleport/lib/bpf   6.409s
zmb3 commented 2 years ago

I'm not sure what the actual failure is about, but the panic above is due to calling require.NoError in a background goroutine, which is not allowed.

zmb3 commented 2 years ago

There's also a data race due to overwriting err from inside a goroutine, and a goroutine that runs an infinite loop that never terminates.

nklaassen commented 1 year ago

Got a new failure here, it seems we are failing the test outside of the main goroutine again https://github.com/gravitational/teleport/actions/runs/4493152265/jobs/7903987200?pr=23416

zmb3 commented 10 months ago

Likely still flaky, but disabled in #23428