<p>daniel has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10161">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc: stop all components before terminating testcase<br><br>It seems mtc.stop() alone does not really solve the race conditions when<br>shutting down components. The error happens when messages are sent on<br>ports which are no longer connected since the receiving component has<br>terminated.<br>Some web search<br>http://www.ttcn-3.org/TTCN3UCAsia2007/Presentations/TTCN3%20UC%202007%20Concurrent%20TTCN.pdf<br>suggested that one should stop all components before<br>calling mtc.stop (slide 38). Slide 33 also mentions the difference<br>between .stop and .kill. Kill removes the port connections while stop<br>does not. And I think looking at the logs when the testcase teminates<br>(through mtc.stop or otherwise) it is internally calling kill on all the<br>components. So hopefully stopping all components and then stopping the mtc<br>will fix this nasty issue.<br><br>I verified locally that the situation improves between commits now when<br>running BSC_Tests.TC_paging_imsi_nochan_all 20 times in a loop and<br>otherwise generating load on the system. It reliably failed before this<br>patch and I wasn't able to get it to fail with it.<br><br>Change-Id: I398883492919ceabcf94b5cc2361c63ec772d9d5<br>---<br>M bsc/BSC_Tests.ttcn<br>1 file changed, 1 insertion(+), 0 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/61/10161/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn</span><br><span>index 9412251..c802a6b 100644</span><br><span>--- a/bsc/BSC_Tests.ttcn</span><br><span>+++ b/bsc/BSC_Tests.ttcn</span><br><span>@@ -114,6 +114,7 @@</span><br><span> }</span><br><span> </span><br><span> private function f_shutdown_helper() runs on test_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+   all component.stop;</span><br><span>  setverdict(pass);</span><br><span>    mtc.stop;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10161">change 10161</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/10161"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I398883492919ceabcf94b5cc2361c63ec772d9d5 </div>
<div style="display:none"> Gerrit-Change-Number: 10161 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: daniel <dwillmann@sysmocom.de> </div>