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

pimd: memory leak fix and issue fix (backport #9085) #9297

Merged
merged 2 commits into from
Aug 4, 2021

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Aug 4, 2021

This is an automatic backport of pull request #9085 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

…rpf unresolved

Problem:
S,G entry has iif = oif in FHR is LHR case.

Setup:-

R11-----R2----R4

R11 :- FHR and LHR
R2 :- RP
R4 :- LHR

Issue :-

1) shut mapped interface in R11
2) wait for 5 min
3) do FRR restart
5) No shut of mapped interface

OIL is added for local interface also where OIL is same as IIF
and duplicate traffic observed on R4 receives in Ixia

RCA:
pim_ifchannel_local_membership_add adds inherited oif from starg when iif for
SG is unavailable.
When  rpf for that SG resolves to this inherited oif from starg, iif is also in oif.
This results in dup traffic.

Fix:
If iif is not available, do not inherit from starg.

Signed-off-by: Mobashshera Rasool <[email protected]>
(cherry picked from commit 660b044)
Problem Statement:
==================
valgrind shows memleaks in rp_table, when pimd shuts down gracefully.
2020-05-05 22:09:29,451 ERROR: Memory leaks in router [r4] for daemon [pimd]
2020-05-05 22:09:29,451 ERROR: Memory leaks in router [r4] for daemon [zebra]
2020-05-05 22:09:29,637 ERROR: Found memory leak in module pimd
2020-05-05 22:09:29,638 ERROR: ==6178== 184 (56 direct, 128 indirect) bytes in 1 blocks are definitely lost in loss record 21 of 21
2020-05-05 22:09:29,638 ERROR: ==6178== at 0x4C2FFAC: calloc (vg_replace_malloc.c:762)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4E855EE: qcalloc (memory.c:111)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4EAA43C: route_table_init_with_delegate (table.c:52)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x1281A1: pim_rp_init (pim_rp.c:114)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11D0F8: pim_instance_init (pim_instance.c:117)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11D0F8: pim_vrf_new (pim_instance.c:150)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4EB1BEC: vrf_get (vrf.c:209)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x4EB2B2F: vrf_init (vrf.c:493)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11D227: pim_vrf_init (pim_instance.c:217)
2020-05-05 22:09:29,638 ERROR: ==6178== by 0x11BBAB: main (pim_main.c:121)

Fix:
====
rp_info is allocated in pim_rp_init API. rp_info pointer is present
in rp_list and rp_table. In rp_list cleanup, the memory for rp_info
gets freed. rp_table clean up should be done first and then rp_list.

Signed-off-by: Mobashshera Rasool <[email protected]>
(cherry picked from commit 906640d)
@LabN-CI
Copy link
Collaborator

LabN-CI commented Aug 4, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/9297 ced44c1
Date 08/04/2021
Start 12:36:20
Finish 13:01:48
Run-Time 25:28
Total 1813
Pass 1813
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-08-04-12:36:20.txt
Log autoscript-2021-08-04-12:37:31.log.bz2
Memory 493 506 420

For details, please contact louberger

@donaldsharp donaldsharp merged commit ef91863 into stable/8.0 Aug 4, 2021
@mergify mergify bot deleted the mergify/bp/stable/8.0/pr-9085 branch August 4, 2021 17:05
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20803/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topotests debian 10 amd64 part 4: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO4DEB10AMD64-20803/test

Topology Tests failed for Topotests debian 10 amd64 part 4:

2021-08-04 18:21:59,813 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 2512, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp community-list standard ANY permit 0:-1 



2021-08-04 18:22:00,101 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 2512, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp community-list standard ANY permit 0:65536 



2021-08-04 18:22:00,344 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 2512, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp large-community-list standard ANY permit 0:4294967296 



2021-08-04 18:22:00,594 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 2512, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp large-community-list standard ANY permit 0:-1:1 



2021-08-04 18:22:02,160 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 2512, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp large-community-list standard ANY permit 1:a:2 



2021-08-04 18:24:45,102 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 2512, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO4DEB10AMD64/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Unknown command[4]: bgp large-community-list standard Test1 permit  


r4: Daemon bgpd not running

From frr r4 bgpd log file:
2021/08/04 18:26:49 BGP: [HG1WF-2N96F] YANG model "ietf-inet-types@*" "*@*"not embedded, trying external file
2021/08/04 18:26:49 BGP: [HG1WF-2N96F] YANG model "ietf-yang-types@*" "*@*"not embedded, trying external file
2021/08/04 18:26:49 BGP: [T83RR-8SM5G] bgpd 8.0 starting: vty@2605, [email protected]:179
2021/08/04 18:26:50 BGP: [M7Q4P-46WDR] vty[??]@(config)# log file bgpd.log
2021/08/04 18:26:54 BGP: [M7Q4P-46WDR] vty[??]@> enable
2021/08/04 18:26:54 BGP: [M7Q4P-46WDR] vty[??]@# configure terminal
2021/08/04 18:26:54 BGP: [M7Q4P-46WDR] vty[??]@(config)# XFRR_start_configuration
2021/08/04 18:26:54 BGP: [M7Q4P-46WDR] vty[??]@(config)# router bgp 3000 

2021/08/04 18:26:54 BGP: [WNS64-X9NY5][EC 100663299] bind: Cannot assign requested address
2021/08/04 18:26:54 BGP: [HHAYK-1Y778][EC 100663299] bgp_socket: no usable addresses please check other programs usage of specified port 179
2021/08/04 18:26:54 BGP: [VD9ME-QCNTF][EC 100663299] bgp_socket: Program cannot continue

2021-08-04 18:26:55,534 ERROR: assert failed at "test_bgp_listen_on_multiple_addresses/test_peering": r4: Daemon bgpd not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20803/artifact/TOPO4DEB10AMD64/ErrorLog/log_topotests.txt

Successful on other platforms/tests
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests debian 10 amd64 part 3
  • Addresssanitizer topotests part 6
  • Topotests debian 10 amd64 part 2
  • Ubuntu 16.04 deb pkg check
  • Topotests debian 10 amd64 part 7
  • Addresssanitizer topotests part 3
  • Topotests Ubuntu 18.04 i386 part 6
  • Topotests debian 10 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 5
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 arm8 part 8
  • Debian 9 deb pkg check
  • IPv4 ldp protocol on Ubuntu 18.04
  • Topotests debian 10 amd64 part 1
  • Topotests Ubuntu 18.04 arm8 part 7
  • Topotests Ubuntu 18.04 arm8 part 2
  • Topotests debian 10 amd64 part 9
  • Ubuntu 20.04 deb pkg check
  • Topotests Ubuntu 18.04 i386 part 0
  • Topotests Ubuntu 18.04 i386 part 5
  • Topotests Ubuntu 18.04 arm8 part 9
  • Debian 10 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 8
  • Addresssanitizer topotests part 2
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests debian 10 amd64 part 5
  • Fedora 29 rpm pkg check
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests Ubuntu 18.04 arm8 part 4
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 amd64 part 9
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 0
  • Topotests Ubuntu 18.04 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests Ubuntu 18.04 i386 part 7
  • Addresssanitizer topotests part 0
  • Topotests debian 10 amd64 part 6
  • Addresssanitizer topotests part 5
  • Static analyzer (clang)
  • Addresssanitizer topotests part 4
  • Ubuntu 18.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 amd64 part 1
  • Topotests Ubuntu 18.04 amd64 part 4
  • IPv6 protocols on Ubuntu 18.04
  • Topotests Ubuntu 18.04 amd64 part 2
  • Addresssanitizer topotests part 1
  • CentOS 7 rpm pkg check
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 arm8 part 3

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

Successfully merging this pull request may close these issues.

5 participants