Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak found in bgpd at rfapiBgpInfoFilteredImportVPN #13985

Closed
gpnaveen opened this issue Jul 12, 2023 · 1 comment
Closed

memory leak found in bgpd at rfapiBgpInfoFilteredImportVPN #13985

gpnaveen opened this issue Jul 12, 2023 · 1 comment

Comments

@gpnaveen
Copy link
Contributor

FRR Version:
FRRouting (version 8.5.2).

Linux : Ubuntu 20.04 AMD 64.

Scripts executed:
all the bgp topotests from path 'frr-frr-8.5.2/tests/topotests'

==668516== Memcheck, a memory error detector
==668516== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==668516== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==668516== Command: /usr/lib/frr/bgpd --command-log-always --log file:bgpd.log --log-level debug -d
==668516== Parent PID: 668513
==668516==
==668516==
==668516== HEAP SUMMARY:
==668516== in use at exit: 1,544,574 bytes in 450 blocks
==668516== total heap usage: 283,619 allocs, 283,169 frees, 24,840,856 bytes allocated
==668516==
==668516== 80 bytes in 2 blocks are definitely lost in loss record 55 of 101
==668516== at 0x484147B: calloc (vg_replace_malloc.c:1328)
==668516== by 0x48EDE23: qcalloc (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x2EF45A: rfapiBgpInfoFilteredImportVPN (in /usr/lib/frr/bgpd)
==668516== by 0x2EF900: rfapiProcessUpdate (in /usr/lib/frr/bgpd)
==668516== by 0x26C20A: bgp_update (in /usr/lib/frr/bgpd)
==668516== by 0x242AFA: bgp_nlri_parse_vpn (in /usr/lib/frr/bgpd)
==668516== by 0x2524A3: ??? (in /usr/lib/frr/bgpd)
==668516== by 0x2553B1: bgp_process_packet (in /usr/lib/frr/bgpd)
==668516== by 0x49299F0: thread_call (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x48E23E7: frr_run (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x1F38AC: main (in /usr/lib/frr/bgpd)
==668516==
==668516== 416 bytes in 13 blocks are definitely lost in loss record 70 of 101
==668516== at 0x484147B: calloc (vg_replace_malloc.c:1328)
==668516== by 0x48EDE23: qcalloc (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x2EE05A: ??? (in /usr/lib/frr/bgpd)
==668516== by 0x2F0AEA: ??? (in /usr/lib/frr/bgpd)
==668516== by 0x2F0C59: rfapiProcessPeerDown (in /usr/lib/frr/bgpd)
==668516== by 0x237EFD: bgp_fsm_change_status (in /usr/lib/frr/bgpd)
==668516== by 0x2D25D6: peer_delete (in /usr/lib/frr/bgpd)
==668516== by 0x2D53EC: bgp_delete (in /usr/lib/frr/bgpd)
==668516== by 0x1F619E: sigint (in /usr/lib/frr/bgpd)
==668516== by 0x4917922: frr_sigevent_process (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x4929114: thread_fetch (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x48E23F2: frr_run (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x1F38AC: main (in /usr/lib/frr/bgpd)
==668516==
==668516== 12,852 (440 direct, 12,412 indirect) bytes in 11 blocks are definitely lost in loss record 100 of 101
==668516== at 0x484147B: calloc (vg_replace_malloc.c:1328)
==668516== by 0x48EDE23: qcalloc (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x2EF4C5: rfapiBgpInfoFilteredImportVPN (in /usr/lib/frr/bgpd)
==668516== by 0x2EF900: rfapiProcessUpdate (in /usr/lib/frr/bgpd)
==668516== by 0x26C20A: bgp_update (in /usr/lib/frr/bgpd)
==668516== by 0x242AFA: bgp_nlri_parse_vpn (in /usr/lib/frr/bgpd)
==668516== by 0x2524A3: ??? (in /usr/lib/frr/bgpd)
==668516== by 0x2553B1: bgp_process_packet (in /usr/lib/frr/bgpd)
==668516== by 0x49299F0: thread_call (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x48E23E7: frr_run (in /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0)
==668516== by 0x1F38AC: main (in /usr/lib/frr/bgpd)
==668516==
==668516== LEAK SUMMARY:
==668516== definitely lost: 936 bytes in 26 blocks
==668516== indirectly lost: 12,412 bytes in 93 blocks
==668516== possibly lost: 0 bytes in 0 blocks
==668516== still reachable: 1,531,006 bytes in 328 blocks
==668516== suppressed: 220 bytes in 3 blocks
==668516== Reachable blocks (those to which a pointer was found) are not shown.
==668516== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==668516==
==668516== For lists of detected and suppressed errors, rerun with: -s
==668516== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)

Command used: inside each ospf folder.
sudo -E pytest -s -v --valgrind-memleaks

Script where leak is seen: bgp_instance_del_test.test_bgp_instance_del_test

@ton31337
Copy link
Member

This is backported to stable/8.5, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants