qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stitcher" <astitc...@apache.org>
Subject Re: Review Request: Change IO buffer ownership strategy to avoid memory leaks
Date Thu, 09 Aug 2012 20:55:22 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6257/
-----------------------------------------------------------

(Updated Aug. 9, 2012, 8:55 p.m.)


Review request for qpid, Alan Conway, Gordon Sim, and Steve Huston.


Changes
-------

Changes reworked a little to remove magic constants.

The HA tests now pass for me, but the original failure might well have been something screwed
up in my test environment.

I would like to commit this change to trunk, so if there are concerns speak up now.


Description
-------

This change reworks the buffer handling of the IO layer of qpid.

Essentially it makes the AsyncIO class the owner of the IO buffers always, previously it only
owned the buffers when they were on one of its queues. This allowed the buffers to leak if
they were not returned to its queues for some reason (perhaps an exception being thrown).

In order to apply this change to the SSL code as well I've had to bring SslConnector in line
with the current TCPConnector code which it has markedly diverged from.

I'm particularly seeking review on the Windows code which has been lightly tested, and the
SSL code because the change is large there (although it brings the SSL code much more in line
with the TCP code).


This addresses bug QPID-4180.
    https://issues.apache.org/jira/browse/QPID-4180


Diffs (updated)
-----

  /trunk/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/client/TCPConnector.h 1370395 
  /trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/AsynchIO.h 1370395 
  /trunk/qpid/cpp/src/qpid/sys/AsynchIOHandler.h 1370395 
  /trunk/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/SslPlugin.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/ssl/SslHandler.h 1370395 
  /trunk/qpid/cpp/src/qpid/sys/ssl/SslHandler.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/ssl/SslIo.h 1370395 
  /trunk/qpid/cpp/src/qpid/sys/ssl/SslIo.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp 1370395 
  /trunk/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h 1370395 
  /trunk/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.cpp 1370395 

Diff: https://reviews.apache.org/r/6257/diff/


Testing
-------

Builds on Fedora 16, and Windows

make check
cmake test

Both pass Except ha_tests which fail in the same way on the equivalent trunk version for me.

Linux performace using qpid-cpp-benchmark seems comparable.


Thanks,

Andrew Stitcher


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message