-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
(Bug Report) Shared WaitGroup in Exec plugin #1463
Comments
Submitted pull request 1464 to address the issue. |
Then why is this an issue? Seems like a bug report for a bug that can't happen :-) |
Just addressing unsafe code. The waitGroup belongs in the gather function not in the struct instance. |
@allen13 why is the code unsafe? |
@sparrc The wait group is unnecessarily sharing its state between Gather executions. Should a previous gather fail to close it's waitgroup, future Gathers will hang indefinitely. Creating a new waitGroup instance for each Gather guarantees isolation. |
Bug report
The exec plugin gather function is relying on an instance shared WaitGroup which causes the gather function to hang indefinitely when run concurrently. This does not affect the current code base since the agent waits for gather to finish before kicking off a new one. I stumbled upon this while addressing an in-house requirement for gathers to kick off regardless of whether or not the previous one has finished.
The text was updated successfully, but these errors were encountered: