Skip to content

Conversation

@rsarwad
Copy link
Owner

@rsarwad rsarwad commented Dec 11, 2020

AGW] Added code to handle 3495 timer for both default and dedicated bearer while mme restarts

Summary
Added code to handle 3495 timer for both default and dedicated bearer while mme restarts

Test Plan
Executed s1ap sanity test suite
New testcases are added to validate 3495 timer changes.
These testcases are available in PR, magma#4016

rsarwad and others added 30 commits November 29, 2020 03:39
Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
…95_timer

Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
…95_timer

Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
Signed-off-by: Matthew Mosesohn <matthew.mosesohn@gmail.com>
Signed-off-by: Scott8440 <scott8440@gmail.com>
Signed-off-by: Oriol Batalla <obatalla@fb.com>
Signed-off-by: HannaFar <hannafarag159@gmail.com>
Signed-off-by: Evgeniy Makeev <evgeniym@fb.com>
Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
Signed-off-by: Raphael Defosseux <raphael.defosseux@openairinterface.org>
* Rework Magma header and styles to match magmacore.org

- Updated font to open sans
- Matching h1 header style with magmamcore.org
- Create menu to match
- Update logo to proper logo w/ correct font
- Removed "Version", but kept link in header
- Switched default colors to purple

Signed-off-by: Jimmy McArthur <jimmy@tipit.net>

* Style overrides in custom css

Signed-off-by: Jimmy McArthur <jimmy@tipit.net>

* Removed offending } in custom CSS

Signed-off-by: Jimmy McArthur <jimmy@tipit.net>

* Update community link

- Switch to magmacore.org/community

Signed-off-by: Jimmy McArthur <jimmy@tipit.net>
:

* Reduced font size to 16px on navGroupCategoryTitle to fix spacing issue

Signed-off-by: Jimmy McArthur <jimmy@tipit.net>

* [docs] Update Docs link to latest

- Swap github.io to docs.magmacore.org

Signed-off-by: Jimmy McArthur <jimmy@tipit.net>
Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
Signed-off-by: Marie Bremner <marwhal@fb.com>
* Enable log and events aggregation by default

Signed-off-by: Wally Rodriguez B <wallyrb@fb.com>

* Enable log and events aggregation by default

Signed-off-by: Wally Rodriguez B <wallyrb@fb.com>
Signed-off-by: Timothée Dzik <timdzik@fb.com>
Signed-off-by: Scott8440 <scott8440@gmail.com>
Signed-off-by: Wally Rodriguez B <wallyrb@fb.com>
Signed-off-by: Michael Germano <mgermano@fb.com>
Signed-off-by: Marie Bremner <marwhal@fb.com>
needed to operate with `third_party/build/build.py`

Signed-off-by: Ken Kahrs <kkahrs@gmail.com>
Signed-off-by: HannaFar <hannafarag159@gmail.com>
* Added code to handle 3485 timer for dedicated bearer
* Fixed the MME crash observed while testing 3485 timer for default bearer when mme restarts

Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
HannaFar and others added 2 commits December 13, 2020 05:04
Signed-off-by: HannaFar <hannafarag159@gmail.com>
…d_handle_3495_timer

Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
@rsarwad rsarwad force-pushed the rsarwad_handle_3495_timer branch from cb67497 to 0f61c16 Compare December 14, 2020 06:55
themarwhal and others added 21 commits December 14, 2020 09:52
Signed-off-by: Marie Bremner <marwhal@fb.com>
Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
Signed-off-by: Marie Bremner <marwhal@fb.com>
Signed-off-by: Timothée Dzik <timdzik@fb.com>
Signed-off-by: Oriol Batalla <obatalla@fb.com>
Signed-off-by: Oriol Batalla <obatalla@fb.com>
* Added code to handle 3495 timer for dedicated bearer while MME restarts

Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
* tmp

Signed-off-by: Scott8440 <scott8440@gmail.com>

* [orc8r][metricsd] Cache series values for grafana

Signed-off-by: Scott8440 <scott8440@gmail.com>
Signed-off-by: Alejandro Rodriguez <alexrod@fb.com>
Signed-off-by: Scott8440 <scott8440@gmail.com>
Signed-off-by: Evgeniy Makeev <evgeniym@fb.com>
Signed-off-by: Michael Germano <mgermano@fb.com>
Signed-off-by: Scott8440 <scott8440@gmail.com>
Signed-off-by: Joary Paulo Wanzeler Fortuna <joarypl@fb.com>
Signed-off-by: Scott8440 <scott8440@gmail.com>

Co-authored-by: Michael Germano <mgermano@fb.com>
Signed-off-by: Michael Germano <mgermano@fb.com>
Signed-off-by: Hunter Gatewood <hgatewood@gmail.com>
Signed-off-by: YOUSSEF EL MASMOUDI <ymasmoudi@fb.com>
…95_timer

Signed-off-by: rashmi <rashmi.sarwad@radisys.com>
rsarwad pushed a commit that referenced this pull request Dec 16, 2020
* Add T3489 tests

Introduce a new test to validate T3489 expiry.

Credit to ulaskozat for the diff

Testing done:
Verified that an ASAN use after free occurs on timer expiry

=7031==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000093460 at pc 0x555807545462 bp 0x7f87093fd2b0 sp 0x7f87093fd2a8
WRITE of size 8 at 0x603000093460 thread T16
    #0 0x555807545461 in nas_stop_T3489 /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_data_context.c:101
    #1 0x5558075c47c5 in esm_proc_esm_information_response /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_information.c:119
    #2 0x55580759339b in esm_recv_information_response /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/sap/esm_recv.c:575
    #3 0x555807551fba in _esm_sap_recv /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/sap/esm_sap.c:679
    #4 0x555807550f33 in esm_sap_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/sap/esm_sap.c:283
    #5 0x5558075195a0 in lowerlayer_data_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/LowerLayer.c:276
    #6 0x55580757848f in _emm_as_data_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:688
    #7 0x555807574ec4 in emm_as_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:180
    #8 0x55580753147f in emm_sap_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_sap.c:105
    #9 0x5558074d74fc in nas_proc_ul_transfer_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/nas_proc.c:326
    #10 0x5558071bd634 in handle_message /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:97
    #11 0x7f871bb277bd in zloop_start (/usr/lib/x86_64-linux-gnu/libczmq.so.4+0x287bd)
    #12 0x5558071bf169 in mme_app_thread /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:447
    #13 0x7f871e11f4a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)
    #14 0x7f871a494d0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e)

0x603000093460 is located 0 bytes inside of 32-byte region [0x603000093460,0x603000093480)
freed by thread T16 here:
    #0 0x7f871e602a10 in free (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1a10)
    #1 0x5558070dc054 in free_wrapper /home/vagrant/magma/lte/gateway/c/oai/common/dynamic_memory_check.c:47
    #2 0x555807545496 in nas_stop_T3489 /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_data_context.c:103
    #3 0x5558075c517a in _esm_information /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_information.c:269
    #4 0x5558075c4e15 in _esm_information_t3489_handler /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_information.c:199
    #5 0x5558074e2e8a in mme_app_nas_timer_handle_signal_expiry /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/util/nas_timer.c:100
    #6 0x5558071be2d2 in handle_message /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:235
    #7 0x7f871bb277bd in zloop_start (/usr/lib/x86_64-linux-gnu/libczmq.so.4+0x287bd)

Signed-off-by: Amar Padmanabhan <amarpadmanabhan@fb.com>

* Invalidate the T3849 timer id while processing esm information retransmit

The _esm_information function stops the existing T3849 timer as referenced
by the esm_ctxt datastructure timer before rescheduling a new T3849 timer
when it requests for the esm info from a UE.
Stopping the timer has a side effect of freeing up the UE related
retransmission data associated with it. This causes issues during
the T3849 timer expiry handling as the cancelled timer and the rescheduled
one reuse the same retransmission data datastructure.

Fix this by unsetting the T3849 timer in the handling of the timer expiry
as the esm_ctxt is not associated with any valid timers anymore. Further
as the timer is a oneshot timer it will be cleaned up after the processing
of the timer callback.

Signed-off-by: Amar Padmanabhan <amarpadmanabhan@fb.com>
@rsarwad rsarwad closed this Dec 16, 2020
rsarwad pushed a commit that referenced this pull request Apr 19, 2021
* Add T3489 tests

Introduce a new test to validate T3489 expiry.

Credit to ulaskozat for the diff

Testing done:
Verified that an ASAN use after free occurs on timer expiry

=7031==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000093460 at pc 0x555807545462 bp 0x7f87093fd2b0 sp 0x7f87093fd2a8
WRITE of size 8 at 0x603000093460 thread T16
    #0 0x555807545461 in nas_stop_T3489 /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_data_context.c:101
    #1 0x5558075c47c5 in esm_proc_esm_information_response /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_information.c:119
    #2 0x55580759339b in esm_recv_information_response /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/sap/esm_recv.c:575
    #3 0x555807551fba in _esm_sap_recv /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/sap/esm_sap.c:679
    #4 0x555807550f33 in esm_sap_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/sap/esm_sap.c:283
    #5 0x5558075195a0 in lowerlayer_data_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/LowerLayer.c:276
    #6 0x55580757848f in _emm_as_data_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:688
    #7 0x555807574ec4 in emm_as_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_as.c:180
    #8 0x55580753147f in emm_sap_send /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/emm/sap/emm_sap.c:105
    #9 0x5558074d74fc in nas_proc_ul_transfer_ind /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/nas_proc.c:326
    #10 0x5558071bd634 in handle_message /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:97
    #11 0x7f871bb277bd in zloop_start (/usr/lib/x86_64-linux-gnu/libczmq.so.4+0x287bd)
    #12 0x5558071bf169 in mme_app_thread /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:447
    #13 0x7f871e11f4a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)
    #14 0x7f871a494d0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e)

0x603000093460 is located 0 bytes inside of 32-byte region [0x603000093460,0x603000093480)
freed by thread T16 here:
    #0 0x7f871e602a10 in free (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1a10)
    #1 0x5558070dc054 in free_wrapper /home/vagrant/magma/lte/gateway/c/oai/common/dynamic_memory_check.c:47
    #2 0x555807545496 in nas_stop_T3489 /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_data_context.c:103
    #3 0x5558075c517a in _esm_information /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_information.c:269
    #4 0x5558075c4e15 in _esm_information_t3489_handler /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/esm/esm_information.c:199
    #5 0x5558074e2e8a in mme_app_nas_timer_handle_signal_expiry /home/vagrant/magma/lte/gateway/c/oai/tasks/nas/util/nas_timer.c:100
    #6 0x5558071be2d2 in handle_message /home/vagrant/magma/lte/gateway/c/oai/tasks/mme_app/mme_app_main.c:235
    #7 0x7f871bb277bd in zloop_start (/usr/lib/x86_64-linux-gnu/libczmq.so.4+0x287bd)

Signed-off-by: Amar Padmanabhan <amarpadmanabhan@fb.com>

* Invalidate the T3849 timer id while processing esm information retransmit

The _esm_information function stops the existing T3849 timer as referenced
by the esm_ctxt datastructure timer before rescheduling a new T3849 timer
when it requests for the esm info from a UE.
Stopping the timer has a side effect of freeing up the UE related
retransmission data associated with it. This causes issues during
the T3849 timer expiry handling as the cancelled timer and the rescheduled
one reuse the same retransmission data datastructure.

Fix this by unsetting the T3849 timer in the handling of the timer expiry
as the esm_ctxt is not associated with any valid timers anymore. Further
as the timer is a oneshot timer it will be cleaned up after the processing
of the timer callback.

Signed-off-by: Amar Padmanabhan <amarpadmanabhan@fb.com>
rsarwad pushed a commit that referenced this pull request Nov 5, 2021
Fix:
     1. Adding slice descriptor support in ics packet
     2. Addressing magma#9939

Test:
     1. test_oai
     2. Simulator test call flow

Logs:
    6/18 Test  #6: test_ngap .........................   Passed    0.42
sec

    ST/SD : 02 01 00 00 01

Signed-off-by: Yogesh Pandey <yogesh@wavelabs.ai>
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

Successfully merging this pull request may close these issues.