Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-12-14 Thread Gregory Massel

Herewith some backtraces:

#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120
No locals.
#1  0x7f3e6c2b25d3 in _IO_vfprintf_internal (s=s@entry=0x557c28170060,
format=format@entry=0x557c27af4378 "CRITICAL:core:%s: freeing already freed %s 
pointer (%p), first free: %s: %s(%ld) - aborting!\n", ap=0x7ffce94b5188)
at vfprintf.c:1643
len = 
string_malloced = 0
string = 0x1343c6c031e289 
width = 
signed_number = 
is_short = 0
spec = 115 's'
ptr = 
ptr = 
outc = 
step0_jumps = {0, 160, 64, 1664, 1576, 1464, 1360, 2216, 2912, 208, 
2032, 1848, 1760, -768, -760, 3024, 3000, 3104, 2128, 3120, -304, -704, 384, 
312, -80, -1256,
  2624, -1344, -1344, 2536}
base = 
pad = 
offset = 
offset = 
step1_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 208, 2032, 1848, 1760, -768, 
-760, 3024, 3000, 3104, 2128, 3120, -304, -704, 384, 312, -80, -1256, 2624, 
-1344, -1344, 0}
args_value = 
is_negative = 
number = 
use_outdigits = 
step2_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2032, 1848, 1760, -768, 
-760, 3024, 3000, 3104, 2128, 3120, -304, -704, 384, 312, -80, -1256, 2624, 
-1344, -1344, 0}
alt = 0
left = 0
showsign = 
group = 0
is_char = 0
step3a_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1936, 0, 0, 0, -760, 
3024, 3000, 3104, 2128, 0, 0, 0, 0, 312, 0, 0, 0, 0, 0, 0}
the_arg = {pa_wchar = 2037198692 L'\x796d2f64', pa_int = 2037198692, 
pa_long_int = 7236283442049920868, pa_long_long_int = 7236283442049920868,
  pa_u_int = 2037198692, pa_u_long_int = 7236283442049920868, 
pa_u_long_long_int = 7236283442049920868, pa_double = 5.6278881776203929e+175,
  pa_long_double = , pa_string = 0x646c7173796d2f64 
,
  pa_wstring = 0x646c7173796d2f64 , pa_pointer = 0x646c7173796d2f64, pa_user = 0x646c7173796d2f64}
space = 
is_long_double = 
---Type  to continue, or q  to quit---
is_long = 
step3b_jumps = {0 , 1760, 0, 0, -760, 3024, 3000, 
3104, 2128, 3120, -304, -704, 384, 312, -80, -1256, 2624, 0, 0, 0}
step4_jumps = {0 , -760, 3024, 3000, 3104, 2128, 
3120, -304, -704, 384, 312, -80, -1256, 2624, 0, 0, 0}
prec = 
_buffer = {__routine = 0x, __arg = 0x1, 
__canceltype = 0, __prev = 0x756b43e3}
_avail = 
thousands_sep = 0x0
grouping = 0x 
done = 87
f = 
lead_str_end = 0x557c27af4386 "%s: freeing already freed %s pointer (%p), 
first free: %s: %s(%ld) - aborting!\n"
end_of_spec = 
work_buffer = 
"\260MK\351\374\177\000\000\v\000\000\000>\177\000\000\332u\vF>\177\000\000\000\000\000\000\000\000\000\000h\r\000\000\000\000\000\000\373u\vF>\177\000\000\331u\vF>\177\000\000\v\000\000\000\000\000\000\000\240MK\351\374\177\000\000\200NK\351\374\177\000\000@\037\355F>\177\000\000\060\037\355F>\177\000\000
 \037\355F>\177\000\000\020\037\355F>\177\000\000\000\037\355F>\177\000\000\360\036\355F>\177\000\000 
\036\355F>\177\000\000\060\036\355F>\177\000\000\320\036\355F>\177\000\000`\036\355F>\177\000\000\360MK\351\374\177\000\000\000\006\332\016\343Cku\320MK\351\374\177\000\000\320MK\351\374\177\000\000\000OK\351\374\177\000\000"...
workstart = 
workend = 
ap_save = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 
0x7ffce94b52f0, reg_save_area = 0x7ffce94b5200}}
nspecs_done = 3
save_errno = 11
readonly_format = 0
__PRETTY_FUNCTION__ = "_IO_vfprintf_internal"
__result = 
#2  0x7f3e6c3875f8 in ___vfprintf_chk (fp=fp@entry=0x557c28170060, 
flag=flag@entry=1,
format=format@entry=0x557c27af4378 "CRITICAL:core:%s: freeing already freed %s 
pointer (%p), first free: %s: %s(%ld) - aborting!\n", ap=ap@entry=0x7ffce94b5188)
at vfprintf_chk.c:33
_IO_acquire_lock_file = 0x557c28170060
done = 
#3  0x7f3e6c36f37c in __GI___vsyslog_chk (ap=0x7ffce94b5188,
fmt=0x557c27af4378 "CRITICAL:core:%s: freeing already freed %s pointer (%p), first 
free: %s: %s(%ld) - aborting!\n", flag=1, pri=)
at ../misc/syslog.c:222
buf = 0x0
now_tm = {tm_sec = 4, tm_min = 40, tm_hour = 2, tm_mday = 9, tm_mon = 
11, tm_year = 121, tm_wday = 4, tm_yday = 342, tm_isdst = 0, tm_gmtoff = 7200,
  tm_zone = 0x557c2812da20 "SAST"}
fd = 
failbuf = 
"`\000\027(|U\000\000\001\000\000\000\000\000\000\000\v\000\000\000\000\000\000\000\310u\vF>"
now = 1639010404
f = 0x557c28170060
---Type  to continue, or q  to quit---
bufsize = 0
msgoff = 21
saved_errno = 11
clarg = 
now_tm = 
now = 
fd = 
f = 
buf = 
bufsize = 
msgoff = 
saved_errno = 
failbuf = 
clarg = 
numbuf = 
nump = 

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-12-07 Thread Mark Farmer
Hi everyone

I fixed my core_dump issue and have uploaded the output of a 'bt full' here:

https://github.com/OpenSIPS/opensips/issues/2667

HTH
Mark.


On Thu, 18 Nov 2021 at 21:38, Vlad Patrascu  wrote:

> Hi Gregory,
>
> It is difficult to draw any conclusions without a backtrace so I'm hoping
> you'll be able to get the proper core dumps again in order to investigate
> this further.
> Regards,
>
> --
> Vlad Patrascu
> OpenSIPS Core Developerhttp://www.opensips-solutions.com
>
> On 12.11.2021 14:44, Gregory Massel wrote:
>
> Sorry, I do have the core files, however, my /usr/sbin/opensips is now
> 3.2.2 and the core dumps were taken against 3.2.3.
>
> I should have thought to get the backtrace before downgrading.
>
> This is a production server, however, I will try and schedule some
> downtime and then restore 3.2.3 to generate the backtrace and will try out
> the nightly release.
>
> --Greg
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 
Mark Farmer
farm...@gmail.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-18 Thread Vlad Patrascu

Hi Gregory,

It is difficult to draw any conclusions without a backtrace so I'm 
hoping you'll be able to get the proper core dumps again in order to 
investigate this further.


Regards,

--
Vlad Patrascu
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 12.11.2021 14:44, Gregory Massel wrote:


Sorry, I do have the core files, however, my /usr/sbin/opensips is now 
3.2.2 and the core dumps were taken against 3.2.3.


I should have thought to get the backtrace before downgrading.

This is a production server, however, I will try and schedule some 
downtime and then restore 3.2.3 to generate the backtrace and will try 
out the nightly release.


--Greg



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-12 Thread Gregory Massel
Sorry, I do have the core files, however, my /usr/sbin/opensips is now 
3.2.2 and the core dumps were taken against 3.2.3.


I should have thought to get the backtrace before downgrading.

This is a production server, however, I will try and schedule some 
downtime and then restore 3.2.3 to generate the backtrace and will try 
out the nightly release.


--Greg

On 2021-11-12 13:09, Andrew Yager wrote:

Do you have a core dump with the backtrace when it dies?

There are a few fixes in the nightly releases around some TLS things, 
and we've found these to be a better choice for SSL performance.


Thanks,
Andrew

On Fri, 12 Nov 2021 at 02:30, Gregory Massel  wrote:

Thanks.

This report lists it as a bug in WolfSSL, however, given that I'm
got similar errors (although not a segfault) when changing to
OpenSSL, it would appear more likely that it's in proto_tls or
tls_mgm.

--Greg

On 2021-11-11 17:06, Mark Farmer wrote:

Confirmed here too, 3.2.2 is running fine.

There does seem to be a bug report about this:

https://github.com/OpenSIPS/opensips/issues/2667


On Thu, 11 Nov 2021 at 14:33, Gregory Massel
 wrote:

I've managed to downgrade to 3.2.2 and all is working again.
So this appears to be a bug introduced in 3.2.3.

Environment is:

Linux msteams 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri
Oct 22 09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

The downgrade/fix was with:

apt-get install opensips=3.2.2-1
opensips-dialplan-module=3.2.2-1
opensips-http-modules=3.2.2-1 opensips-mysql-module=3.2.2-1
opensips-presence-modules=3.2.2-1
opensips-regex-module=3.2.2-1 opensips-tls-module=3.2.2-1
opensips-tls-openssl-module=3.2.2-1
opensips-tls-wolfssl-module=3.2.2-1
opensips-tlsmgm-module=3.2.2-1

--Greg

On 2021-11-11 15:56, Gregory Massel wrote:


I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL
connections.

With WolfSSL it segfaults:

Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to52.114.75.24:5061  
  established
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to52.114.132.46:5061  
  established
Nov 11 11:52:05 msteams /usr/sbin/opensips[15328]: 
CRITICAL:core:sig_usr: segfault in process pid: 15328, id: 25
Nov 11 11:52:05 msteams kernel: [22403546.537543] opensips[15328]: 
segfault at 35 ip 7ff7b4b3f790 sp 7fff48dd0a30 error 4 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams kernel: [22403546.537549] Code: ff ff e9 5b ff ff ff 
0f 1f 00 53 48 8d 3d 08 40 3b 00 e8 53 09 00 00 85 c0 75 4f 48 8b 3d 50 40 3b 00 48 
85 ff 74 14 0f 1f 00 <48> 8b 5f 08 e8 87 36 f7 ff 48 85 db 48 89 df 75
ef 5b 48 8d 3d d7
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from52.114.75.24:17152  
  accepted
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate subject: 
/CN=sip.pstnhub.microsoft.com  , issuer: 
/C=US/O=Microsoft Corporation/CN=Microsoft RSA TLS CA 01
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15329]: 
CRITICAL:core:sig_usr: segfault in process pid: 15329, id: 26
Nov 11 11:52:05 msteams kernel: [22403546.732270] traps: 
opensips[15329] general protection fault ip:7ff7b4b0953d sp:7fff48dd0760 
error:0 in tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify 

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-12 Thread Mark Farmer
Sadly I have not got my core dumps working yet.
However, I have just cloned & compiled the 3.2 branch and I can confirm
that the issue remains.

opensips -V
version: opensips 3.2.3 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 4ec0f086c
main.c compiled on 11:30:39 Nov 12 2021 with gcc 9

INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to
52.114.132.46:5061 established
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
reply_route: Received reply 200 from tls:52.114.75.24:5061
CRITICAL:core:sig_usr: segfault in process pid: 32583, id: 12
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to
52.114.32.169:5061 established
CRITICAL:core:sig_usr: segfault in process pid: 32584, id: 13
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
CRITICAL:core:sig_usr: segfault in process pid: 32581, id: 10
request_route: Received OPTIONS from x.x.x.x
request_route: - checking x.x.x.x:5060
request_route: Received OPTIONS from x.x.x.x
request_route: - checking x.x.x.x:5060
request_route: Received OPTIONS from x.x.x.x
request_route: - checking x.x.x.x:5060
INFO:core:handle_sigs: child process 32581 exited by a signal 11
INFO:core:handle_sigs: core was generated
INFO:core:handle_sigs: terminating due to SIGCHLD
INFO:core:sig_usr: signal 15 received
INFO:core:sig_usr: signal 15 received
INFO:core:shutdown_opensips: process 3(32574) [HTTPD INADDR_ANY:8080]
terminated, still waiting for 13 more
INFO:core:shutdown_opensips: process 1(32572) [SNMP AgentX] terminated,
still waiting for 12 more
INFO:core:shutdown_opensips: process 14(32585) [Timer handler] terminated,
still waiting for 11 more
INFO:core:shutdown_opensips: process 5(32576) [timer] terminated, still
waiting for 10 more
INFO:core:shutdown_opensips: process 8(32579) [SIP receiver
udp:x.x.x.x:5060] terminated, still waiting for 9 more
INFO:core:shutdown_opensips: process 2(32573) [MI FIFO] terminated, still
waiting for 8 more
INFO:core:shutdown_opensips: process 4(32575) [time_keeper] terminated,
still waiting for 7 more
INFO:core:shutdown_opensips: process 11(32582) [TCP receiver] terminated,
still waiting for 6 more
INFO:core:shutdown_opensips: process 13(32584) [TCP receiver] terminated,
still waiting for 5 more
INFO:core:shutdown_opensips: process 12(32583) [TCP receiver] terminated,
still waiting for 4 more
INFO:core:cleanup: cleanup
CRITICAL:core:sig_usr: segfault in attendant (starter) process!


On Fri, 12 Nov 2021 at 11:13, Andrew Yager  wrote:

> Do you have a core dump with the backtrace when it dies?
>
> There are a few fixes in the nightly releases around some TLS things, and
> we've found these to be a better choice for SSL performance.
>
> Thanks,
> Andrew
>
> On Fri, 12 Nov 2021 at 02:30, Gregory Massel  wrote:
>
>> Thanks.
>>
>> This report lists it as a bug in WolfSSL, however, given that I'm got
>> similar errors (although not a segfault) when changing to OpenSSL, it would
>> appear more likely that it's in proto_tls or tls_mgm.
>>
>> --Greg
>> On 2021-11-11 17:06, Mark Farmer wrote:
>>
>> Confirmed here too, 3.2.2 is running fine.
>>
>> There does seem to be a bug report about this:
>>
>> https://github.com/OpenSIPS/opensips/issues/2667
>>
>>
>> On Thu, 11 Nov 2021 at 14:33, Gregory Massel 
>> wrote:
>>
>>> I've managed to downgrade to 3.2.2 and all is working again. So this
>>> appears to be a bug introduced in 3.2.3.
>>>
>>> Environment is:
>>>
>>> Linux msteams 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22
>>> 09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> The downgrade/fix was with:
>>>
>>> apt-get install opensips=3.2.2-1 opensips-dialplan-module=3.2.2-1
>>> opensips-http-modules=3.2.2-1 opensips-mysql-module=3.2.2-1
>>> opensips-presence-modules=3.2.2-1 opensips-regex-module=3.2.2-1
>>> opensips-tls-module=3.2.2-1 opensips-tls-openssl-module=3.2.2-1
>>> opensips-tls-wolfssl-module=3.2.2-1 opensips-tlsmgm-module=3.2.2-1
>>>
>>> --Greg
>>> On 2021-11-11 15:56, Gregory Massel wrote:
>>>
>>> I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL connections.
>>>
>>> With WolfSSL it segfaults:
>>>
>>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>>> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
>>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>>> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
>>> 52.114.75.24:5061 established
>>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>>> Nov 11 11:52:04 msteams 

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-12 Thread Andrew Yager
Do you have a core dump with the backtrace when it dies?

There are a few fixes in the nightly releases around some TLS things, and
we've found these to be a better choice for SSL performance.

Thanks,
Andrew

On Fri, 12 Nov 2021 at 02:30, Gregory Massel  wrote:

> Thanks.
>
> This report lists it as a bug in WolfSSL, however, given that I'm got
> similar errors (although not a segfault) when changing to OpenSSL, it would
> appear more likely that it's in proto_tls or tls_mgm.
>
> --Greg
> On 2021-11-11 17:06, Mark Farmer wrote:
>
> Confirmed here too, 3.2.2 is running fine.
>
> There does seem to be a bug report about this:
>
> https://github.com/OpenSIPS/opensips/issues/2667
>
>
> On Thu, 11 Nov 2021 at 14:33, Gregory Massel  wrote:
>
>> I've managed to downgrade to 3.2.2 and all is working again. So this
>> appears to be a bug introduced in 3.2.3.
>>
>> Environment is:
>>
>> Linux msteams 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22
>> 09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
>>
>> The downgrade/fix was with:
>>
>> apt-get install opensips=3.2.2-1 opensips-dialplan-module=3.2.2-1
>> opensips-http-modules=3.2.2-1 opensips-mysql-module=3.2.2-1
>> opensips-presence-modules=3.2.2-1 opensips-regex-module=3.2.2-1
>> opensips-tls-module=3.2.2-1 opensips-tls-openssl-module=3.2.2-1
>> opensips-tls-wolfssl-module=3.2.2-1 opensips-tlsmgm-module=3.2.2-1
>>
>> --Greg
>> On 2021-11-11 15:56, Gregory Massel wrote:
>>
>> I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL connections.
>>
>> With WolfSSL it segfaults:
>>
>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
>> 52.114.75.24:5061 established
>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
>> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
>> 52.114.132.46:5061 established
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15328]: CRITICAL:core:sig_usr: 
>> segfault in process pid: 15328, id: 25
>> Nov 11 11:52:05 msteams kernel: [22403546.537543] opensips[15328]: segfault 
>> at 35 ip 7ff7b4b3f790 sp 7fff48dd0a30 error 4 in 
>> tls_wolfssl.so[7ff7b4a71000+1e3000]
>> Nov 11 11:52:05 msteams kernel: [22403546.537549] Code: ff ff e9 5b ff ff ff 
>> 0f 1f 00 53 48 8d 3d 08 40 3b 00 e8 53 09 00 00 85 c0 75 4f 48 8b 3d 50 40 
>> 3b 00 48 85 ff 74 14 0f 1f 00 <48> 8b 5f 08 e8 87 36 f7 ff 48 85 db 48 89 df 
>> 75
>> ef 5b 48 8d 3d d7
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
>> INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from 
>> 52.114.75.24:17152 accepted
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
>> INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate 
>> subject: /CN=sip.pstnhub.microsoft.com, issuer: /C=US/O=Microsoft 
>> Corporation/CN=Microsoft RSA TLS CA 01
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15329]: CRITICAL:core:sig_usr: 
>> segfault in process pid: 15329, id: 26
>> Nov 11 11:52:05 msteams kernel: [22403546.732270] traps: opensips[15329] 
>> general protection fault ip:7ff7b4b0953d sp:7fff48dd0760 error:0 in 
>> tls_wolfssl.so[7ff7b4a71000+1e3000]
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
>> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
>> 54.171.127.194:5061 established
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15330]: CRITICAL:core:sig_usr: 
>> segfault in process pid: 15330, id: 27
>> Nov 11 11:52:05 msteams kernel: [22403546.801626] traps: opensips[15330] 
>> general protection fault ip:7ff7b4b3f790 sp:7fff48dd0a30 error:0 in 
>> tls_wolfssl.so[7ff7b4a71000+1e3000]
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
>> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
>> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
>> 

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-11 Thread Gregory Massel

Thanks.

This report lists it as a bug in WolfSSL, however, given that I'm got 
similar errors (although not a segfault) when changing to OpenSSL, it 
would appear more likely that it's in proto_tls or tls_mgm.


--Greg

On 2021-11-11 17:06, Mark Farmer wrote:

Confirmed here too, 3.2.2 is running fine.

There does seem to be a bug report about this:

https://github.com/OpenSIPS/opensips/issues/2667


On Thu, 11 Nov 2021 at 14:33, Gregory Massel  wrote:

I've managed to downgrade to 3.2.2 and all is working again. So
this appears to be a bug introduced in 3.2.3.

Environment is:

Linux msteams 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22
09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

The downgrade/fix was with:

apt-get install opensips=3.2.2-1 opensips-dialplan-module=3.2.2-1
opensips-http-modules=3.2.2-1 opensips-mysql-module=3.2.2-1
opensips-presence-modules=3.2.2-1 opensips-regex-module=3.2.2-1
opensips-tls-module=3.2.2-1 opensips-tls-openssl-module=3.2.2-1
opensips-tls-wolfssl-module=3.2.2-1 opensips-tlsmgm-module=3.2.2-1

--Greg

On 2021-11-11 15:56, Gregory Massel wrote:


I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL
connections.

With WolfSSL it segfaults:

Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to52.114.75.24:5061  
  established
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to52.114.132.46:5061  
  established
Nov 11 11:52:05 msteams /usr/sbin/opensips[15328]: CRITICAL:core:sig_usr: 
segfault in process pid: 15328, id: 25
Nov 11 11:52:05 msteams kernel: [22403546.537543] opensips[15328]: segfault 
at 35 ip 7ff7b4b3f790 sp 7fff48dd0a30 error 4 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams kernel: [22403546.537549] Code: ff ff e9 5b ff ff ff 0f 
1f 00 53 48 8d 3d 08 40 3b 00 e8 53 09 00 00 85 c0 75 4f 48 8b 3d 50 40 3b 00 48 85 
ff 74 14 0f 1f 00 <48> 8b 5f 08 e8 87 36 f7 ff 48 85 db 48 89 df 75
ef 5b 48 8d 3d d7
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from52.114.75.24:17152  
  accepted
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate subject: 
/CN=sip.pstnhub.microsoft.com  , issuer: 
/C=US/O=Microsoft Corporation/CN=Microsoft RSA TLS CA 01
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15329]: CRITICAL:core:sig_usr: 
segfault in process pid: 15329, id: 26
Nov 11 11:52:05 msteams kernel: [22403546.732270] traps: opensips[15329] 
general protection fault ip:7ff7b4b0953d sp:7fff48dd0760 error:0 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to54.171.127.194:5061 
   established
Nov 11 11:52:05 msteams /usr/sbin/opensips[15330]: CRITICAL:core:sig_usr: 
segfault in process pid: 15330, id: 27
Nov 11 11:52:05 msteams kernel: [22403546.801626] traps: opensips[15330] 
general protection fault ip:7ff7b4b3f790 sp:7fff48dd0a30 error:0 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to52.114.14.70:5061  

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-11 Thread Mark Farmer
Confirmed here too, 3.2.2 is running fine.

There does seem to be a bug report about this:

https://github.com/OpenSIPS/opensips/issues/2667


On Thu, 11 Nov 2021 at 14:33, Gregory Massel  wrote:

> I've managed to downgrade to 3.2.2 and all is working again. So this
> appears to be a bug introduced in 3.2.3.
>
> Environment is:
>
> Linux msteams 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22 09:25:04
> UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
>
> The downgrade/fix was with:
>
> apt-get install opensips=3.2.2-1 opensips-dialplan-module=3.2.2-1
> opensips-http-modules=3.2.2-1 opensips-mysql-module=3.2.2-1
> opensips-presence-modules=3.2.2-1 opensips-regex-module=3.2.2-1
> opensips-tls-module=3.2.2-1 opensips-tls-openssl-module=3.2.2-1
> opensips-tls-wolfssl-module=3.2.2-1 opensips-tlsmgm-module=3.2.2-1
>
> --Greg
> On 2021-11-11 15:56, Gregory Massel wrote:
>
> I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL connections.
>
> With WolfSSL it segfaults:
>
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.75.24:5061 established
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.132.46:5061 established
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15328]: CRITICAL:core:sig_usr: 
> segfault in process pid: 15328, id: 25
> Nov 11 11:52:05 msteams kernel: [22403546.537543] opensips[15328]: segfault 
> at 35 ip 7ff7b4b3f790 sp 7fff48dd0a30 error 4 in 
> tls_wolfssl.so[7ff7b4a71000+1e3000]
> Nov 11 11:52:05 msteams kernel: [22403546.537549] Code: ff ff e9 5b ff ff ff 
> 0f 1f 00 53 48 8d 3d 08 40 3b 00 e8 53 09 00 00 85 c0 75 4f 48 8b 3d 50 40 3b 
> 00 48 85 ff 74 14 0f 1f 00 <48> 8b 5f 08 e8 87 36 f7 ff 48 85 db 48 89 df 75
> ef 5b 48 8d 3d d7
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from 
> 52.114.75.24:17152 accepted
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate 
> subject: /CN=sip.pstnhub.microsoft.com, issuer: /C=US/O=Microsoft 
> Corporation/CN=Microsoft RSA TLS CA 01
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15329]: CRITICAL:core:sig_usr: 
> segfault in process pid: 15329, id: 26
> Nov 11 11:52:05 msteams kernel: [22403546.732270] traps: opensips[15329] 
> general protection fault ip:7ff7b4b0953d sp:7fff48dd0760 error:0 in 
> tls_wolfssl.so[7ff7b4a71000+1e3000]
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 54.171.127.194:5061 established
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15330]: CRITICAL:core:sig_usr: 
> segfault in process pid: 15330, id: 27
> Nov 11 11:52:05 msteams kernel: [22403546.801626] traps: opensips[15330] 
> general protection fault ip:7ff7b4b3f790 sp:7fff48dd0a30 error:0 in 
> tls_wolfssl.so[7ff7b4a71000+1e3000]
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.14.70:5061 established
> Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 54.172.60.3:5061 established
> Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: 
> child process 15328 exited by a signal 11
> Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: 
> core was generated
> Nov 11 11:52:06 msteams 

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-11 Thread Mark Farmer
My version info:

opensips -V
version: opensips 3.2.3 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: f953b30a0
main.c compiled on 16:54:35 Nov  3 2021 with gcc 9


On Thu, 11 Nov 2021 at 14:33, Gregory Massel  wrote:

> I've managed to downgrade to 3.2.2 and all is working again. So this
> appears to be a bug introduced in 3.2.3.
>
> Environment is:
>
> Linux msteams 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22 09:25:04
> UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
>
> The downgrade/fix was with:
>
> apt-get install opensips=3.2.2-1 opensips-dialplan-module=3.2.2-1
> opensips-http-modules=3.2.2-1 opensips-mysql-module=3.2.2-1
> opensips-presence-modules=3.2.2-1 opensips-regex-module=3.2.2-1
> opensips-tls-module=3.2.2-1 opensips-tls-openssl-module=3.2.2-1
> opensips-tls-wolfssl-module=3.2.2-1 opensips-tlsmgm-module=3.2.2-1
>
> --Greg
> On 2021-11-11 15:56, Gregory Massel wrote:
>
> I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL connections.
>
> With WolfSSL it segfaults:
>
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.75.24:5061 established
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.132.46:5061 established
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15328]: CRITICAL:core:sig_usr: 
> segfault in process pid: 15328, id: 25
> Nov 11 11:52:05 msteams kernel: [22403546.537543] opensips[15328]: segfault 
> at 35 ip 7ff7b4b3f790 sp 7fff48dd0a30 error 4 in 
> tls_wolfssl.so[7ff7b4a71000+1e3000]
> Nov 11 11:52:05 msteams kernel: [22403546.537549] Code: ff ff e9 5b ff ff ff 
> 0f 1f 00 53 48 8d 3d 08 40 3b 00 e8 53 09 00 00 85 c0 75 4f 48 8b 3d 50 40 3b 
> 00 48 85 ff 74 14 0f 1f 00 <48> 8b 5f 08 e8 87 36 f7 ff 48 85 db 48 89 df 75
> ef 5b 48 8d 3d d7
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from 
> 52.114.75.24:17152 accepted
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate 
> subject: /CN=sip.pstnhub.microsoft.com, issuer: /C=US/O=Microsoft 
> Corporation/CN=Microsoft RSA TLS CA 01
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15329]: CRITICAL:core:sig_usr: 
> segfault in process pid: 15329, id: 26
> Nov 11 11:52:05 msteams kernel: [22403546.732270] traps: opensips[15329] 
> general protection fault ip:7ff7b4b0953d sp:7fff48dd0760 error:0 in 
> tls_wolfssl.so[7ff7b4a71000+1e3000]
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 54.171.127.194:5061 established
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15330]: CRITICAL:core:sig_usr: 
> segfault in process pid: 15330, id: 27
> Nov 11 11:52:05 msteams kernel: [22403546.801626] traps: opensips[15330] 
> general protection fault ip:7ff7b4b3f790 sp:7fff48dd0a30 error:0 in 
> tls_wolfssl.so[7ff7b4a71000+1e3000]
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.14.70:5061 established
> Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-11 Thread Mark Farmer
Weirdly I started seeing this yesterday and I have not found a solution yet.
I am trying to get a core dump which is not working for some reason but
this is the sanitized log from my server:

INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to
52.114.75.24:5061 established
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
ERROR:core:io_watch_add: [TCP_main] epoll_ctl ADD failed: Bad file
descriptor [9]
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to
52.114.132.46:5061 established
CRITICAL:core:sig_usr: segfault in process pid: 6055, id: 12
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to
52.114.32.169:5061 established
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from
52.114.132.46:7040 accepted
INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate
subject: /CN=sip.pstnhub.microsoft.com, issuer: /C=US/O=Microsoft
Corporation/CN=Microsoft RSA TLS CA 02
request_route: Received OPTIONS from 52.114.132.46
request_route: - checking 52.114.132.46:7040
request_route: - OPTIONS FROM Microsoft
request_route: sip OPTIONS from Microsoft, logging contact header
request_route: Contact Header = 
request_route: Logging Message Buffer: OPTIONS
sip:my.domain.com:5061;transport=tls
SIP/2.0#015#012FROM:
;tag=9ca48371-0c0f-4526-a573-078118b77b12#015#012TO:
#0
15#012CSEQ: 1 OPTIONS#015#012CALL-ID:
28694205-553a-402e-998e-e0aa5c36edea#015#012MAX-FORWARDS: 69#015#012VIA:
SIP/2.0/TLS 52.114.132.46:5061;branch=z9hG4bKce3091ed#015#012CONTACT: #015#012CONTENT-LENGTH:
0#015#012USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2021.11.2.11 i.USEA
.3#015#012ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY#015#012#015
request_route: OPTIONS from tls:52.114.132.46:7040 Sending reply 200 OK
INFO:core:handle_sigs: child process 6055 exited by a signal 11
INFO:core:handle_sigs: core was generated
INFO:core:handle_sigs: terminating due to SIGCHLD
INFO:core:sig_usr: signal 15 received
INFO:core:shutdown_opensips: process 2(6045) [MI FIFO] terminated, still
waiting for 13 more
INFO:core:sig_usr: signal 15 received
INFO:core:shutdown_opensips: process 4(6047) [time_keeper] terminated,
still waiting for 12 more
INFO:core:shutdown_opensips: process 3(6046) [HTTPD INADDR_ANY:8080]
terminated, still waiting for 11 more
INFO:core:shutdown_opensips: process 13(6056) [TCP receiver] terminated,
still waiting for 10 more
INFO:core:shutdown_opensips: process 5(6048) [timer] terminated, still
waiting for 9 more
INFO:core:shutdown_opensips: process 10(6053) [TCP receiver] terminated,
still waiting for 8 more
INFO:core:shutdown_opensips: process 7(6050) [SIP receiver
udp:x.x.x.x:5060] terminated, still waiting for 7 more
INFO:core:shutdown_opensips: process 11(6054) [TCP receiver] terminated,
still waiting for 6 more
INFO:core:shutdown_opensips: process 14(6058) [Timer handler] terminated,
still waiting for 5 more
INFO:core:shutdown_opensips: process 6(6049) [SIP receiver
udp:x.x.x.x:5060] terminated, still waiting for 4 more
INFO:core:shutdown_opensips: process 15(6059) [TCP main] terminated, still
waiting for 3 more
INFO:core:shutdown_opensips: process 8(6051) [SIP receiver
udp:x.x.x.x:5060] terminated, still waiting for 2 more
INFO:core:shutdown_opensips: process 1(6044) [SNMP AgentX] terminated,
still waiting for 1 more
INFO:core:shutdown_opensips: process 9(6052) [SIP receiver
udp:x.x.x.x:5060] terminated, still waiting for 0 more
INFO:core:cleanup: cleanup
INFO:snmpstats:mod_destroy: The SNMPStats module got the kill signal
INFO:snmpstats:mod_destroy: Shutting down the AgentX Sub-Agent!
INFO:tls_wolfssl:mod_destroy: destroying tls_wolfssl module
CRITICAL:core:sig_usr: segfault in attendant (starter) process!


Mark.


On Thu, 11 Nov 2021 at 13:59, Gregory Massel  wrote:

> I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL connections.
>
> With WolfSSL it segfaults:
>
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.75.24:5061 established
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
> Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
> NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
> Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
> INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
> 52.114.132.46:5061 established
> Nov 11 11:52:05 

Re: [OpenSIPS-Users] 3.2.3 TLS issue

2021-11-11 Thread Gregory Massel
I've managed to downgrade to 3.2.2 and all is working again. So this 
appears to be a bug introduced in 3.2.3.


Environment is:

Linux msteams 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22 
09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


The downgrade/fix was with:

apt-get install opensips=3.2.2-1 opensips-dialplan-module=3.2.2-1 
opensips-http-modules=3.2.2-1 opensips-mysql-module=3.2.2-1 
opensips-presence-modules=3.2.2-1 opensips-regex-module=3.2.2-1 
opensips-tls-module=3.2.2-1 opensips-tls-openssl-module=3.2.2-1 
opensips-tls-wolfssl-module=3.2.2-1 opensips-tlsmgm-module=3.2.2-1


--Greg

On 2021-11-11 15:56, Gregory Massel wrote:


I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL connections.

With WolfSSL it segfaults:

Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
52.114.75.24:5061 established
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
52.114.132.46:5061 established
Nov 11 11:52:05 msteams /usr/sbin/opensips[15328]: CRITICAL:core:sig_usr: 
segfault in process pid: 15328, id: 25
Nov 11 11:52:05 msteams kernel: [22403546.537543] opensips[15328]: segfault at 
35 ip 7ff7b4b3f790 sp 7fff48dd0a30 error 4 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams kernel: [22403546.537549] Code: ff ff e9 5b ff ff ff 0f 1f 00 
53 48 8d 3d 08 40 3b 00 e8 53 09 00 00 85 c0 75 4f 48 8b 3d 50 40 3b 00 48 85 ff 74 
14 0f 1f 00 <48> 8b 5f 08 e8 87 36 f7 ff 48 85 db 48 89 df 75
ef 5b 48 8d 3d d7
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from 
52.114.75.24:17152 accepted
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate 
subject: /CN=sip.pstnhub.microsoft.com, issuer: /C=US/O=Microsoft 
Corporation/CN=Microsoft RSA TLS CA 01
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15329]: CRITICAL:core:sig_usr: 
segfault in process pid: 15329, id: 26
Nov 11 11:52:05 msteams kernel: [22403546.732270] traps: opensips[15329] 
general protection fault ip:7ff7b4b0953d sp:7fff48dd0760 error:0 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
54.171.127.194:5061 established
Nov 11 11:52:05 msteams /usr/sbin/opensips[15330]: CRITICAL:core:sig_usr: 
segfault in process pid: 15330, id: 27
Nov 11 11:52:05 msteams kernel: [22403546.801626] traps: opensips[15330] 
general protection fault ip:7ff7b4b3f790 sp:7fff48dd0a30 error:0 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
52.114.14.70:5061 established
Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
54.172.60.3:5061 established
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: child 
process 15328 exited by a signal 11
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: core 
was generated
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: 
terminating due to SIGCHLD
Nov 11 11:52:06 msteams /usr/sbin/opensips[15296]: INFO:core:sig_usr: signal 15 
received
Nov 11 11:52:06 msteams /usr/sbin/opensips[15297]: INFO:core:sig_usr: signal 15 
received
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:shutdown_opensips: 
process 3(15296) [time_keeper] terminated, still 

[OpenSIPS-Users] 3.2.3 TLS issue

2021-11-11 Thread Gregory Massel

I'm running OpenSIPS 3.2.3 and it keeps bombing out on SSL connections.

With WolfSSL it segfaults:

Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
52.114.75.24:5061 established
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:04 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
52.114.132.46:5061 established
Nov 11 11:52:05 msteams /usr/sbin/opensips[15328]: CRITICAL:core:sig_usr: 
segfault in process pid: 15328, id: 25
Nov 11 11:52:05 msteams kernel: [22403546.537543] opensips[15328]: segfault at 
35 ip 7ff7b4b3f790 sp 7fff48dd0a30 error 4 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams kernel: [22403546.537549] Code: ff ff e9 5b ff ff ff 0f 1f 00 
53 48 8d 3d 08 40 3b 00 e8 53 09 00 00 85 c0 75 4f 48 8b 3d 50 40 3b 00 48 85 ff 74 
14 0f 1f 00 <48> 8b 5f 08 e8 87 36 f7 ff 48 85 db 48 89 df 75
ef 5b 48 8d 3d d7
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:_wolfssl_tls_accept: New TLS connection from 
52.114.75.24:17152 accepted
Nov 11 11:52:05 msteams /usr/sbin/opensips[15322]: 
INFO:tls_wolfssl:tls_dump_cert_info: tls_accept: client TLS certificate 
subject: /CN=sip.pstnhub.microsoft.com, issuer: /C=US/O=Microsoft 
Corporation/CN=Microsoft RSA TLS CA 01
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15329]: CRITICAL:core:sig_usr: 
segfault in process pid: 15329, id: 26
Nov 11 11:52:05 msteams kernel: [22403546.732270] traps: opensips[15329] 
general protection fault ip:7ff7b4b0953d sp:7fff48dd0760 error:0 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
54.171.127.194:5061 established
Nov 11 11:52:05 msteams /usr/sbin/opensips[15330]: CRITICAL:core:sig_usr: 
segfault in process pid: 15330, id: 27
Nov 11 11:52:05 msteams kernel: [22403546.801626] traps: opensips[15330] 
general protection fault ip:7ff7b4b3f790 sp:7fff48dd0a30 error:0 in 
tls_wolfssl.so[7ff7b4a71000+1e3000]
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 1, verify success
Nov 11 11:52:05 msteams /usr/sbin/opensips[15326]: 
NOTICE:tls_wolfssl:verify_callback: depth = 0, verify success
Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
52.114.14.70:5061 established
Nov 11 11:52:06 msteams /usr/sbin/opensips[15325]: 
INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS connection to 
54.172.60.3:5061 established
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: child 
process 15328 exited by a signal 11
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: core 
was generated
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:handle_sigs: 
terminating due to SIGCHLD
Nov 11 11:52:06 msteams /usr/sbin/opensips[15296]: INFO:core:sig_usr: signal 15 
received
Nov 11 11:52:06 msteams /usr/sbin/opensips[15297]: INFO:core:sig_usr: signal 15 
received
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:shutdown_opensips: 
process 3(15296) [time_keeper] terminated, still waiting for 28 more
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:shutdown_opensips: 
process 4(15297) [timer] terminated, still waiting for 27 more
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:shutdown_opensips: 
process 5(15298) [SIP receiver udp:127.0.0.1:5060] terminated, still waiting 
for 26 more
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:shutdown_opensips: 
process 6(15299) [SIP receiver udp:127.0.0.1:5060] terminated, still waiting 
for 25 more
Nov 11 11:52:06 msteams /usr/sbin/opensips[15293]: INFO:core:shutdown_opensips: 
process 14(15308) [SIP receiver udp:[0:0:0:0:0:0:0:1]:5060]