Skip to content

Memory leak with Renci.SSHNet 2016.0.0 / FEATURE_SOCKET_EAP #133

Closed
@sorenhjarlvig

Description

@sorenhjarlvig

Renci is leaking SocketAsyncEventArgs objects when compiled with the FEATURE_SOCKET_EAP flag (seems to be the default build configuration). When compiled without FEATURE_SOCKET_EAP the leak goes away (naturally).
Perhaps this is caused by the use of the SetBuffer-method which according to http://codefruits.blogspot.dk/2013/03/memory-leak-in-c-net-sockets.html must be nulled (SetBuffer(null, 0, 0)) to be garbage collected correctly.
For some reason we didn't see this leak on Windows Server 2008 but when we recently moved our production to Windows Server 2012 the Windows NT service using Renci.SSHNET started to leak 100 MiB a day.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions