<p> Attention is currently required from: Joshua Colp. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/18523">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File main/cli.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18523/comment/4868ef5f_c09bf97c">Patch Set #1, Line 1143:</a> <code style="font-family:monospace,monospace">        while (!ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {</code></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">What is not fully initialized?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Joshua C. Colp added a comment - 22/Jan/22 4:55 PM<br>In fact, looking at the implementation of ao2_iterator_init that is precisely the cause. The channel cache by name is not yet initialized/allocated when you're invoking the CLI command, causing ao2_iterator_init to FRACK when calling ao2_t_ref and producing the records.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So accessing the channel cache is dangerous at this point, so that's why we wait for startup to finish before doing so.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Should we or can we initialize it sooner?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I would think this would require all channel drivers to register first. There seems to be an order to startup with channel drivers intentionally pushed down the list a bit for dependencies to load. Moving it up could break other things.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">How soon can remote consoles connect?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Pretty much immediately. This is intentional so if something goes wrong during startup, it can be seen. e.g. the entire point of asterisk -R, and with asterisk -c the console is also there immediately.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18523">change 18523</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.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.asterisk.org/c/asterisk/+/18523"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If6b3cde802876bd738c1b4cf2683bea6ddc615b6 </div>
<div style="display:none"> Gerrit-Change-Number: 18523 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-CC: Friendly Automation </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 03 May 2022 13:12:15 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>