[Home]

Summary:ASTERISK-24587: Invalid free in valgrind output
Reporter:Badalian Vyacheslav (slavon)Labels:
Date Opened:2014-12-02 19:28:38.000-0600Date Closed:2015-01-15 09:09:58.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_mixmonitor
Versions:11.14.1 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-24571 Deadlock when asterisk is loading and CLI command "sip reload" is executed
Environment:centos 6 x64Attachments:( 0) core.m1-asterisk01.tcsbank.ru-2014-12-02T13:03:36+0300.txt
Description:Full backtrace will attach bellow
Comments:By: Matt Jordan (mjordan) 2014-12-02 21:12:57.743-0600

[~slavon]: Please read the Asterisk Issue Reporting guidelines on the Asterisk wiki: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

The issue summary, description, and generally everything on this issue do not reflect the issue you encountered. If you are going to continue to file issues in the Asterisk project, you will need to follow the guidelines on the wiki.

Simply from the backtrace, it appears as if you encountered a memory corruption. As you have several other issues that valgrind has pointed out, this is most likely related to those issues.

By: Badalian Vyacheslav (slavon) 2014-12-02 21:28:44.478-0600

I fully understand that.
But this battle server on which I can not run the memory test. On the test server with the same patches are no errors in the memory under test in more than 30 thousand calls. Maybe this is a rare error.
Perhaps you have a similar error in the bug report system or trace may still show an error, so I'm here and spread this information.
You have a greater knowledge of your code.
I make the contribution that can and believe me I spend quite a few of their personal and working time on it. If it only prevents you, I will be more selectively post their messages.
In any case, you make a big deal and you will thank you for it.

By: Badalian Vyacheslav (slavon) 2014-12-03 10:42:44.118-0600

May be its help
{code}
==30565== Thread 18:
==30565== Invalid read of size 8
==30565==    at 0x2175FA17: destroy_tdata (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21760854: pj_stun_session_destroy (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x217604D1: stun_tsx_on_send_msg (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21762E5E: tsx_transmit_msg (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x2176319A: retransmit_timer_callback (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21786B6D: pj_timer_heap_poll (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21745D58: timer_worker_thread (res_rtp_asterisk.c:1696)
==30565==    by 0x2177809A: thread_main (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x37CA2079D0: start_thread (pthread_create.c:301)
==30565==    by 0x37C9EE89DC: clone (clone.S:115)
==30565==  Address 0x83664a8 is 232 bytes inside a block of size 8,192 free'd
==30565==    at 0x4A06BE4: free (vg_replace_malloc.c:473)
==30565==    by 0x2177A6BF: default_block_free (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x217812FA: reset_pool (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x217813A7: pj_pool_destroy_int (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21781C06: cpool_release_pool (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21780DEC: pj_pool_release (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21756416: destroy_ice (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21756469: pj_ice_sess_destroy (in /usr/lib/asterisk/modules/res_rtp_asterisk.so)
==30565==    by 0x21748A8F: ast_rtp_destroy (res_rtp_asterisk.c:2532)
==30565==    by 0x555E91: instance_destructor (rtp_engine.c:212)
==30565==    by 0x44D2D3: internal_ao2_ref (astobj2.c:466)
==30565==    by 0x44D5F4: __ao2_ref (astobj2.c:548)
==30565==    by 0x555FE9: ast_rtp_instance_destroy (rtp_engine.c:231)
==30565==    by 0x111D36D1: __sip_destroy (chan_sip.c:6397)
==30565==    by 0x111D4B91: sip_destroy (chan_sip.c:6684)
==30565==

{code}

By: Matt Jordan (mjordan) 2014-12-10 07:34:09.839-0600

Random information placed in issues on the issue tracker is not helpful. If bug marshals can't reproduce, understand, or analyze the problems you run into, then we are all just wasting time.

Following the issue reporting guidelines - so that we get good, actionable information - is very helpful. There's no need to guess what bug marshals need: we've already listed it out on that wiki page for you.

Specific to your particular valgrind output: That may or may not be related to this crash.

For now, it's fine to re-purpose this issue for the invalid free that your valgrind output produced. For *that particular issue*, please also provide:
* The relevant portions of your configuration, including the SIP peer
* A debug log with SIP message traffic (with 'sip set debug on') generated using the instructions on the wiki. Knowing the message traffic that triggered that particular memory error will help developers fix it correctly

By: Rusty Newton (rnewton) 2014-12-30 19:11:36.291-0600

Badalian. I realize there are many Holidays around this time, so I'm just updating this issue one last time to see if you can provide the requested information. Please hit Send Back or Enter Feedback when you have the data.

By: Rusty Newton (rnewton) 2015-01-15 09:09:58.216-0600

Since we can't reproduce this issue and don't have any further information to allow us to investigate it, I'm closing this out.

Badalian if you get the information in the future (about this issue), simply contact a bug marshal in #asterisk-bugs or #asterisk-dev on irc.freenode.net or else E-mail asteriskteam@digium.com to request we re-open the issue.