LNet Memory Leak
Original Reporter info from Mantis: ttomas
-
Reporter name: Tomislav Avramovic
Original Reporter info from Mantis: ttomas
- Reporter name: Tomislav Avramovic
Description:
I stress test LNet http server with DDoS attack tool LOIC
http://sourceforge.net/projects/loic/
Without DDoS attack there is no memory leak in http server.
With LOIC attack with 100 threads and when failed packets start to increase we have 1024 bytes leak on every failed request. Memory leak is from lnet.pas unit
procedure TLTcp.AcceptAction(aSocket: TLHandle);
var
Tmp: TLSocket;
begin
Tmp := InitSocket(SocketClass.Create); <<<<
TLSocket is allocated but never free.
This is not only http server problem, TCPServer is also effected.
After and in time of attack server work without problems with browser, but memory increase and with long time attack we will have out of memory.
I attach small demo project for testing.
Windows 7 64b and 32b, I use Lazarus 1.1 CodeTyphon 3.10, LNet source is same with svn trunk.
Additional information:
LNet
Mantis conversion info:
- Mantis ID: 23475
- Version: 1.1 (SVN)