<p> Attention is currently required from: Michael Bradeen, George Joseph. </p>
<p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16628">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">Patchset:</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/+/16628?tab=comments">Patch Set #1:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Ran on existing FPBX 15 instance. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I am seeing similar too (Ubuntu 20.04). If I execute the script from the top level Asterisk source directory, e.g. sudo ./contrib/scripts/ast_coredumper then it attempts to process every file and directory under the Asterisk source as a 'core' file.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I see this behavior as well when not using certain command line options. For instance the following executes fine:</p><p style="white-space: pre-wrap; word-wrap: break-word;">sudo ./contrib/scripts/ast_coredumper --running --outputdir=/tmp/cores --pid=`pidof asterisk`</p><p style="white-space: pre-wrap; word-wrap: break-word;">But if I remove the "running" option it tries to process all files under the execution directory:</p><p style="white-space: pre-wrap; word-wrap: break-word;">sudo ./contrib/scripts/ast_coredumper --outputdir=/tmp/cores --pid=`pidof asterisk`</p><p style="white-space: pre-wrap; word-wrap: break-word;">Example output:</p><p style="white-space: pre-wrap; word-wrap: break-word;">Processing /home/kharwell/src/asterisk/16/configure.ac<br>Creating /tmp/cores/configure.ac-thread1.txt<br>Creating /tmp/cores/configure.ac-brief.txt<br>Creating /tmp/cores/configure.ac-full.txt<br>Creating /tmp/cores/configure.ac-locks.txt<br>Creating /tmp/cores/configure.ac-info.txt<br>Processing /home/kharwell/src/asterisk/16/funcs<br>Creating /tmp/cores/funcs-thread1.txt<br>Creating /tmp/cores/funcs-brief.txt<br>Creating /tmp/cores/funcs-full.txt<br>Creating /tmp/cores/funcs-locks.txt<br>Creating /tmp/cores/funcs-info.txt</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File contrib/scripts/ast_coredumper:</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/+/16628/comment/fb644717_3bc1fe8a">Patch Set #1, Line 404:</a> <code style="font-family:monospace,monospace"> $prog [ --help ] [ --running | --RUNNING ] [ --pid="pid" ]</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">If I give it an invalid pid, for example:</p><p style="white-space: pre-wrap; word-wrap: break-word;">sudo ./contrib/scripts/ast_coredumper --running --outputdir=/tmp/cores --pid=abcd</p><p style="white-space: pre-wrap; word-wrap: break-word;">I get the following output on the CLI:</p><p style="white-space: pre-wrap; word-wrap: break-word;">Found a single asterisk instance running as process abcd<br>WARNING: Taking a core dump of the running asterisk instance will suspend call processing while the dump is saved. Do you wish to continue? (y/N) y<br>Dumping running asterisk process to /tmp/cores/core-asterisk-running-2021-10-25T13-38-00-0500</p><p style="white-space: pre-wrap; word-wrap: break-word;">Even though the pid is invalid it still asks about suspending calls. If I choose 'y' nothing is output to the directory. The message(s) are a bit misleading. If possible try to find a way to check the pid's validity before other processing.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16628">change 16628</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/+/16628"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I674be64bdde3ef310b6a551d4911c3b600ffee59 </div>
<div style="display:none"> Gerrit-Change-Number: 16628 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-CC: Michael Bradeen <mbradeen@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: Michael Bradeen <mbradeen@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 25 Oct 2021 18:41:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Comment-In-Reply-To: Michael Bradeen <mbradeen@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>