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

Go routine leak at https://github.com/go-ldap/ldap/blob/master/conn.go#L498 #387

Closed
soumsg opened this issue Jul 21, 2022 · 1 comment · Fixed by #388
Closed
Assignees
Labels

Comments

@soumsg
Copy link

soumsg commented Jul 21, 2022

Thousands of goroutines kept waiting on sleep as a result of search operation with request timeout.

In the below go routine dump we see 16714 routines are waiting.

`16714 @ 0x844916 0x87168e 0xf49475 0x874801

0x87168d time.Sleep+0x12d /usr/lib/golang/src/runtime/time.go:193

0xf49474 github.com/go-ldap/ldap/v3.(*Conn).processMessages.func2+0x54 /workdir/.build/golib/pkg/mod/github.com/go-ldap/ldap/v3@v3.4.2/conn.go:498`

it seems like those functions will complete when the timeout expires and then the goroutine would go away.
Should we be using a select so they can stop the sleep if the response has already been received

@soumsg
Copy link
Author

soumsg commented Jul 25, 2022

Thanks @cpuschma

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

Successfully merging a pull request may close this issue.

2 participants