You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We seem to get a lot of found unexpected goroutines errors in the integration tests lately.
For example:
=== NAME Test_EventsDependencies
dependencies_test.go:158: found unexpected goroutines:
[Goroutine 13 in state chan send, 1 minutes, with github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1.1 on top of the stack:
github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1.1()
/home/runner/work/tracee/tracee/tests/testutils/exec.go:141 +0xcd
created by github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1 in goroutine 12
/home/runner/work/tracee/tracee/tests/testutils/exec.go:136 +0x2c6
Goroutine 127 in state chan send, 1 minutes, with github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1.1 on top of the stack:
github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1.1()
/home/runner/work/tracee/tracee/tests/testutils/exec.go:141 +0xcd
created by github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1 in goroutine 126
/home/runner/work/tracee/tracee/tests/testutils/exec.go:136 +0x2c6
Goroutine 243 in state chan send, with github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1.1 on top of the stack:
github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1.1()
/home/runner/work/tracee/tracee/tests/testutils/exec.go:141 +0xcd
created by github.com/aquasecurity/tracee/tests/testutils.ExecCmdBgWithSudoAndCtx.func1 in goroutine 242
/home/runner/work/tracee/tracee/tests/testutils/exec.go:136 +0x2c6
]
It sabotages the efforts to merge PRs, so we should find its source.
The text was updated successfully, but these errors were encountered:
After looking into it, I think it is caused either by the capture tests or by the metrics tests which are using the ExecCmdBgWithSudoAndCtx function.
The function creates a goroutine that wait for the returned channel read.
However, if the channel won't be read, it will stay alive and be found afterwards by the tests that check for go leaks.
For first step we should probably add a check in these tests too for the leakage, and afterwards make sure that no goroutine is leaking.
Description
We seem to get a lot of
found unexpected goroutines
errors in the integration tests lately.For example:
It sabotages the efforts to merge PRs, so we should find its source.
The text was updated successfully, but these errors were encountered: