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 for network initiated detach procedure #13086

Closed
rsarwad opened this issue Jun 27, 2022 · 6 comments
Closed

Memory leak found for network initiated detach procedure #13086

rsarwad opened this issue Jun 27, 2022 · 6 comments
Labels
type: bug Something isn't working

Comments

@rsarwad
Copy link
Contributor

rsarwad commented Jun 27, 2022

Your Environment

  • **Version: Master code base
  • **Affected Component: Access Gateway
  • **Affected Subcomponent: MME service
  • **Deployment Environment: Local Vagrant setup

Describe the Issue

Memory leak is observed while executing s1ap sanity test suite. From trace it appears that the leak is observed for network initiated detach procedure. Below is the back trace

Jun 15 12:03:23 magma-dev-focal mme[1182337]: =================================================================
Jun 15 12:03:23 magma-dev-focal mme[1182337]: ==1182337==ERROR: LeakSanitizer: detected memory leaks
Jun 15 12:03:23 magma-dev-focal mme[1182337]: Direct leak of 120 byte(s) in 1 object(s) allocated from:
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #0 0x7f5f1e5c7dc6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6)
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #1 0x55e96891e3f4 in mme_app_handle_nw_init_ded_bearer_actv_req /home/vagrant/magma/lte/gateway/c/core/oai/tasks/mme_app/mme_app_bearer.c:3207
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #2 0x55e9688dbeef in handle_message /home/vagrant/magma/lte/gateway/c/core/oai/tasks/mme_app/mme_app_main.c:372
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #3 0x7f5f1d7ca5c6 in zloop_start (/lib/x86_64-linux-gnu/libczmq.so.4+0x295c6)
Jun 15 12:03:23 magma-dev-focal mme[1182337]: Direct leak of 48 byte(s) in 1 object(s) allocated from:
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #0 0x7f5f1e5c7dc6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6)
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #1 0x7f5f1d7c5c0f in zlist_new (/lib/x86_64-linux-gnu/libczmq.so.4+0x24c0f)
Jun 15 12:03:23 magma-dev-focal mme[1182337]: Indirect leak of 560 byte(s) in 1 object(s) allocated from:
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #0 0x7f5f1e5c7dc6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6)
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #1 0x55e96891df10 in mme_app_handle_nw_init_ded_bearer_actv_req /home/vagrant/magma/lte/gateway/c/core/oai/tasks/mme_app/mme_app_bearer.c:3188
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #2 0x55e9688dbeef in handle_message /home/vagrant/magma/lte/gateway/c/core/oai/tasks/mme_app/mme_app_main.c:372
Jun 15 12:03:23 magma-dev-focal mme[1182337]: #3 0x7f5f1d7ca5c6 in zloop_start (/lib/x86_64-linux-gnu/libczmq.so.4+0x295c6)
Jun 15 12:03:23 magma-dev-focal mme[1182337]: SUMMARY: AddressSanitizer: 728 byte(s) leaked in 3 allocation(s).
Jun 15 12:03:28 magma-dev-focal systemd[1]: magma@mme.service: Main process exited, code=dumped, status=6/ABRT
Jun 15 12:03:28 magma-dev-focal mme[1185586]: ERROR:root:Failed to write to redis, status Error 111 connecting to 127.0.0.1:6380. Connection refused.
Jun 15 12:03:28 magma-dev-focal mme[1185586]: ERROR:root:Logging exit info instead

@rsarwad rsarwad added the type: bug Something isn't working label Jun 27, 2022
@MAAHamid
Copy link

MAAHamid commented Jul 3, 2022

down grading the jinja2 version
sudo pip3 install Jinja2==3.0.3
Then stop and start magma service
sudo service magma@* stop
sudo service magma@magmad start

@MAAHamid
Copy link

MAAHamid commented Jul 3, 2022

this was reported to wavelabs 5G support before, idk when permanent remedy will be available

@rsarwad
Copy link
Contributor Author

rsarwad commented Jul 4, 2022

Hi @MAAHamid, Please find the fixes in PR, #13173
Let me know if you face any issue.

@MAAHamid
Copy link

MAAHamid commented Jul 4, 2022

Hi @MAAHamid, Please find the fixes in PR, #13173 Let me know if you face any issue.

thanks for sharing the PR

@voisey
Copy link
Contributor

voisey commented Jul 14, 2022

@rsarwad Can this be closed now that #13173 has been merged?

@rsarwad
Copy link
Contributor Author

rsarwad commented Jul 15, 2022

@rsarwad Can this be closed now that #13173 has been merged?

Thank you @voisey for bringing into notice. Sure! I will close

@rsarwad rsarwad closed this as completed Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants