[asterisk-users] Segmentation fault

Mark Murawski markm-lists at intellasoft.net
Wed Aug 23 12:15:26 CDT 2023


Hi Federico,

The first hit from Google 'how to run command from gdb'
https://ftp.gnu.org/old-gnu/Manuals/gdb/html_chapter/gdb_5.html#:~:text=Use%20the%20run%20command%20to,section%20Commands%20to%20specify%20files).

# gdb
(gdb) file /usr/sbin/asterisk
(gdb) run –gvvvvvvc
Starting program: /usr/sbin/asterisk -gvvvvvc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
....snip....
Created by Mark Spencer <markster at digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' 
for details.
....snip...

etc etc




On 8/20/23 09:12, Federico wrote:
>
> I cannot follow your instructions, because asterisk segfaults on 
> start. It never starts
>
> Can you give me instruction to trap this segfault on starting asterisk?
>
> Like gdb …..asterist –gvvvvvvc
>
> *From:* asterisk-users <asterisk-users-bounces at lists.digium.com> *On 
> Behalf Of *Mark Murawski
> *Sent:* Saturday, August 19, 2023 11:04 PM
> *To:* asterisk-users at lists.digium.com
> *Subject:* Re: [asterisk-users] Segmentation fault
>
> Hi Federico,
>
> 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).
>
> If Asterisk segfaults when using odbc
> Try this:
> - use ps and get the pid of Asterisk
> - run gdb, attach to the asterisk pid
> - do something that would cause the seg fault
> - get a backtrace (bt) and show all threads backtrace (thread apply 
> all bt)
>
> if Asterisk segfaults when starting up
> Run Asterisk straight from gdb
> Wait for segfault, get backtrace, and all threads backtrace
>
>
>
>
> On 8/16/23 18:48, Federico wrote:
>
>     I tested this issue with version 13 and version 18.
>
>     In res_odbc.conf, if I add a second, new data source like
>
>     [asterisk]
>
>     enabled=yes
>
>     dsn=asterisk
>
>     sanitysql => select 1
>
>     isolation => read_committed
>
>     username=root
>
>     ;password=
>
>     pre-connect => yes
>
>     forcecommit => yes
>
>     connect_timeout => 10
>
>     negative_connection_cache => 0
>
>     max_connections =>500
>
>     my odbc.ini
>
>     [cdr]
>
>     Description = MySQL ODBC Driver Testing
>
>     Driver = maria
>
>     Socket = /var/run/mysqld/mysqld.sock
>
>     User = root
>
>     Password =
>
>     Database = public
>
>     Option = 3
>
>     I  get, immediately, segmentation fault.
>
>     With only one, it works fine.
>
>     Is this by design?
>
>     Philip
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20230823/1eb5857a/attachment.html>


More information about the asterisk-users mailing list