Skip to content

Trigger OOS on bind failures

We got a report from an Exit operator of 100% CPU usage and bind errors:

tpo/network-health/analysis#33 (closed)

What I think is happening is that it is getting overwhelmed with "Hey, connect to a.b.c.d on port 21" as in more than 65k times and the process runs out of local port to use leading to:

Error binding network socket: Address already in use

We have code in place to detect TCP port exhaustion but it is only in case of socket() error which is "OK" but we should also have it around bind() since that is the call that will bind an address to a socket and thus a local port.

We should not trigger an overload because of that but we should at least trigger our OOS handler and signal an exhaustion.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information