From 1a3bf557cf0491d07d65e3a3f92fa3cfdd508d99 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 31 Mar 2026 22:34:33 +0200 Subject: [PATCH] delay transaction: handle if no UE found It can happen that a message is delayed, but then no UE is found for such message, e.g., something is delayed but the UE context is deleted in the meantime: [02:23:16.320730] [NR_RRC] I [--] (UE ID 3 RNTI d2b1) Remove UE context Assertion (ue_context_p) failed! In rrc_delay_transaction() /oai-ran/openair2/RRC/NR/rrc_gNB.c:191 In that case, don't delay the message further -- all handlers gated by this function will check for the UE context and abort the transaction if not present. --- openair2/RRC/NR/rrc_gNB.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 260193bb4e..8cf5fb1378 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -166,7 +166,8 @@ static bool rrc_delay_transaction(instance_t instance, MessageDef *msg_p) AssertFatal(cu_ue_id > 0, "cu_ue_id not found in message %s\n", ITTI_MSG_NAME(msg_p)); rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], cu_ue_id); - DevAssert(ue_context_p); + if (!ue_context_p) + return false; // nothing to delay gNB_RRC_UE_t *UE = &ue_context_p->ue_context; bool delay = UE->delayed_action.ongoing_transaction && UE->delayed_action.max_delays > 0;