uw-ictd / open5gs

open5gs is an open source implementation of the Evolved Packet Core and 5GC supporting 3GPP Release 16. This repository is a maintenance and research fork of the main upstream open5gs/open5gs.
https://open5gs.org
GNU Affero General Public License v3.0
2 stars 0 forks source link

enb_ue not found during ContextSetupResponse handling. Possible race condition? #4

Open spencersevilla opened 4 years ago

spencersevilla commented 4 years ago

I encountered a codepath once wherein the ogs_assert on enb_ue failed (see #3 ). Not sure why this happened, because the MME literally created this enb_ue ID in order to send the ContextSetupReequest, which MUST have been sent before the MME could have possibly handled a ContextSetupResponse.

I will dig further but in the meantime I suspect a race condition due to the lack of mutexes/locks on the enb_ue list.

pathiratk commented 4 years ago

I have added the lock for get and set functions