High CPU usage by bgpd when snmp is active

Hello everyone!

I’m facing a strange issue with bgpd when snmpv2 is active, where it uses 100% CPU all the time.

If snmp is enabled this happens: http://prntscr.com/oz5w4x
When I disable (service snmpd stop) everything gets back to normal: http://prntscr.com/oz5wug

If it is relevant, I have 9 BGP sessions (5 v4 and 4 v6), with 3 full routing tables and I’m using self compiled vyos 1.2.1.

Are there any logs where I can get more information about what is causing this?

I’d be really glad if anyone could help me debug this issue.

Thank you!

Hey @aldemaro

Does this happen just by having snmp enabled, or is it tied to when something is polling the device?

Hello @garysteers!

I’ve disabled pooling and the issue is still present. I’ve also tested with SNMPv3 and the same happens. SNMP only need to be active for this to happen.

Looks like there is something wrong with frr+snmp integration, but I can’t figure out what. Are there any bgpd logs? I found frr.log, but nothing wrong there:

Aug 25 10:46:27 localhost zebra[1030]: snmp[info]: NET-SNMP version 5.7.2.1 AgentX subagent connected
Aug 25 10:46:27 localhost bgpd[1034]: snmp[info]: NET-SNMP version 5.7.2.1 AgentX subagent connected
Aug 25 10:46:27 localhost ospfd[1049]: snmp[info]: NET-SNMP version 5.7.2.1 AgentX subagent connected
Aug 25 10:46:27 localhost ospf6d[1053]: snmp[info]: NET-SNMP version 5.7.2.1 AgentX subagent connected
Aug 25 10:46:27 localhost ripd[1041]: snmp[info]: NET-SNMP version 5.7.2.1 AgentX subagent connected

There may be something in /var/log/messages

You can also use monitor snmp (which basically runs the above with a filter for snmpd messages)

I have the same problem. Every day between 7:00 pm and 7:10 pm, the bgpd process ends after snmpd reaches 100% cpu.

The problem only occurs if bgpd and snmpd are running. Even if snmp collection is not being performed.

Occurs in both VM and HW.

Unfortunately there is no useful information:

snmpd started: http://prntscr.com/ozcilw
snmpd stoped: http://prntscr.com/ozcjeh

yes we have the same problem… vyos 1.2.2.

Maybe it’s time to report this bug in phabricator?

Anyone knows how to disable the integration between frr and snmpd? This should work as a workaround, and would let we monitor at least some aspects over snmp.

I might setup a test router to try to find out, but any help would be appreciated.

It seems like frrouting issue


I think you can try edit sudo nano /etc/frr/daemons and delete -M snmp from bgpd_options=.... Then run sudo killall bgpd and wait while process run automatically

There is no bgpd_options in this file. I’ll dig deeper and try to find it.

In the meantime the only workaround I found is to stop snmpd.

Edit: I found the actual file to edit to be /etc/frr/daemons.conf. Killing the bgpd process for some reason will not spawn a new process tho, so you will need to reboot the router to bring it back up.