frr icon indicating copy to clipboard operation
frr copied to clipboard

bgpd: infinite self-scheduling (pseudoloop) in `bgp_generate_updgrp_packets`

Open eqvinox opened this issue 4 years ago • 2 comments

Ran into this while testing micronet a411826708962e78a2c06805d1f780837d2f709e for CI deployment. 100% CPU usage by bgpd (main thread) in bgp_generate_updgrp_packets(), which keeps rescheduling itself continuously. Scheduled from:

(gdb) p *thread->xref
$7 = {xref = {xrefdata = 0x0, type = XREFT_THREADSCHED, line = 375, file = 0x5612873544c9 "bgpd/bgp_packet.c", func = 0x561287354940 <__func__.26441> "bgp_write_proceed_actions"}, 
  funcname = 0x56128734c25f "(bgp_generate_updgrp_packets)", dest = 0x561287354290 "&(peer->t_generate_updgrp_packets)", thread_type = 2}

random pile of info from gdb:

(gdb) 
350                     if (next_pkt && next_pkt->buffer) {
(gdb) p next_pkt
$9 = (struct bpacket *) 0x561288ecbf80
(gdb) p peer->status
$10 = Established
(gdb) p peer->ostatus
$11 = OpenConfirm
(gdb) p peer->cur_event
$12 = Receive_KEEPALIVE_message
(gdb) p next_pkt->buffer
$13 = (struct stream *) 0x0
(gdb) next
359                     if (bpacket_queue_is_full(SUBGRP_INST(subgrp),
(gdb) next
361                         || subgroup_packets_to_build(subgrp)) {
(gdb) next
368                     if (CHECK_FLAG(peer->cap, PEER_CAP_RESTART_RCV)) {
(gdb) next
369                             if (!subgrp->t_coalesce && peer->afc_nego[afi][safi]
(gdb) next
370                                 && peer->synctime
(gdb) next
373                                 && safi != SAFI_MPLS_VPN) {
(gdb) next
374                                     BGP_TIMER_ON(peer->t_generate_updgrp_packets,
(gdb) p peer->synctime
$14 = 79682
(gdb) p subgrp->t_coalesce
$15 = (struct thread *) 0x0
(gdb) p peer->afc_nego[afi][safi]
$16 = 1 '\001'
(gdb) p afi
$17 = AFI_IP6
(gdb) p safi
$18 = SAFI_UNICAST

Just throwing this here for the time being, need to continue on other stuff :/

eqvinox avatar Aug 18 '21 10:08 eqvinox

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar Aug 05 '22 02:08 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar Aug 05 '22 02:08 frrbot[bot]