Bug#1050122: smokeping: CGI script hogs CPU and OOMs on fping graphs with pings=2000

2024-06-02 Thread Gabriel Filion

Hello Marcin,

I've tried to reproduce this behavior in the current testing version of 
smokeping and I wasn't able to do it.


with the following contents for config.d/Probes, and all other files 
with defaults from the package (so just one target for localhost that 
uses the fping probe) plus the file 
/var/lib/smokeping/Local/LocalMachine.rrd deleted before restarting 
smokeping, I would see the process "smokeping [FPing]" get started but 
the rrd file was not being recreated. and so I just couldn't get any 
graph produced.


as soon as I commented out the two lines, the rrd file was created and 
an empty graph was now being generated.


Do you mind to share you configuration here, specifically for Probes and 
maybe General ?


The way I tried it in Probes:

*** Probes ***

+ FPing

binary = /usr/bin/fping
pings = 2000
step = 2100



Bug#1050122: smokeping: CGI script hogs CPU and OOMs on fping graphs with pings=2000

2023-08-20 Thread Marcin Owsiany
Package: smokeping
Version: 2.7.3-4.1
Severity: normal

Dear Maintainer,

I changed the configuration to add an FPing probe flavor with pings=2000
(and step=2100) specified, and a few targets using that probe.

The motication for this is that my ISP considers the number of packets
lost within a 2000-ping sample to be a canonical metric for reliability.
So I would like to collect statistics using this metric in order to have
have data for any complaints in the future.

The backend smokeping process seems to work just fine. The data is being
collected, and the 3 and 30 hour graphs are rendered in reasonable time
(~2s).

However when I go to the 10 day (or longer) graph URL for such target,
the CGI script hogs CPU and eats all available RAM (8GB) until it is
terminated by the OOM-killer after four minutes or so, resulting in a
503 or 504 response from Apache. The longest period I was able to graph
successfully was about 4 days.

Note that the above is with about 18 hours worth of data. The RRD files
for targets with default configuration are about 2.9MB, and the ones for
2000 pings are 248MB.


-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages smokeping depends on:
ii  adduser3.134
ii  exim4-daemon-light [mail-transport-agent]  4.96-15+deb12u1
ii  fping  5.1-1
ii  init-system-helpers1.65.2
ii  libcgi-fast-perl   1:2.15-1
ii  libconfig-grammar-perl 1.13-5
ii  libdigest-hmac-perl1.04+dfsg-2
ii  libjs-cropper  1.2.2-1.1
ii  libjs-prototype1.7.3-1
ii  libjs-scriptaculous1.9.0-3
ii  librrds-perl   1.7.2-4+b8
ii  libsnmp-session-perl   1.14~git20221124T101957-1
ii  liburi-perl5.17-1
ii  libwww-perl6.68-1
ii  lsb-base   11.6
ii  perl   5.36.0-7
ii  sysvinit-utils [lsb-base]  3.06-4
ii  ucf3.0043+nmu1

Versions of packages smokeping recommends:
ii  apache2 [httpd-cgi]2.4.57-2
ii  bind9-dnsutils [dnsutils]  1:9.18.16-1~deb12u1
ii  dnsutils   1:9.18.16-1~deb12u1
pn  echoping   
ii  libsocket6-perl0.29-3

Versions of packages smokeping suggests:
ii  curl   7.88.1-10+deb12u1
pn  libauthen-radius-perl  
ii  libio-socket-ssl-perl  2.081-2
ii  libnet-dns-perl1.36-1
pn  libnet-ldap-perl   
pn  libnet-telnet-perl 
ii  openssh-client 1:9.2p1-2

-- Configuration Files:
/etc/smokeping/config.d/Probes changed [not included]
/etc/smokeping/config.d/Targets changed [not included]
/etc/smokeping/smokeping_secrets [Errno 13] Brak dostępu: 
'/etc/smokeping/smokeping_secrets'

-- no debconf information