<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/16015">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gmm: Fix assertion hit during RA UPD REQ before completting gmm attach<br><br>Output:<br>20191107021548500 DMM <0002> gprs_gb.c:40 MM_STATE_Gb(2596296189)[0x6120000084a0]{Idle}: Received Event E_MM_PDU_RECEPTION<br>20191107021548500 DMM <0002> gprs_gmm.c:1531 MM(/d4b6d7af) -> GMM RA UPDATE REQUEST type="RA updating"<br>20191107021548501 DMM <0002> gprs_gmm.c:1615 MM(/d4b6d7af) The MM context cannot be used, RA: 901-70-2758-208<br>Assert failed mmctx->gb.llme == NULL gprs_gmm.c:1620<br><br>Scenario reproducing the crash can be triggered with TTCN3<br>SGSN_Tests.TC_attach_req_id_req_ra_update.<br><br>Basically, SGSN first receives an ATTACH REQ with a given RA ID, then<br>SGSN switches to state CommonProcedureInitiated and sends GMM ID REQ,<br>and MS/PCU answers immediatelly with a RA Update instead with a new RA<br>ID.<br><br>Related: OS#3957, OS#4245<br>Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6<br>---<br>M src/sgsn/gprs_gmm.c<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-sgsn refs/changes/15/16015/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c</span><br><span>index b6b1685..17daa7d 100644</span><br><span>--- a/src/sgsn/gprs_gmm.c</span><br><span>+++ b/src/sgsn/gprs_gmm.c</span><br><span>@@ -1615,9 +1615,9 @@</span><br><span>                     osmo_rai_name(&mmctx->ra));</span><br><span>           /* mmctx is set to NULL and gprs_llgmm_unassign(llme) will be</span><br><span>                   called below, let's make sure we don't keep dangling llme</span><br><span style="color: hsl(0, 100%, 40%);">-               pointers in mmctx (OS#3957). */</span><br><span style="color: hsl(120, 100%, 40%);">+               pointers in mmctx (OS#3957, OS#4245). */</span><br><span>          if (mmctx->ran_type == MM_CTX_T_GERAN_Gb)</span><br><span style="color: hsl(0, 100%, 40%);">-                    OSMO_ASSERT(mmctx->gb.llme == NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+                       mmctx->gb.llme = NULL;</span><br><span>            mmctx = NULL;</span><br><span>        }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/16015">change 16015</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-sgsn/+/16015"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 </div>
<div style="display:none"> Gerrit-Change-Number: 16015 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>