RRDcached crashes after converting RRD graphs to 2 min interval

I am having an issue with rrdcached when converting RRD files from 5min interval to 2min interval. My steps have been to stop rrdcached sevice, update polling interval in web gui, run ./scripts/rrdstep.php -h all, then start rrdcached again. Shortly after rrdcached starts, it crashes - logs from /var/log/messages below.
When I attempt to re-convert rrd graphs, I get below rrd errors for every graph on every device, and the “floating point exception” is logged is syslog again as well.

Any one know if 2 minute polling is supported? This page is for 1 minute polling, but it suggests that any interval can be used: https://docs.librenms.org/#Support/1-Minute-Polling/

Errors from /var/log/messages when rrdcached crashes and while converting:
Converting /opt/librenms/rrd/172.16.0.170/ping-perf.rrd: sh: line 4: 13806 Floating point exception/usr/bin/rrdtool dump /opt/librenms/rrd/1AIL]6.0.170/ping-perf.rrd > /tmp/1914598963.xml

Error to stdout while rrdstep.php is converting:
Aug 6 19:01:41 librenms01 kernel: traps: rrdtool[6575] trap divide error ip:7ff5f724534e sp:7fff4645d5b0 error:0 in librrd.so.8.0.0[7ff5f7239000+6a000]

Maybe try and upgrade rrdtool

Upgrade before doing conversion? I compiled rrdtool from source on latest v1.7 and rrdcached was still crashing, but I didn’t try upgrading then trying conversion

okay, updated rrdtool to v1.7 and start conversion, but what still getting the “floating point exception” errors.

Think i found the issue though - I fixed by setting config['ping_rrd_step']. In rrdstep.php, it tries to set icmp_step to either the config ping_rrd_step, and if that’s not set, to $step. I don’t think there is a variable $step set at that point; I think it’s supposed to be $system_step? If you think that looks right, I’ll submit pull request.

Snip from rrdstep.php:

$system_step      = Config::get('rrd.step', 300);
$icmp_step        = Config::get('ping_rrd_step', $step);

Well spotted :slight_smile: