Hi,
following the memory issues reported by some users, pointing to the
`close_expired_tcp` functionality of usrloc, I have successfully
reproduced the issue, and fixed it in master & 4.3.
The current approach for force-closing the TCP connection is to send a
CONN_EOF message to the main TCP process. The main TCP loop and logic
are quite complex, so it's difficult for me to foresee some tricky side
effects this method may have. The tests so far, apart from the above
mentioned memory leak, showed no issue.
I wonder what the other approaches for closing the connections are.
Since the usrloc timer function that is responsible of this
`close_expired_tcp` behavior does not acquire + release the file
descriptor as the TCP workers do, marking the connection as bad, or
using the SND_F_CON_CLOSE won't work: the flags are set, but the
connection is not effectively closed (this should happen the next time
the client or the server tries to write data on it).
So, should we stick to the current implementation, or do you have a
suggestion on how this could be done differently?
--
Camille