Skip to content

forceLock hanging in v1.8.3 and causing a goroutine leak #205

Closed
@jacobalberty

Description

@jacobalberty

I've only just noticed this and have only been able to confirm it was introduced in v1.8.3 I have not been able to determine if it's a mistake in my using of the library or even make a good test case yet.

upgrading to v1.8.3 has introduced an issue where I end up with a bunch of goroutines that seem to be blocking in forceLock in conn_notjs.go. The following is my pprof output

48 @ 0x436c00 0x4050bd 0x404e85 0x9f2324 0x9f2302 0x9f7ed7 0x466611
#	0x9f2323	nhooyr.io/websocket.(*mu).forceLock+0x43	nhooyr.io/websocket@v1.8.3/conn_notjs.go:234
#	0x9f2301	nhooyr.io/websocket.(*msgReader).close+0x21	nhooyr.io/websocket@v1.8.3/read.go:112
#	0x9f7ed6	nhooyr.io/websocket.(*Conn).close.func1+0x46	nhooyr.io/websocket@v1.8.3/conn_notjs.go:144

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions