HTTPConnection::_on_headers seems to leak connection

28 views
Skip to first unread message

Jefim

unread,
May 24, 2010, 6:18:16 AM5/24/10
to Tornado Web Server
Hi,

The function HTTPConnection::_on_headers seems to leak connection if
exception is thrown.
This can lead to denial of service on the server.


David P. Novakovic

unread,
May 24, 2010, 6:58:43 AM5/24/10
to python-...@googlegroups.com
Do you refer to the circular dependency between connection and request?

i'm fairly sure python can detect that these objects have reference to
them or not... no references is kept to the connection object... so if
the request object goes out of scope both of them will be garbage
collected..

I could be wrong though :)

D

Jefim

unread,
May 24, 2010, 7:36:41 AM5/24/10
to Tornado Web Server
This does not mean memory leak, but the connection leak - the
connection is not closed

On May 24, 1:58 pm, "David P. Novakovic" <davidnovako...@gmail.com>
wrote:

Jefim

unread,
May 24, 2010, 7:46:20 AM5/24/10
to Tornado Web Server
This does not mean memory leak, but the connection leak - the
connection is not closed

On May 24, 1:58 pm, "David P. Novakovic" <davidnovako...@gmail.com>
wrote:

David P. Novakovic

unread,
May 24, 2010, 7:54:11 AM5/24/10
to python-...@googlegroups.com
Python sockets are closed when they are garbage collected - ie. when
they go out of scope.

Jefim

unread,
May 24, 2010, 8:00:26 AM5/24/10
to Tornado Web Server
This does not mean memory leak, but the connection leak - the
connection is not closed

On May 24, 1:58 pm, "David P. Novakovic" <davidnovako...@gmail.com>
wrote:

Jefim

unread,
May 24, 2010, 8:03:16 AM5/24/10
to Tornado Web Server
This does not mean memory leak, but the connection leak - the
connection is not closed

On May 24, 1:58 pm, "David P. Novakovic" <davidnovako...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages