https://osmocom.org/https://osmocom.org/favicon.ico?16647414092020-01-28T10:32:47ZOpen Source Mobile Communicationslibosmo-sccp + libosmo-sigtran - Bug #4378: Having 'sctp-role client' in configuration causes high CPU loadhttps://osmocom.org/issues/4378?journal_id=173522020-01-28T10:32:47Zfixeria
<ul><li><strong>File</strong> <a href="/attachments/4021">osmo-msc.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4021/osmo-msc.log">osmo-msc.log</a> added</li><li><strong>File</strong> <a href="/attachments/4020">osmo-stp.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4020/osmo-stp.log">osmo-stp.log</a> added</li></ul><p>Attaching log files for OsmoSTP and OsmoMSC with 'logging level set-all debug'.</p> libosmo-sccp + libosmo-sigtran - Bug #4378: Having 'sctp-role client' in configuration causes high CPU loadhttps://osmocom.org/issues/4378?journal_id=173532020-01-28T10:33:16Zfixeria
<ul><li><strong>File</strong> <a href="/attachments/4022">osmo-msc.cfg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4022/osmo-msc.cfg">osmo-msc.cfg</a> added</li><li><strong>File</strong> <a href="/attachments/4023">osmo-stp.cfg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4023/osmo-stp.cfg">osmo-stp.cfg</a> added</li></ul><p>Also attaching the configuration files.</p> libosmo-sccp + libosmo-sigtran - Bug #4378: Having 'sctp-role client' in configuration causes high CPU loadhttps://osmocom.org/issues/4378?journal_id=173562020-01-28T11:23:04Zfixeria
<ul></ul><p>More details from our cooperative investigation:</p>
<pre>
(gdb) p ufd->cb
$4 = (int (*)(struct osmo_fd *, unsigned int)) 0x7ffff7ed50f0 <osmo_stream_cli_fd_cb>
(gdb) p (struct osmo_stream_cli *) ofd->data
$5 = (struct osmo_stream_cli *) 0x5555557670d0
(gdb) p *(struct osmo_stream_cli *) ofd->data
$6 = {ofd = {list = {next = 0x555555676fe0, prev = 0x5555557aef88}, fd = 5, when = 3, cb = 0x7ffff7ed50f0 <osmo_stream_cli_fd_cb>, data = 0x5555557670d0, priv_nr = 0},
tx_queue = {next = 0x555555767100, prev = 0x555555767100}, timer = {node = {rb_parent_color = 0, rb_right = 0x0, rb_left = 0x0}, list = {next = 0x0, prev = 0x0},
timeout = {tv_sec = 0, tv_usec = 0}, active = 0, cb = 0x7ffff7ed5d20 <cli_timer_cb>, data = 0x5555557670d0}, state = STREAM_CLI_STATE_NONE, addr = {
0x555555766ec0 "127.0.0.1", 0x0 <repeats 31 times>}, addrcnt = 1 '\001', port = 2905, local_addr = {0x0 <repeats 32 times>}, local_addrcnt = 1 '\001',
local_port = 0, proto = 132, connect_cb = 0x7ffff7ef4b20 <xua_cli_connect_cb>, disconnect_cb = 0x0, read_cb = 0x7ffff7ef8cb0 <xua_cli_read_cb>, write_cb = 0x0,
data = 0x555555766b90, flags = 2, reconnect_timeout = 5}
</pre>
<p>The <strong>state = STREAM_CLI_STATE_NONE</strong> causes the switch statement in osmo_stream_cli_fd_cb() to do nothing, so we merely return. That's the reason why select() always gives us the control and does not block. Now the main question is how do we end up in that state.</p> libosmo-sccp + libosmo-sigtran - Bug #4378: Having 'sctp-role client' in configuration causes high CPU loadhttps://osmocom.org/issues/4378?journal_id=173592020-01-28T12:58:31Zpespin
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>pespin</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li></ul><p>Fixed by:<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/libosmo-netif/+/17029">https://gerrit.osmocom.org/c/libosmo-netif/+/17029</a> stream: Drop data during write() while in state NONE<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/libosmo-netif/+/17030">https://gerrit.osmocom.org/c/libosmo-netif/+/17030</a> stream: Re-arrange cli states to fix 100% cpu usage bu</p>
<p>Extra:<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/libosmo-netif/+/17031">https://gerrit.osmocom.org/c/libosmo-netif/+/17031</a> stream: Add new WAIT_RECONNECT cli state<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/libosmo-netif/+/17032">https://gerrit.osmocom.org/c/libosmo-netif/+/17032</a> stream: Rename cli state NONE to CLOSED</p> libosmo-sccp + libosmo-sigtran - Bug #4378: Having 'sctp-role client' in configuration causes high CPU loadhttps://osmocom.org/issues/4378?journal_id=173672020-01-28T23:08:26Zfixeria
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>Assignee</strong> deleted (<del><i>pespin</i></del>)</li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul><p>The patches have been merged, both OsmoMSC and OsmoBSC now work like a charm (in both client and server modes).</p>
<p>Thank you, Pau!</p> libosmo-sccp + libosmo-sigtran - Bug #4378: Having 'sctp-role client' in configuration causes high CPU loadhttps://osmocom.org/issues/4378?journal_id=173682020-01-28T23:08:45Zfixeria
<ul><li><strong>Assignee</strong> set to <i>pespin</i></li></ul>