Project

General

Profile

Actions

Bug #858

closed

Possible memory leak in wt

Added by Boris Nagaev over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
06/16/2011
Due date:
% Done:

0%

Estimated time:

Description

Wt revision df255822084a68b818847c19eb0e3f0c4e84f62b (self-build)

ubuntu 10.10

boost 1.44

Valgrind:

==4378==
==4378== HEAP SUMMARY:
==4378==     in use at exit: 268,568 bytes in 23 blocks
==4378==   total heap usage: 347,878 allocs, 347,855 frees, 72,392,577 bytes allocated
==4378==
==4378== Thread 1:
==4378== 65,536 bytes in 1 blocks are possibly lost in loss record 19 of 23
==4378==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==4378==    by 0x5E4E4F0: ??? (in /lib/libz.so.1.2.3.4)
==4378==    by 0x5E4A966: deflateInit2_ (in /lib/libz.so.1.2.3.4)
==4378==    by 0x47015BE: http::server::Reply::initGzip() (Reply.C:486)
==4378==    by 0x4703A1D: http::server::Reply::nextBuffers(std::vector<boost::asio::const_buffer, std::allocator<boost::asio::const_buffer> >&) (Reply.C:305)
==4378==    by 0x46F2FFA: http::server::Connection::startWriteResponse() (Connection.C:227)
==4378==    by 0x4700FA8: http::server::Reply::send() (Reply.C:410)
==4378==    by 0x474801B: http::server::WtReply::send(std::string const&, boost::function<void ()()>) (WtReply.C:255)
==4378==    by 0x46FF30C: http::server::HTTPRequest::flush(Wt::WebRequest::ResponseState, boost::function<void ()()>) (HTTPRequest.C:26)
==4378==    by 0x4528B34: Wt::WebSession::serveResponse(Wt::WebSession::Handler&) (WebSession.C:1999)
==4378==    by 0x452C64E: Wt::WebSession::render(Wt::WebSession::Handler&) (WebSession.C:1951)
==4378==    by 0x452D431: Wt::WebSession::notify(Wt::WEvent const&) (WebSession.C:1847)
==4378==
==4378== 202,436 (5,828 direct, 196,608 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 23
==4378==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==4378==    by 0x5E4E4F0: ??? (in /lib/libz.so.1.2.3.4)
==4378==    by 0x5E4A8E5: deflateInit2_ (in /lib/libz.so.1.2.3.4)
==4378==    by 0x47015BE: http::server::Reply::initGzip() (Reply.C:486)
==4378==    by 0x4703A1D: http::server::Reply::nextBuffers(std::vector<boost::asio::const_buffer, std::allocator<boost::asio::const_buffer> >&) (Reply.C:305)
==4378==    by 0x46F2FFA: http::server::Connection::startWriteResponse() (Connection.C:227)
==4378==    by 0x4700FA8: http::server::Reply::send() (Reply.C:410)
==4378==    by 0x474801B: http::server::WtReply::send(std::string const&, boost::function<void ()()>) (WtReply.C:255)
==4378==    by 0x46FF30C: http::server::HTTPRequest::flush(Wt::WebRequest::ResponseState, boost::function<void ()()>) (HTTPRequest.C:26)
==4378==    by 0x4528B34: Wt::WebSession::serveResponse(Wt::WebSession::Handler&) (WebSession.C:1999)
==4378==    by 0x452C64E: Wt::WebSession::render(Wt::WebSession::Handler&) (WebSession.C:1951)
==4378==    by 0x452D431: Wt::WebSession::notify(Wt::WEvent const&) (WebSession.C:1847)
==4378==
==4378== LEAK SUMMARY:
==4378==    definitely lost: 5,828 bytes in 1 blocks
==4378==    indirectly lost: 196,608 bytes in 3 blocks
==4378==      possibly lost: 65,536 bytes in 1 blocks
==4378==    still reachable: 596 bytes in 18 blocks
==4378==         suppressed: 0 bytes in 0 blocks
==4378== Reachable blocks (those to which a pointer was found) are not shown.
==4378== To see them, rerun with: --leak-check=full --show-reachable=yes
Actions #1

Updated by Koen Deforche over 13 years ago

  • Status changed from New to Resolved

Hey,

That doesn't look good indeed.

Looking from the code I can imagine this could happen if a reply is not sent entirely (would that match your experience?).

I've fixed this (in my git copy).

Regards,

koen

Actions #2

Updated by Koen Deforche over 13 years ago

  • Target version set to 3.1.10
Actions #3

Updated by Koen Deforche over 13 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF