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

Fix goroutine leak in hooks execution group #3911

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linux019
Copy link
Contributor

@linux019 linux019 commented Sep 10, 2024

This function creates an unbuffered channel

resp := make(chan hookResponse[P])

If hook returns Reject error the collectHookResponses aborts reading of the channel


and this results to dead goroutine in
go func(hw hooks.HookWrapper[H], moduleCtx hookstage.ModuleInvocationContext) {
because the channel is still open and goroutines can still write to this channel. As this channel is no more read by anyone the writing goroutine will stuck indefinitely awaiting release of the channel

#3754

@linux019
Copy link
Contributor Author

@bsardo Please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants