FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.41k stars 1.27k forks source link

bgp: rpki: causes SIGSEGV in FRR 8.2.2 on cache removal #11129

Closed c-po closed 2 years ago

c-po commented 2 years ago

To Reproduce

rpki
  rpki polling_period 7200
  rpki cache 192.0.2.1 8080 preference 1
  rpki cache 192.0.2.2 9090 preference 2
  rpki cache 2001:db8::1 1234 preference 3
  rpki cache 2001:db8::2 5678 preference 4
exit

rpki
  no rpki polling_period 
  no rpki cache 192.0.2.1 8080 preference 1
  no rpki cache 192.0.2.2 9090 preference 2
  no rpki cache 2001:db8::1 1234 preference 3
  no rpki cache 2001:db8::2 5678 preference 4
exit

Unfortunately there is still no no rpki command #7978

no rpki
% Unknown command: no rpki

Expected behavior

Screenshots

Apr 30 08:41:50 BGP[1024]: Received signal 11 at 1651300910 (si_addr 0x10, PC 0x7f7de1aa6c23); aborting...
Apr 30 08:41:50 BGP[1024]: /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(zlog_backtrace_sigsafe+0x6d) [0x7f7de2b42eed]
Apr 30 08:41:50 BGP[1024]: /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(zlog_signal+0xf5) [0x7f7de2b430e5]
Apr 30 08:41:50 BGP[1024]: /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(+0xc8631) [0x7f7de2b6f631]
Apr 30 08:41:50 BGP[1024]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140) [0x7f7de293b140]
Apr 30 08:41:50 BGP[1024]: /lib/x86_64-linux-gnu/librtr.so.0(rtr_mgr_conf_in_sync+0x63) [0x7f7de1aa6c23]
Apr 30 08:41:50 BGP[1024]: /usr/lib/x86_64-linux-gnu/frr/modules/bgpd_rpki.so(+0x6420) [0x7f7de1ac2420]
Apr 30 08:41:50 BGP[1024]: /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(thread_call+0x7d) [0x7f7de2b8126d]
Apr 30 08:41:50 BGP[1024]: /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(frr_run+0xe8) [0x7f7de2b3b478]
Apr 30 08:41:50 BGP[1024]: /usr/lib/frr/bgpd(main+0x356) [0x561714c1d2a6]
Apr 30 08:41:50 BGP[1024]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f7de2788d0a]
Apr 30 08:41:50 BGP[1024]: /usr/lib/frr/bgpd(_start+0x2a) [0x561714c1ef7a]
Apr 30 08:41:50 BGP[1024]: in thread start_expired scheduled from bgpd/bgp_rpki.c:603 start_expired()
Apr 30 08:41:50 zebra[1018]: [VXKFG-8SJRV][EC 4043309121] Client 'bgp' encountered an error and is shutting down.
Apr 30 08:41:50 zebra[1018]: [VXKFG-8SJRV][EC 4043309121] Client 'vnc' encountered an error and is shutting down.

Versions

Additional context

donaldsharp commented 2 years ago

this crash occurs for me with just the first no rpki cache ... liine

ton31337 commented 2 years ago

@c-po are you able to test https://github.com/FRRouting/frr/pull/11133?

c-po commented 2 years ago

@ton31337 I can confirm this commit solves the issue for me.

ton31337 commented 2 years ago

@c-po could you check once again? Slightly changed the fix.

c-po commented 2 years ago

@ton31337 I can confirm this is still working on stable/8.2 branch (cherry-picked)