-
Notifications
You must be signed in to change notification settings - Fork 20
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
stalled writer goroutines #51
Comments
We do it on resets and the header too, occur sees 3 occurrences of sending messages with
|
I think the main culprit is the reset message when we get data in a closed stream: if remoteClosed {
// closed stream, return b
pool.Put(b)
log.Warningf("Received data from remote after stream was closed by them. (len = %d)", len(b))
go mp.sendMsg(context.Background(), msch.id.header(resetTag), nil)
continue
} This occurs so often that we had to downgrade the error log in #46 because it filled the disk with logs in the mplex relay. |
The other place where we send timeout-less messages is when we do an actual |
Grepping through goroutine traces of our relay infrastructure, I found stalled goroutines:
When we write control messages, we transfer the deadline from the context to the connection, but the
sendMsg
method is always called with the background context, which never carries a deadline. So if one write stalls, it'll stall forever and it'll also block any subsequent sending of control messages on that multiplexed connection.See: https://github.com/libp2p/go-mplex/blob/master/multiplex.go#L152
The text was updated successfully, but these errors were encountered: