<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Federico,<br>
<br>
The first hit from Google 'how to run command from gdb'<br>
<a class="moz-txt-link-freetext" href="https://ftp.gnu.org/old-gnu/Manuals/gdb/html_chapter/gdb_5.html#:~:text=Use%20the%20run%20command%20to,section%20Commands%20to%20specify%20files">https://ftp.gnu.org/old-gnu/Manuals/gdb/html_chapter/gdb_5.html#:~:text=Use%20the%20run%20command%20to,section%20Commands%20to%20specify%20files</a>).<br>
<br>
# gdb<br>
(gdb) file /usr/sbin/asterisk<br>
(gdb) run –gvvvvvvc <br>
Starting program: /usr/sbin/asterisk -gvvvvvc<br>
[Thread debugging using libthread_db enabled]<br>
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".<br>
....snip....<br>
Created by Mark Spencer <a class="moz-txt-link-rfc2396E" href="mailto:markster@digium.com"><markster@digium.com></a><br>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show
warranty' for details.<br>
....snip...<br>
<br>
etc etc<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 8/20/23 09:12, Federico wrote:<br>
</div>
<blockquote type="cite"
cite="mid:001401d9d367$ff837dc0$fe8a7940$@digitalipvoice.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">I cannot follow
your instructions, because asterisk segfaults on start. It
never starts<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Can you give me
instruction to trap this segfault on starting asterisk?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Like gdb
…..asterist –gvvvvvvc <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> asterisk-users
<a class="moz-txt-link-rfc2396E" href="mailto:asterisk-users-bounces@lists.digium.com"><asterisk-users-bounces@lists.digium.com></a> <b>On
Behalf Of </b>Mark Murawski<br>
<b>Sent:</b> Saturday, August 19, 2023 11:04 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>
<b>Subject:</b> Re: [asterisk-users] Segmentation fault<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Federico,<br>
<br>
Segfaults are 100% not by design. Typically if something
seg faulted, either there is a logic bug or a component
mismatch. The you should definitely be able to use more than
one connection (we use multiple connections with postgres
odbc with no issue).<br>
<br>
If Asterisk segfaults when using odbc<br>
Try this:<br>
- use ps and get the pid of Asterisk<br>
- run gdb, attach to the asterisk pid<br>
- do something that would cause the seg fault<br>
- get a backtrace (bt) and show all threads backtrace
(thread apply all bt)<br>
<br>
if Asterisk segfaults when starting up<br>
Run Asterisk straight from gdb<br>
Wait for segfault, get backtrace, and all threads backtrace<br>
<br>
<br>
<br>
<br>
On 8/16/23 18:48, Federico wrote:<span
style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">I tested this issue with version 13 and
version 18.<o:p></o:p></p>
<p class="MsoNormal">In res_odbc.conf, if I add a second, new
data source like<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">[asterisk]<o:p></o:p></p>
<p class="MsoNormal">enabled=yes<o:p></o:p></p>
<p class="MsoNormal">dsn=asterisk<o:p></o:p></p>
<p class="MsoNormal">sanitysql => select 1<o:p></o:p></p>
<p class="MsoNormal">isolation => read_committed<o:p></o:p></p>
<p class="MsoNormal">username=root<o:p></o:p></p>
<p class="MsoNormal">;password=<o:p></o:p></p>
<p class="MsoNormal">pre-connect => yes<o:p></o:p></p>
<p class="MsoNormal">forcecommit => yes<o:p></o:p></p>
<p class="MsoNormal">connect_timeout => 10<o:p></o:p></p>
<p class="MsoNormal">negative_connection_cache => 0<o:p></o:p></p>
<p class="MsoNormal">max_connections =>500<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">my odbc.ini<o:p></o:p></p>
<p class="MsoNormal">[cdr]<o:p></o:p></p>
<p class="MsoNormal">Description = MySQL ODBC Driver Testing<o:p></o:p></p>
<p class="MsoNormal">Driver = maria<o:p></o:p></p>
<p class="MsoNormal">Socket = /var/run/mysqld/mysqld.sock<o:p></o:p></p>
<p class="MsoNormal">User = root<o:p></o:p></p>
<p class="MsoNormal">Password =<o:p></o:p></p>
<p class="MsoNormal">Database = public<o:p></o:p></p>
<p class="MsoNormal">Option = 3<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I get, immediately, segmentation fault.<o:p></o:p></p>
<p class="MsoNormal">With only one, it works fine.<o:p></o:p></p>
<p class="MsoNormal">Is this by design?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Philip<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><br>
<br>
<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
<br>
</body>
</html>