https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092018-03-28T12:28:32ZOpen Source Mobile CommunicationsOsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=85712018-03-28T12:28:32Zkeith
<ul></ul><p>I don't observe this behaviour with osmo-bts-sysmo from the 201705 distribution.</p>
<p>I compiled osmo-bts-sysmo latest tag (version 0.7.0) against current master libosmocore and the behaviour existed there.</p>
<p>I tried to go back and compile from 69ec4a419e (which is the version in 201705 ?) but currently running into problems with the dependency on gsm_shared_data.h from openbsc, which presumably is not going to work with current libosmocore master.</p>
<pre>
make[2]: Entering directory '/home/keith/src/sysmoBTS/osmo-bts/src/common'
CC gsm_data_shared.o
In file included from gsm_data_shared.c:1:0:
../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c:38:41: error: array type has incomplete element type ‘struct osmo_stat_item_desc’
static const struct osmo_stat_item_desc bts_stat_desc[] = {
^~~~~~~~~~~~~
../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c:40:75: error: ‘GSM_T3122_DEFAULT’ undeclared here (not in a function)
{ "T3122", "T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator.", "s", 16, GSM_T3122_DEFAULT },
</pre>
<p>etc...</p> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=86192018-03-30T11:05:14Zkeith
<ul></ul><p>Notes:</p>
<pre><code>8aa85bd31abadedf69947250188795fad598dedd is good<br /> 0f7bcb5f17f18682f7f9dc41e2d0fc73c4c08318 is good.</code></pre>
<pre><code>6cb9e7d8981e127161f14f22ad9271252c531aec is bad.<br /> f2e83ad40d231e87e2604ec4c97c810a8182e145 would appear to be what introduces this.</code></pre> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=86292018-04-03T13:26:42Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>Since that other libosmocore patch was my doing, I took a look at this failure, found out this:<br />The Abort cause is actually the deferred CTRL command. The sysmobts clock commands seem to be the only implementations of deferred ctrl command.</p>
<p>Attached patch adds a dummy deferred ctrl command to the common vty part of osmo-bts, so it's convenient for testing that in osmo-bts-virtual (without an actual BTS hardware). Start a BSC the osmo-bts-virtual can connect to, then trigger the failure by:</p>
<pre>
▶ osmo_interact_ctrl.py -p 4238
GET 0 test-defer
</pre>
<p>Now going to find out how on earth that patch of mine broke deferred ctrl commands.</p> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=86302018-04-03T13:29:22Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>File</strong> <a href="/attachments/3041">0001-create-dummy-deferred-ctrl-command.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3041/0001-create-dummy-deferred-ctrl-command.patch">0001-create-dummy-deferred-ctrl-command.patch</a> added</li></ul><p>actually attaching patch...</p> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=86312018-04-03T14:20:09Zlaforge
<ul></ul><p>for the record: we definitely want a test case for this in the ttcn3 test suite. If<br />it's all about sending one specific ctrl command, it should be rather easy.</p> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=86322018-04-03T15:30:29Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Assignee</strong> set to <i>neels</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>80</i></li></ul><p>Actually it was not above mentioned change that introduced the failure,<br />instead it was <a class="external" href="https://cgit.osmocom.org/libosmocore/commit/?id=f2c10f108202c350a3c16f49156b11b0cd0dfa96">https://cgit.osmocom.org/libosmocore/commit/?id=f2c10f108202c350a3c16f49156b11b0cd0dfa96</a><br />-- it looked like just fixing an obvious memory leak, which it did as shown by the unit test, but deferred ctrl commands relied on that leak.</p>
<p>Leave the leak fixed but also support deferred ctrl commands: <a class="external" href="https://gerrit.osmocom.org/7618">https://gerrit.osmocom.org/7618</a></p> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=86352018-04-03T17:38:08Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>Enabled ttcn3 BTS_Tests to be able to test CTRL interaction <a class="external" href="https://gerrit.osmocom.org/7621">https://gerrit.osmocom.org/7621</a> <a class="external" href="https://gerrit.osmocom.org/7622">https://gerrit.osmocom.org/7622</a>, but of course the deferred clock-info command only exists in osmo-bts-sysmo, and we're only testing osmo-bts-trx in ttcn3.</p>
<p>There's a stub for sending the ctrl command here <a class="external" href="https://git.osmocom.org/osmo-ttcn3-hacks/commit/?h=neels/wip&id=4cc2374bdae26e2b2a002c941213f91fe745cc50">https://git.osmocom.org/osmo-ttcn3-hacks/commit/?h=neels/wip&id=4cc2374bdae26e2b2a002c941213f91fe745cc50</a> but it's so far useless.</p>
<p>laforge suggested to create some useful deferred command for osmo-bts-trx, e.g. "something that triggers a trx-control (ASCCI/UDP) protocol transaction and returns it via osmocom-ctrl? like the gain settings", and then test that in ttcn3.</p>
<p>An alternative is to test deferred ctrl interface in libosmocore, which is also a tricky decision, since we do no python tests in libosmocore yet, AFAIK. Not sure if we want to add that to libosmocore at all.</p>
<p>So while the fix is ready to be merged, testing against regression is TBD.</p> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=86692018-04-04T13:18:13Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>neels wrote:</p>
<blockquote>
<p>An alternative is to test deferred ctrl interface in libosmocore, which is also a tricky decision, since we do no python tests in libosmocore yet, AFAIK. Not sure if we want to add that to libosmocore at all.</p>
</blockquote>
<p>could of course cook up a C test without external communication, should be simple enough.</p> OsmoBTS - Bug #3120: osmo-bts aborts on GET trx.0.clock-info on CTRL interfacehttps://projects.osmocom.org/issues/3120?journal_id=88182018-04-11T12:22:01Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>80</i> to <i>100</i></li></ul><p>test <a class="external" href="https://gerrit.osmocom.org/7636">https://gerrit.osmocom.org/7636</a><br />fix <a class="external" href="https://gerrit.osmocom.org/7618">https://gerrit.osmocom.org/7618</a><br />all merged</p>