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

zebra: memory leaks reported by AddressSanitizer after running topotes #2228

Closed
louberger opened this issue May 14, 2018 · 1 comment
Closed
Assignees
Labels

Comments

@louberger
Copy link
Member

louberger commented May 14, 2018

Seen after running https://github.com/FRRouting/topotests/tree/master/bgp_l3vpn_to_bgp_vrf

ubuntu17-1> cat /tmp/topotests/bgp_l3vpn_to_bgp_vrf.test_bgp_l3vpn_to_bgp_vrf/r4/zebra.err
==23131==Processing thread 22154.
==23131==Stack at 0x7ffc8d76f000-0x7ffc8df6f000 (SP = 0x7ffc8df6d288).
==23131==TLS at 0x7f29adbda640-0x7f29adbdb6c0.

=================================================================
==22154==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 224 byte(s) in 2 object(s) allocated from:
    #0 0x7f29acaf7d38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38)
    #1 0x556a95c0536e in qcalloc lib/memory.c:69
    #2 0x556a95b72733 in nhlfe_add zebra/zebra_mpls.c:1167
    #3 0x556a95b78e01 in mpls_lsp_install zebra/zebra_mpls.c:2325
    #4 0x556a95bcf680 in zread_vrf_label zebra/zapi_msg.c:2712
    #5 0x556a95bdda2f in zserv_handle_commands zebra/zapi_msg.c:2957
    #6 0x556a95bc844f in zserv_process_messages zebra/zserv.c:364
    #7 0x556a95c39c06 in thread_call lib/thread.c:1534
    #8 0x556a95bffc87 in frr_run lib/libfrr.c:879
    #9 0x556a95b3bfbc in main zebra/main.c:379
    #10 0x7f29aba9e1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

Indirect leak of 112 byte(s) in 2 object(s) allocated from:
    #0 0x7f29acaf7d38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38)
    #1 0x556a95c0536e in qcalloc lib/memory.c:69
    #2 0x556a95b7269c in nhlfe_add zebra/zebra_mpls.c:1159
    #3 0x556a95b78e01 in mpls_lsp_install zebra/zebra_mpls.c:2325
    #4 0x556a95bcf680 in zread_vrf_label zebra/zapi_msg.c:2712
    #5 0x556a95bdda2f in zserv_handle_commands zebra/zapi_msg.c:2957
    #6 0x556a95bc844f in zserv_process_messages zebra/zserv.c:364
    #7 0x556a95c39c06 in thread_call lib/thread.c:1534
    #8 0x556a95bffc87 in frr_run lib/libfrr.c:879
    #9 0x556a95b3bfbc in main zebra/main.c:379
    #10 0x7f29aba9e1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

Indirect leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x7f29acaf7d38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38)
    #1 0x556a95c0536e in qcalloc lib/memory.c:69
    #2 0x556a95b722e3 in lsp_alloc zebra/zebra_mpls.c:1046
    #3 0x556a95bf811f in hash_get lib/hash.c:159
    #4 0x556a95b78bd0 in mpls_lsp_install zebra/zebra_mpls.c:2296
    #5 0x556a95bcf680 in zread_vrf_label zebra/zapi_msg.c:2712
    #6 0x556a95bdda2f in zserv_handle_commands zebra/zapi_msg.c:2957
    #7 0x556a95bc844f in zserv_process_messages zebra/zserv.c:364
    #8 0x556a95c39c06 in thread_call lib/thread.c:1534
    #9 0x556a95bffc87 in frr_run lib/libfrr.c:879
    #10 0x556a95b3bfbc in main zebra/main.c:379
    #11 0x7f29aba9e1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

Indirect leak of 16 byte(s) in 2 object(s) allocated from:
    #0 0x7f29acaf7d38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38)
    #1 0x556a95c0536e in qcalloc lib/memory.c:69
    #2 0x556a95c07714 in nexthop_add_labels lib/nexthop.c:226
    #3 0x556a95b72754 in nhlfe_add zebra/zebra_mpls.c:1172
    #4 0x556a95b78e01 in mpls_lsp_install zebra/zebra_mpls.c:2325
    #5 0x556a95bcf680 in zread_vrf_label zebra/zapi_msg.c:2712
    #6 0x556a95bdda2f in zserv_handle_commands zebra/zapi_msg.c:2957
    #7 0x556a95bc844f in zserv_process_messages zebra/zserv.c:364
    #8 0x556a95c39c06 in thread_call lib/thread.c:1534
    #9 0x556a95bffc87 in frr_run lib/libfrr.c:879
    #10 0x556a95b3bfbc in main zebra/main.c:379
    #11 0x7f29aba9e1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

SUMMARY: AddressSanitizer: 432 byte(s) leaked in 8 allocation(s).
ubuntu17-1> cat /tmp/topotests/bgp_l3vpn_to_bgp_vrf.test_bgp_l3vpn_to_bgp_vrf/r2/bgpd.err
==23152==Processing thread 22306.
==23152==Stack at 0x7fff1f323000-0x7fff1fb23000 (SP = 0x7fff1fb20c98).
==23152==TLS at 0x7fa9685a4640-0x7fa9685a56c0.
@rzalamena
Copy link
Member

topotest now complains when there are memory leaks, so I think it is safe to close this.

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

No branches or pull requests

3 participants