bsnmpd crashes regularly
-
Hello,
I am experiencing constant crashes of the bsnmpd service on a Netgate 4200 router running pfSense 24.03. The SNMP service settings are default; it is polled by an external monitoring application (Prometheus/snmp_exporter) every 5 seconds. The following entries appear in the log:
[24.03-RELEASE][admin@pfSense.home.arpa]/var/log: cat system.log | grep snmp Nov 8 03:58:33 pfSense kernel: pid 578 (bsnmpd), jid 0, uid 0, was killed: failed to reclaim memory Nov 8 11:46:11 pfSense snmpd[57864]: disk_OS_get_disks: adding device 'da0' to device list Nov 8 23:50:22 pfSense kernel: pid 57864 (bsnmpd), jid 0, uid 0, was killed: a thread waited too long to allocate a page Nov 10 11:01:04 pfSense snmpd[57763]: disk_OS_get_disks: adding device 'da0' to device list
Any solution/workaround?
-
I'd try a longer polling interval first. 5 seconds is pretty aggressive by SNMP standards. Do you still have problems if you poll every 300 seconds (5 mintutes)?
-
@cameloid It’s a known issue in 24.03 when you query BSNMP for pffilter status. By having a “long” polling interval you can postpone the time it takes to run out of open file memory (it leaves thousands of open files). Alternatively you can restart the BSNMP service to recoup the memory and close the files.
Netgate opted to not fix the issue in 24.03, but it is fixed in 24.11, so I can only recommend you upgrade to that.
-
@cameloid Here’s the original post I made when I discovered the bug:
https://forum.netgate.com/topic/188050/24-03-causes-sustained-rise-in-processes-count-and-memory-usage