Memory leaks in driver

82 views
Skip to first unread message

Mathias Gibbens

unread,
Apr 24, 2014, 12:53:59 AM4/24/14
to cpp-dri...@lists.datastax.com
Hello,

I am working on a project that is using the cpp driver to communicate
with Cassandra. While running the project under `valgrind`, I have
noticed that there are some memory leaks in the driver. (I am using the
current code available in the master branch of the github repository.)

You can easily verify this behavior by compiling the driver with debug
symbols enabled and then running the included demo program
(./demo/main.cpp) under `valgrind`. I have attached the output of the
report to this message.

The code I am writing will be part of a long-running service that will
create many connections over time via the driver to handle each unique
client, so a growing memory leak will be a problem. (Plus, it's just bad
form to not properly manage your memory!) Restarting the service just to
reclaim memory will not be an acceptable solution.

Could someone who is more familiar with the internal workings of the
driver please investigate this and fix the memory leaks?

System information: Debian "wheezy", with boost 1.49 and g++ 4.7.

Thanks,
Mathias
valgrind-report.txt
signature.asc

Alex Popescu

unread,
Apr 25, 2014, 7:17:18 PM4/25/14
to cpp-dri...@lists.datastax.com, gib...@cs.arizona.edu


Thanks Mathias. As you are aware the GitHub code is still in its early days and that comes unfortunately with such problems. The good news though is that we've been doing a lot of work lately to improve both the API and the stability of the code. I hope we'll be able to show the results pretty soon.

:- a

Mathias Gibbens

unread,
Apr 28, 2014, 1:35:58 PM4/28/14
to cpp-dri...@lists.datastax.com
Hi Alex,

Thank you for the reply. I'm well aware that the code is still under
development, and just wanted to make sure that someone was aware of the
existing memory leaks. I'll be looking forward to the improvements in
the code and API as they become available.

Thanks,
Mathias
signature.asc
Reply all
Reply to author
Forward
0 new messages