Skip to content

tcp connection pool drain falls into infinite loop #4065

@zuercher

Description

@zuercher

Per #4043, there was a bug in draining connections using the TCP connection pool in conjunction with the TCP proxy.

Repro steps:
It's pretty easily reproduced by adding a TCP proxy test case that configures a drain callback and then simulates an upstream close.

The connection pool invokes the TCP proxy's callback, which releases the connection back to the pool, placing it in the ready list (the connection pool has not yet processed the close event). Upon processing the event, the conn pool attempts to remove the connection from the busy list (where it no longer resides) and then triggers the drain callback which loops over the ready list, closing connections. Because the connection is already closed, no event is triggered and the connection remains on the ready list, causing an infinite loop.

Call Stack: see #4043

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions