[Home]

Summary:ASTERISK-20122: [Regression] 1.8.14.0 seg faulted 10 times supposedly in ast_ssl_teardown while a TCP TLS node was re-regestering after the Asterisk reload
Reporter:Vladimir Mikhelson (vmikhelson)Labels:
Date Opened:2012-07-11 23:30:55Date Closed:2012-07-16 11:30:55
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_sip/TCP-TLS
Versions:1.8.14.0 Frequency of
Occurrence
One Time
Related
Issues:
is related toASTERISK-20074 TLS stops responding in 1.8.14-rc1 when an aastra phone tries to register
Environment:CentOS 5.8, kernel 2.6.18-308.11.1.el5 FreePBX 2.10.1.1Attachments:( 0) backtrace.txt
( 1) gdb.txt
Description:After Asterisk 1.8.14.0 was built from sources (upgraded from 1.8.13.0), and loaded normally, it experienced segmentation fault ten (10) times.

The suspect is Cisco 7906 which re-registered on a previously used port 51844 where Asterisk would refuse the connection until Cisco tried to use 51063. See a successful sequence below. When the Asterisk seg. faulted we only observed a couple of "Unable to connect SIP socket to 172.17.137.70:51844: Connection refused" messages.

[2012-07-11 22:51:13] NOTICE[4586] chan_sip.c: Peer '470' is now UNREACHABLE!  Last qualify: 0
[2012-07-11 22:51:23] ERROR[4624] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:51:37] ERROR[4643] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:51:47] VERBOSE[4537] asterisk.c:     -- Remote UNIX connection
[2012-07-11 22:51:51] ERROR[4716] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:52:05] ERROR[4736] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:52:19] ERROR[4753] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:52:33] ERROR[4768] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:52:47] ERROR[4783] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:53:01] ERROR[4809] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:53:15] ERROR[4828] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:53:29] ERROR[4848] tcptls.c: Unable to connect SIP socket to 172.17.137.70:51844: Connection refused
[2012-07-11 22:53:38] VERBOSE[4862] chan_sip.c:     -- Registered SIP '470' at 172.17.137.70:51063
[2012-07-11 22:53:38] NOTICE[4862] chan_sip.c: Peer '470' is now Reachable. (421ms / 2000ms)
Comments:By: Vladimir Mikhelson (vmikhelson) 2012-07-11 23:34:42.925-0500

Extracted backtrace.txt and gdb.txt per https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

I was not expecting the crash so the DONT_OPTIMIZE and BETTER_BACKTRACES flags were not set.

Please let me know whether more details are needed.  This is a production system, so I would rather not reproduce the problem unless necessary.
==================================================================================================
July 12, 2012

Michael,

I failed to add a comment in JIRA, luckily it still has an option to edit.

The patch worked fine.  I will test more later, but I was able to load Asterisk with no issues. Cisco phone registered normally.

Thank you,
Vladimir



By: Michael L. Young (elguero) 2012-07-12 08:57:41.071-0500

Can you try the patch on ASTERISK-20074?  https://issues.asterisk.org/jira/secure/attachment/44010/ASTERISK-20074.diff

This patch removes the call to ast_ssl_teardown from session_instance_destructor and has already been merged in to 1.8.  I see it was reported against 1.8.14-rc1 but I do not see that it was applied to the final release.

Please report back.

By: Michael L. Young (elguero) 2012-07-12 12:05:18.978-0500

Vladimir,

I think you needed to use "Enter Feedback" in order to add a comment.

Thanks for testing that and for the feedback.

By: Vladimir Mikhelson (vmikhelson) 2012-07-12 12:31:03.504-0500

Michael,

I saw the "Enter Feedback" but thought it would be misuse to utilize it to enter regular comments.  BTW, now the "Comment" button is available.

Mantis was so much more convenient, user friendlier, and 1000 times more efficient.

Thank you,
Vladimir


By: Vladimir Mikhelson (vmikhelson) 2012-07-14 22:01:55.678-0500

Michael,

My testing shows the patch fixed the issue.

Thank you,
Vladimir