[Home]

Summary:ASTERISK-25119: Crash on pjsip_tls_transport_start2
Reporter:Scott Griepentrog (sgriepentrog)Labels:
Date Opened:2015-05-22 08:36:30Date Closed:2015-05-22 11:42:08
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-conf.tgz
( 1) gdb-backtrace.txt
( 2) pjsip-conf.tgz
Description:I updated PJSIP to see if it would fix a crash and I'm now unable to start asterisk at all with my existing configuration (backtrace attached).

Tested pjsip from svn trunk, also from asterisk github, and no change.  Tested 13.1 Certified and gerrit master and no change.
Comments:By: Scott Griepentrog (sgriepentrog) 2015-05-22 08:43:06.307-0500

Commenting out the tls-ipv4 transport avoids the crash:

{noformat}
[transport-udp-ipv4]
type=transport
protocol=udp
bind=0.0.0.0:5060

[transport-tcp-ipv4]
type=transport
protocol=tcp
bind=0.0.0.0:5061

;[transport-tls-ipv4]
;type=transport
;protocol=tls
;bind=0.0.0.0:5062
;cert_file=/etc/asterisk/keys/asterisk.crt
;priv_key_file=/etc/asterisk/keys/asterisk.key
;ca_list_file=/etc/asterisk/keys/ca.crt
;method=tlsv1
{noformat}


By: Joshua C. Colp (jcolp) 2015-05-22 08:53:18.156-0500

I just updated my PJSIP, built it against 13, and successfully used your configuration:

pjsip show transports

Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress....................>
=========================================================================================

Transport:  local-tcp                 tcp      0      0  0.0.0.0:5060
Transport:  local-udp                 udp      0      0  0.0.0.0:5060
Transport:  transport-tls-ipv4        tls      0      0  0.0.0.0:5062

Did you do a make clean? If you do - does that fix it?

By: Scott Griepentrog (sgriepentrog) 2015-05-22 09:27:45.785-0500

Turns out to be a build problem that went unnoticed due to an issue with a make error not being noticed during my normal build process:

{noformat}
[sgriepentrog@c6 13-e7edb59db6dfb543300f43c8055adda4ab1fd1c9]$ make
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/home/sgriepentrog/DPMA-519/13-e7edb59db6dfb543300f43c8055adda4ab1fd1c9/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/home/sgriepentrog/DPMA-519/13-e7edb59db6dfb543300f43c8055adda4ab1fd1c9/menuselect'
  [CCi] res_pjsip/config_transport.i -> res_pjsip/config_transport.o
res_pjsip/config_transport.c: In function ‘transport_apply’:
res_pjsip/config_transport.c:221: error: ‘pjsip_tls_setting’ has no member named ‘ca_list_path’
make[1]: *** [res_pjsip/config_transport.o] Error 1
make: *** [res] Error 2
{noformat}

Thus I was apparently still running on an old binary incompatible with the new version of pjsip.

However, the crash is still replicable by installing certified-13.1-b81353a0ecfa1e31b1326348731f21ab89597a64 from scratch with the current pjsip-5099.

I'm also attaching a full copy of my etc/asterisk in case that helps.


By: Scott Griepentrog (sgriepentrog) 2015-05-22 11:42:08.574-0500

Issue was an older conflicting version of pjsip installed into /usr/local.  Once removed, all is well.  Updating my pjsip install script to warn about this problem so it doesn't bite me again.