Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestGroup_Go - not all goroutines finished/"task.Group: semaphore acquire failed, was the task group closed? err: context canceled #41218

Closed
belimawr opened this issue Oct 14, 2024 · 2 comments · Fixed by #41230
Assignees
Labels
flaky-test Unstable or unreliable test cases. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@belimawr
Copy link
Contributor

Flaky Test

  • Test Name: TestGroup_Go/workloads_wait_for_available_worker and TestGroup_Go/some_workloads_return_an_error
  • Link:
  • Branch: main, PR
  • Notes: I've only seen failures on Windows, I managed to reproduce it by running the Test 1000 times and when I did it I got a different subtest to fail

Stack Trace

1st failure, BuildKite job

=== Failed
--
  | === FAIL: filebeat/input/filestream/internal/task TestGroup_Go/workloads_wait_for_available_worker (0.15s)
  | group_test.go:123: f2 started
  | group_test.go:110: f1 started
  | group_test.go:129: f2 done
  | group_test.go:142: f3 started
  | group_test.go:176: waiting the worker pool to finish all workloads
  | group_test.go:112: f1 done
  | group_test.go:144: f3 done
  | group_test.go:179: worker pool to finished all workloads
  | group_test.go:181:
  | Error Trace:	C:/buildkite-agent/builds/bk-agent-prod-gcp-1728676855326850128/elastic/filebeat/filebeat/input/filestream/internal/task/group_test.go:181
  | Error:      	Condition never satisfied
  | Test:       	TestGroup_Go/workloads_wait_for_available_worker
  | Messages:   	not all goroutines finished
  |  
  | === FAIL: filebeat/input/filestream/internal/task TestGroup_Go (0.57s)

2nd failure, running 1000 times on my machine:

PS C:\devel\beats\filebeat\input\filestream\internal\task> go test -count=1000 -run=TestGroup_Go
--- FAIL: TestGroup_Go (0.11s)
    --- FAIL: TestGroup_Go/some_workloads_return_an_error (0.00s)
        group_test.go:280:
                Error Trace:    C:/devel/beats/filebeat/input/filestream/internal/task/group_test.go:280
                Error:          "task.Group: semaphore acquire failed, was the task group closed? err: context canceled\ntask.Group: semaphore acquire failed, was the task group closed? err: context canceled\n" does not contain "a error"
                Test:           TestGroup_Go/some_workloads_return_an_error
--- FAIL: TestGroup_Go (0.11s)
    --- FAIL: TestGroup_Go/some_workloads_return_an_error (0.00s)
        group_test.go:280:
                Error Trace:    C:/devel/beats/filebeat/input/filestream/internal/task/group_test.go:280
                Error:          "task.Group: semaphore acquire failed, was the task group closed? err: context canceled\ntask.Group: semaphore acquire failed, was the task group closed? err: context canceled\n" does not contain "a error"
                Test:           TestGroup_Go/some_workloads_return_an_error
--- FAIL: TestGroup_Go (0.11s)
    --- FAIL: TestGroup_Go/some_workloads_return_an_error (0.00s)
        group_test.go:280:
                Error Trace:    C:/devel/beats/filebeat/input/filestream/internal/task/group_test.go:280
                Error:          "task.Group: semaphore acquire failed, was the task group closed? err: context canceled\ntask.Group: semaphore acquire failed, was the task group closed? err: context canceled\n" does not contain "a error"
                Test:           TestGroup_Go/some_workloads_return_an_error
FAIL
exit status 1
FAIL    github.com/elastic/beats/v7/filebeat/input/filestream/internal/task     111.404s
@belimawr belimawr added flaky-test Unstable or unreliable test cases. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Oct 14, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@belimawr
Copy link
Contributor Author

This test is also failing on main

@belimawr belimawr changed the title TestGroup_Go - not all goroutines finished/"task.Group: semaphore acquire failed, was the task group closed? err: context canceled\ntask.Group: semaphore acquire failed, was the task group closed? err: context canceled\n" does not contain "a error" TestGroup_Go - not all goroutines finished/"task.Group: semaphore acquire failed, was the task group closed? err: context canceled Oct 14, 2024
@mauri870 mauri870 self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Unstable or unreliable test cases. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants