Leaky librrd4

17.09.2012 21:21

librrd4, the library behind the RRDtool, version 1.4.3 as shipped in the current Debian Stable distribution (Squeeze) has a gross memory leak. This caused problems on my server because I use a long running daemon process to plot several graphs (not a script that periodically gets called from a cron job, which seems to be the dominant way of using RRDtool these days) and because I use the RRDs Perl bindings, which dynamically link to librrd4 (as opposed to RRDp which spawns a separate process).

The red dots on the graph below show the virtual memory size of a Perl process that continuously calls the RRDs::graph() function in librrd4 1.4.3:

Comparing memory usage between two versions of librrd4

The blue dots mark the same test using librrd4 1.4.7 which is currently in Debian Testing and which apparently has this problem fixed. While librrd4 1.4.7 doesn't seem to be present in Debian Backports, the source package from Testing compiles without a problem on Squeeze, so upgrading is pretty straightforward.

Just in case all of the above saves debugging time for someone...

Posted by Tomaž | Categories: Code

Add a new comment

(No HTML tags allowed. Separate paragraphs with a blank line.)