Skip to content

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

@soumsg

Description

@soumsg

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions