[Home]

Summary:ASTERISK-07908: chan_sip.c causes asterisk to crash randomly in __sip_destroy when ast_string_field_free_all is called
Reporter:Aaron Daniel (adaniel)Labels:
Date Opened:2006-10-10 10:25:56Date Closed:2011-06-07 14:03:05
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The problem appears to occur when attempting to send out MWI to the phones.  It's very random, it was all working yesterday but it's causing problems today.  I've traced it back to the function in include/asterisk/stringfields.h, line 323.

****** ADDITIONAL INFORMATION ******

#0  0x004b3682 in __sip_destroy (p=0x895a4c8, lockowner=1) at chan_sip.c:2915
2915            ast_string_field_free_all(p);
(gdb) bt
#0  0x004b3682 in __sip_destroy (p=0x895a4c8, lockowner=1) at chan_sip.c:2915
#1  0x004f9c7c in do_monitor (data=0x0) at chan_sip.c:14621
#2  0x080f0245 in dummy_start (data=0x81389a0) at utils.c:544
#3  0x00445371 in start_thread () from /lib/tls/libpthread.so.0
#4  0x0031dffe in clone () from /lib/tls/libc.so.6
(gdb) bt full
#0  0x004b3682 in __sip_destroy (p=0x895a4c8, lockowner=1) at chan_sip.c:2915
       index = Variable "index" is not available.
(gdb) quit
Comments:By: Anthony LaMantia (alamantia) 2006-10-12 16:12:57

Hi,

can you post some of your console debug logs with verberosity and sip debugging on as well as a backtrace that is a bit longer so we can track down this bug?

By: Olle Johansson (oej) 2006-10-27 12:20:46

Can you please try with latest 1.4 from svn? Thanks.

By: Olle Johansson (oej) 2006-11-13 13:36:04.000-0600

Please retest. If I get no answer I have to close this report. Thanks for your help.

By: Olle Johansson (oej) 2006-11-15 15:35:59.000-0600

We really need you to test with the latest version of 1.4 from svn. Please help us make sure that bugs you report are fixed and return with a reply. Thanks.

By: Aaron Daniel (adaniel) 2006-11-15 19:33:04.000-0600

I don't currently have the resources available to test this at the moment, I can try to look into it again next week.

By: Olle Johansson (oej) 2006-12-07 04:55:30.000-0600

Have you had any time to check yet, we have waited a bit more than a week now. :-)

By: Olle Johansson (oej) 2006-12-29 05:45:07.000-0600

Any updates? It's hard to help you if you don't get back to us. Thanks.

By: Dan Moschuk (dnatural) 2007-01-05 10:18:44.000-0600

I can confirm that this happens on trunk r49321M.  I have two core dumps and can lend any assistance you need.



By: Serge Vecher (serge-v) 2007-01-05 10:38:49.000-0600

thanks for the offer. Let's get some diagnostic information to help us get to the bottom of this:

A. First of all, delete your current repository and perform a fresh checkout of 1.4 from svn.
B. if asterisk is still crashing, please produce a backtrace as per:
1. Enable DONT_OPTIMIZE flag in menuselect under Compiler Options.
2. Rebuild Asterisk
3. Start Asterisk with '-g' option
4. When crash occurs, perform 'bt' on the core file. Then 'thread apply all bt full'

C. Also, it would be helpful to get a console log at with verbose/debug output as per:
1) Prepare test environment (reduce the amount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
  console => notice,warning,error,debug
3) restart Asterisk with the following command:
  'asterisk -Tvvvvvdddddngc | tee /tmp/verbosedebug.txt'
4) Enable SIP transaction logging with the following CLI commands:
set debug 4
set verbose 4
sip debug
5) Trim startup information and attach verbosedebug.txt to the issue.


By: Dan Moschuk (dnatural) 2007-01-05 15:26:49.000-0600

Up and running with SVN-branch-1.4-r49636M.  Lets see how she does...  its taken up to 3 days to crash.

By: Olle Johansson (oej) 2007-02-01 15:53:36.000-0600

Any updates?

By: Olle Johansson (oej) 2007-02-01 16:06:25.000-0600

when it locks, but does not crash, please attach gdb and get a full backtrace so we see what's going on in your servers, what's hanging. Thanks.

By: Olle Johansson (oej) 2007-02-15 12:23:13.000-0600

No answer from reporter. Seems fixed. Will re-open if needed.