Change in osmo-ttcn3-hacks[master]: MSC_ConnectionHandler: fix race in f_create_chan_and_exp()

neels gerrit-no-reply at lists.osmocom.org
Sat Jun 5 20:18:56 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24562 )

Change subject: MSC_ConnectionHandler: fix race in f_create_chan_and_exp()
......................................................................

MSC_ConnectionHandler: fix race in f_create_chan_and_exp()

During f_create_chan_and_exp() (part of f_establish_fully()), announce
the BSSAP L3 expectation before activating the lchan.

In RSL_Emulation f_chan_est(), we go through Chan Request, Channel Act
and Immediate Assignment followed by EST IND. Right after that, osmo-bsc
sends a Complete Layer 3 on BSSAP. But in f_create_chan_and_exp(), we
only create the expectation of the BSSAP right after the call to
f_chan_est(), i.e. only after sending the EST IND. So far it was always
juuust in time to work, but when I added a little check to the end of
f_chan_est(), or alternatively an f_sleep(0.2), then BSC tests always
fail with:

Test case TC_reassignment_fr finished. Verdict: fail reason: Couldn't find Expect for incoming connection { [...] pdu := { bssmap := { completeLayer3Information... }

With the BSSAP expectation done first, this error is avoided.

Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  neels: Looks good to me, approved



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 37adc18..c6e82d4 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -635,9 +635,9 @@
 	var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
 	var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info);
 
+	f_create_bssmap_exp(l3_enc);
 	/* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */
 	RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn);
-	f_create_bssmap_exp(l3_enc);
 }
 
 function f_rsl_send_l3(template PDU_ML3_MS_NW l3, template (omit) RslLinkId link_id := omit,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24562
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c
Gerrit-Change-Number: 24562
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210605/e5212c20/attachment.htm>


More information about the gerrit-log mailing list