https://osmocom.org/https://osmocom.org/favicon.ico?16647414092018-09-30T08:49:06ZOpen Source Mobile CommunicationsOsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=117262018-09-30T08:49:06Zlaforge
<ul><li><strong>Assignee</strong> deleted (<del><i>laforge</i></del>)</li></ul> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=151962019-07-18T05:04:25Zlaforge
<ul><li><strong>Subject</strong> changed from <i>Extend OsmBSC TTCN-3 test coverage</i> to <i>Extend OsmBSC TTCN-3 test coverage regarding resource leaks</i></li></ul> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=151982019-07-18T05:04:35Zlaforge
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-1 priority-lowest" href="/issues/2712">Feature #2712</a>: implement reproducible talloc context printout, i.e. without memory addresses</i> added</li></ul> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=186392020-06-08T19:08:18Zlaforge
<ul></ul> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=238172022-03-24T19:08:55Zfixeria
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-3 priority-high3 closed" href="/issues/2780">Bug #2780</a>: OsmoBSC memory leak on bsc_subscriber</i> added</li></ul> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=238182022-03-24T19:09:29Zfixeria
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-2 priority-default closed" href="/issues/5355">Bug #5355</a>: ttcn3-bsc-test: leaked struct bsc_subscr in LCS tests</i> added</li></ul> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=238202022-03-24T19:09:52Zfixeria
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-2 priority-default closed" href="/issues/5337">Bug #5337</a>: ttcn3-bsc-test: leaked struct bsc_subscr in BSC_Tests.TC_no_msc</i> added</li></ul> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=238222022-03-24T19:14:42Zfixeria
<ul><li><b>Checklist item</b> <input type='checkbox' class='checklist-checkbox' checked disabled> <i>check for memory leaks of bsc_subscriber</i> set to Done</li><li><b>Checklist item</b> <input type='checkbox' class='checklist-checkbox' checked disabled> <i>check for memory leaks of bsc_subscriber_conn</i> set to Done</li><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>neels</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>60</i></li></ul><p>As far as I can see, in f_shutdown_helper() we do check for memory leaks of:</p>
<ul>
<li>struct bsc_subscr, and</li>
<li>struct gsm_subscriber_connection.</li>
</ul>
<p>Assigning to <a class="user active" href="https://osmocom.org/users/91">neels</a> who implemented the related checks.</p> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=238232022-03-24T23:17:59Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>that's true, this check was added fairly recently in <a class="external" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26619">https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26619</a><br />after subscr leaks were discovered and fixed in osmo-bsc.<br />Many BSC tests also required tweaks to properly release conns in the end.</p>
<p>If an SCCP conn also shows in the talloc_report as a distinct type of struct,<br />we can add the same check against SCCP leaks rather trivially<br />by adding the name to that talloc check...</p>
<p>These checks of course assume that each test runs alone without unrelated conns being active.<br />I think the original idea for TTCN3 tests was to at some point be able to run them in parallel.<br />The reality is that for years the tests are running one by one, so it seemed reasonable to require that they do.</p> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=238242022-03-24T23:37:35Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>well, the SCCP conn id is kept in struct bsc_subscriber_conn.<br />That means we already check for SCCP conn leaks, as far as osmo-bsc's state is concerned.<br />What else can we do, probably count the open conn IDs on TTCN3 side in the MSC_ConnectionHandler?</p> OsmoBSC - Feature #2781: Extend OsmBSC TTCN-3 test coverage regarding resource leakshttps://osmocom.org/issues/2781?journal_id=238262022-03-25T05:56:53Zlaforge
<ul></ul><p>Lets not add strange assumptions. The entire complex infrastructure we've built with protocol emulations dispatching different connections to different components makes no sense if you cannot run tests in parallel. I also do think we have (non BSC) tests where we do in fact already execute tests in parallel.</p>