<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24562">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">MSC_ConnectionHandler: fix race in f_create_chan_and_exp()<br><br>During f_create_chan_and_exp() (part of f_establish_fully()), announce<br>the BSSAP L3 expectation before activating the lchan.<br><br>In RSL_Emulation f_chan_est(), we go through Chan Request, Channel Act<br>and Immediate Assignment followed by EST IND. Right after that, osmo-bsc<br>sends a Complete Layer 3 on BSSAP. But in f_create_chan_and_exp(), we<br>only create the expectation of the BSSAP right after the call to<br>f_chan_est(), i.e. only after sending the EST IND. So far it was always<br>juuust in time to work, but when I added a little check to the end of<br>f_chan_est(), or alternatively an f_sleep(0.2), then BSC tests always<br>fail with:<br><br>Test case TC_reassignment_fr finished. Verdict: fail reason: Couldn't find Expect for incoming connection { [...] pdu := { bssmap := { completeLayer3Information... }<br><br>With the BSSAP expectation done first, this error is avoided.<br><br>Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c<br>---<br>M bsc/MSC_ConnectionHandler.ttcn<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/62/24562/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn</span><br><span>index 37adc18..ec90abe 100644</span><br><span>--- a/bsc/MSC_ConnectionHandler.ttcn</span><br><span>+++ b/bsc/MSC_ConnectionHandler.ttcn</span><br><span>@@ -635,9 +635,9 @@</span><br><span>        var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));</span><br><span>   var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       /* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */</span><br><span style="color: hsl(0, 100%, 40%);">-      RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn);</span><br><span>      f_create_bssmap_exp(l3_enc);</span><br><span style="color: hsl(120, 100%, 40%);">+  /* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */</span><br><span style="color: hsl(120, 100%, 40%);">+    RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn, tsc);</span><br><span> }</span><br><span> </span><br><span> function f_rsl_send_l3(template PDU_ML3_MS_NW l3, template (omit) RslLinkId link_id := omit,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24562">change 24562</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24562"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c </div>
<div style="display:none"> Gerrit-Change-Number: 24562 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>