Re: [asterisk-users] Segmentation fault

2023-08-23 Thread Mark Murawski

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 –gvvc
Starting program: /usr/sbin/asterisk -gvc
[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 
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 –gvvc

*From:* asterisk-users  *On 
Behalf Of *Mark Murawski

*Sent:* Saturday, August 19, 2023 11:04 PM
*To:* asterisk-users@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




-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] ICE Candidate collision on dualstack hosts?

2023-08-23 Thread Joshua C. Colp
On Wed, Aug 23, 2023 at 4:36 AM Benoît Panizzon 
wrote:

> Hi
>
> I'm attempting to use ICE to be able to present all possible RTP
> transports to peers.
>
> 16.28.0~dfsg-0+deb11u2 (I know it's old, but unfortunately Asterisk was
> removed from debian 'stable' and the version in 'sid' is just broken
> (opus + voicemail don't work anymore).
>
> But I ran into an issue when the peer is running rtpengine:
>
> Asterisk offers:
>
> a=candidate:H9da13901 1 UDP 2130706431 157.161.57.1 13104 typ host
> a=candidate:H1054cffa 1 UDP 2130706431 2001:4060:dead:beef::1 13104 typ
> host
> a=candidate:He9b56028 1 UDP 2130706431 fe80::5054:ff:fea2:9057 13104 typ
> host
> a=candidate:H9da13901 2 UDP 2130706430 157.161.57.1 13105 typ host
> a=candidate:H1054cffa 2 UDP 2130706430 2001:4060:dead:beef::1 13105 typ
> host
> a=candidate:He9b56028 2 UDP 2130706430 fe80::5054:ff:fea2:9057 13105 typ
> host
>
> To me this looks like every candidate is duplicated on port +1
>
> rtpengine complains:
>
> [ice] Priority collision between candidate pairs
> sKy64vK5pY86kc9w:H9da13901:2 and sKy64vK5pY86kc9w:H9da13901:2 - ICE will
> likely fail
>
> And indeed RTP starts on IPv6 as proposed by H1054cffa but as soon as a
> re-invite is processed rtpengine switches to I guess H9da13901 and rtp dies.
>
> Why is asterisk proposing two ports per ip protocol? Is there a way to
> configure this more precisely?
>

They are not strictly duplicated. They are candidates for different
components. One is for RTP, one is for RTCP.

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] ICE Candidate collision on dualstack hosts?

2023-08-23 Thread Benoît Panizzon
Hi

I'm attempting to use ICE to be able to present all possible RTP
transports to peers.

16.28.0~dfsg-0+deb11u2 (I know it's old, but unfortunately Asterisk was
removed from debian 'stable' and the version in 'sid' is just broken
(opus + voicemail don't work anymore).

But I ran into an issue when the peer is running rtpengine:

Asterisk offers:

a=candidate:H9da13901 1 UDP 2130706431 157.161.57.1 13104 typ host
a=candidate:H1054cffa 1 UDP 2130706431 2001:4060:dead:beef::1 13104 typ host
a=candidate:He9b56028 1 UDP 2130706431 fe80::5054:ff:fea2:9057 13104 typ host
a=candidate:H9da13901 2 UDP 2130706430 157.161.57.1 13105 typ host
a=candidate:H1054cffa 2 UDP 2130706430 2001:4060:dead:beef::1 13105 typ host
a=candidate:He9b56028 2 UDP 2130706430 fe80::5054:ff:fea2:9057 13105 typ host

To me this looks like every candidate is duplicated on port +1

rtpengine complains:

[ice] Priority collision between candidate pairs sKy64vK5pY86kc9w:H9da13901:2 
and sKy64vK5pY86kc9w:H9da13901:2 - ICE will likely fail

And indeed RTP starts on IPv6 as proposed by H1054cffa but as soon as a 
re-invite is processed rtpengine switches to I guess H9da13901 and rtp dies.

Why is asterisk proposing two ports per ip protocol? Is there a way to 
configure this more precisely?

-- 
Mit freundlichen Grüssen

-Benoît Panizzon- @ HomeOffice und normal erreichbar
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users