You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're getting a memory leak on our server when we have a client make a REQ socket request but close before the server manages to send the REP socket response. The client is shut down after the server has received the request but before it has created its response. If the client does not close, the memory leak is not there.
I tracked the issue down to the message's type_t. The message is being created with type_t of type_lmsg. However, by the time it is being destroyed it is type_vsm. The type mismatch leaves the extra data found in a type_lmsg type un-destroyed.
The text was updated successfully, but these errors were encountered:
Created pull request #1314. This explicitly closes messages after a failed write to the socket.
Most paths through that function explicitly close the message already - the only ones that do are the ones that call zmq::pipe::write. This suggests that the author assumed that zmq::pipe::write would take control of the message's memory on every call to write. Our testing suggests that zmq::pipe::write does not take control of the message's memory buffer on a failed call. Therefore, our patch adds the needed message::close.
As the commit message says, this patch is sponsored by FarSounder, Inc.
We're getting a memory leak on our server when we have a client make a REQ socket request but close before the server manages to send the REP socket response. The client is shut down after the server has received the request but before it has created its response. If the client does not close, the memory leak is not there.
I tracked the issue down to the message's type_t. The message is being created with type_t of type_lmsg. However, by the time it is being destroyed it is type_vsm. The type mismatch leaves the extra data found in a type_lmsg type un-destroyed.
The text was updated successfully, but these errors were encountered: