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

fix(agw): Fixed memory leaks on v1.5.2 branch #8647

Closed

Conversation

pruthvihebbani
Copy link
Contributor

fix(agw): Fixed memory leaks on v1.5.2 branch

Summary

Fixed memory leaks found during the execution of the following TCs which are part of sanity:

  1. test_tau_periodic_inactive.py
  2. test_tau_periodic_active.py
  3. test_attach_detach_enb_rlf_initial_ue_msg.py
    Leak before the fix:
    magma-dev-focal mme[233466]: ==233466==ERROR: LeakSanitizer: detected memory leaks
    magma-dev-focal mme[233466]: Direct leak of 16 byte(s) in 1 object(s) allocated from:
    magma-dev-focal mme[233466]: #0 0x7fb4700c7dc6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6)
    magma-dev-focal mme[233466]: Fix badge url to travis #1 0x562177202e91 in create_new_attach_info /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/Attach.c:2550
    magma-dev-focal mme[233466]: [Fix] Slight changes to quick start #2 0x5621771d7aec in emm_proc_attach_request /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/Attach.c:399
    magma-dev-focal mme[233466]: Make travis builds more resilient with travis_retry travis_wait #3 0x56217729f0ec in emm_recv_attach_request /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_recv.c:422
    magma-dev-focal mme[233466]: Kill the materializer service #4 0x562177326766 in emm_as_recv /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:377
    magma-dev-focal mme[233466]: Add new download target to cloud Makefile for go mod download #5 0x56217732b3a4 in emm_as_data_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:678
    magma-dev-focal mme[233466]: Remove mconfig_streamer from orc8r gateway #6 0x562177324dc6 in emm_as_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:180
    magma-dev-focal mme[233466]: Scrub the codebase of everything kafka-related. #7 0x5621772ad8b6 in emm_sap_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_sap.c:105
    magma-dev-focal mme[233466]: OAI EPC revision history not preserved #8 0x5621771a8b27 in nas_proc_ul_transfer_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/nas_proc.c:326
    magma-dev-focal mme[233466]: Add SWx Proxy SAR integration tests #9 0x562176af50a8 in handle_message /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:95
    magma-dev-focal mme[233466]: Stop incrementing IND when generating auth vectors #10 0x7fb46f23e5c6 in zloop_start (/lib/x86_64-linux-gnu/libczmq.so.4+0x295c6)
    magma-dev-focal mme[233466]: Direct leak of 8 byte(s) in 4 object(s) allocated from:
    magma-dev-focal mme[233466]: #0 0x7fb4700c7dc6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6)
    magma-dev-focal mme[233466]: Fix badge url to travis #1 0x56217726d5d4 in emm_tracking_area_update_accept /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/TrackingAreaUpdate.c:753
    magma-dev-focal mme[233466]: [Fix] Slight changes to quick start #2 0x562177268ea2 in emm_proc_tracking_area_update_request /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/TrackingAreaUpdate.c:352
    magma-dev-focal mme[233466]: Make travis builds more resilient with travis_retry travis_wait #3 0x5621772a3c53 in emm_recv_tracking_area_update_request /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_recv.c:668
    magma-dev-focal mme[233466]: Kill the materializer service #4 0x56217732e19c in emm_as_establish_req /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:871
    magma-dev-focal mme[233466]: Add new download target to cloud Makefile for go mod download #5 0x562177324f41 in emm_as_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:185
    magma-dev-focal mme[233466]: Remove mconfig_streamer from orc8r gateway #6 0x5621772ad8b6 in emm_sap_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_sap.c:105
    magma-dev-focal mme[233466]: Scrub the codebase of everything kafka-related. #7 0x5621771a7ab7 in nas_proc_establish_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/nas_proc.c:185
    magma-dev-focal mme[233466]: OAI EPC revision history not preserved #8 0x562176b085f7 in mme_app_handle_initial_ue_message /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_bearer.c:717
    magma-dev-focal mme[233466]: Add SWx Proxy SAR integration tests #9 0x562176af6443 in handle_message /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:202
    magma-dev-focal mme[233466]: Stop incrementing IND when generating auth vectors #10 0x7fb46f23e5c6 in zloop_start (/lib/x86_64-linux-gnu/libczmq.so.4+0x295c6)
    magma-dev-focal mme[233466]: SUMMARY: AddressSanitizer: 24 byte(s) leaked in 5 allocation(s).

Test Plan

  • Verified that the above mentioned leaks are not seen after the execution of sanity

Additional Information

  • On 1.5.2 OVS flow verification is failing. So commented out that part in the TCs and executed sanity

mcallahan and others added 30 commits April 16, 2021 16:22
Bump the new LTE deploy version to v1.5 on the v1.5 branch

Signed-off-by: Michael Callahan <michaelcallahan@fb.com>
Signed-off-by: Marie Bremner <marwhal@fb.com>
Signed-off-by: Alex Rodriguez <ardzoht@gmail.com>
Signed-off-by: Tariq Al-Khasib <talkhasib@fb.com>
This patch fixes following error:
magma-dev-focal mme[72010]: c/oai/tasks/s1ap/s1ap_mme_handlers.c:3374:33: \
runtime error: member access within null pointer of type 'struct S1ap_E_RABSetupResponseIEs_t'

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
)

Following patch separates DNS and network check into two
separate checks. It also updates DNS config to set correct
DNS for AGW.
It also creates sym-link to service file as required on Ubuntu.

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
)

OVS action transation code throws asserts on packet that traverse
from L3 to L3 port. This is due to incorrect assumpltion of packet
state. Following patch removes incurrect assert.

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
… reception of AIA (magma#6183)

Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
This adds HandoverRequestAcknowledge and HandoverCommand message flow to
the MME, which are step two of the HandoverResourceAllocation and
HandoverPreparation procedures respectively.

Signed-off-by: Shaddi Hasan <shasan@fb.com>
Signed-off-by: Karthik Subraveti <ksubraveti@fb.com>
Signed-off-by: HannaFar <hannafarag159@gmail.com>
Signed-off-by: Oriol Batalla <obatalla@fb.com>
…c8r (magma#6199)

Signed-off-by: Karthik Subraveti <ksubraveti@fb.com>
Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
* Add missing parameter in log message

Signed-off-by: Ulas Kozat <kozat@fb.com>
Signed-off-by: Karthik Subraveti <ksubraveti@fb.com>
service procps is suppose to read config from '/etc/sysctl.d/'
and apply it at startup. But it is not applying it due to known bug.
Restarting this service seems to apply all configuration.
Following patch add this step to sctpd service start.

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
Signed-off-by: Shaddi Hasan <shasan@fb.com>
Signed-off-by: Karthik Subraveti <ksubraveti@fb.com>
Signed-off-by: Shaddi Hasan <shasan@fb.com>
Signed-off-by: Ulas Kozat <kozat@fb.com>
* [Pipelined]Remove Stale OVS IPFIX state on Restarts

Signed-off-by: Nick Yurchenko <koolzz@fb.com>

* Lint fix

Signed-off-by: Nick Yurchenko <koolzz@fb.com>
Signed-off-by: Karthik Subraveti <ksubraveti@fb.com>
Indicate no data forwarding supported during S1 handover, and store
resulting E-RABs from the target eNBs in the UE state for updating
bearers when procedure is complete.

Signed-off-by: Shaddi Hasan <shasan@fb.com>
In some deployment scenarios net-tools package is missing.
install it before setting up the networking during deployment.

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
Signed-off-by: Marie Bremner <marwhal@fb.com>
Adds support for HandoverNotify procedure. When we receive a HO Notify,
handover has completed successfully on the target UE, so we modify
bearers and clean up any state associated with the old UE<>eNB
association, which we do here.

Signed-off-by: Shaddi Hasan <shasan@fb.com>
Signed-off-by: Nick Yurchenko <koolzz@fb.com>
tmdzk and others added 4 commits June 25, 2021 01:44
* Bump to 1.5.2 in v1.5

Signed-off-by: Timothée Dzik <timdzik@fb.com>

* Bump to 1.5.2 in v1.5

Signed-off-by: Timothée Dzik <timdzik@fb.com>
Signed-off-by: Timothée Dzik <timdzik@fb.com>
Signed-off-by: Pruthvi Hebbani <pruthvi.hebbani@radisys.com>
Signed-off-by: Pruthvi Hebbani <pruthvi.hebbani@radisys.com>
@pruthvihebbani pruthvihebbani requested review from a team August 16, 2021 17:23
@pruthvihebbani pruthvihebbani requested a review from a team as a code owner August 16, 2021 17:23
@pruthvihebbani pruthvihebbani requested review from a team August 16, 2021 17:23
@pull-request-size pull-request-size bot added the size/XXL Denotes a Pull Request that changes 1000+ lines. label Aug 16, 2021
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@magmabot magmabot added component: agw Access gateway-related issue component: cwag CWAG related issues labels Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: agw Access gateway-related issue component: cwag CWAG related issues size/XXL Denotes a Pull Request that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet