Error in `/usr/sbin/asterisk': double free or corruption (out)

hello, after many calls my asterisk crashes and the following error appears

*** Error in /usr/sbin/asterisk': double free or corruption (out): 0x00007f0c14129e90 *** *** Error in /usr/sbin/asterisk’: free(): corrupted unsorted chunks: 0x00007f0c14182040 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81299)[0x7f10f7c52299]
/lib64/libasteriskpj.so.2(+0x10be96)[0x7f10fad01e96]
/lib64/libasteriskpj.so.2(pj_grp_lock_dec_ref+0xd8)[0x7f10facff4d8]
/lib64/libasteriskpj.so.2(+0xadd52)[0x7f10faca3d52]
/lib64/libasteriskpj.so.2(pj_timer_heap_poll+0x13a)[0x7f10fad07cda]
/usr/lib64/asterisk/modules/res_rtp_asterisk.so(+0x9290)[0x7f10674c8290]
/lib64/libasteriskpj.so.2(+0x101d50)[0x7f10facf7d50]
/lib64/libpthread.so.0(+0x7ea5)[0x7f10f892fea5]
/lib64/libc.so.6(clone+0x6d)[0x7f10f7ccf96d]
======= Memory map: ========
======= Backtrace: =========
*** Error in `/usr/sbin/asterisk’: free(): corrupted unsorted chunks: 0x00007f0c14119240 ***
/lib64/libc.so.6(+0x81299)[0x7f10f7c52299]
/usr/sbin/asterisk(__ao2_ref+0x2f8)[0x45e3b8]
/usr/sbin/asterisk[0x460894]
======= Backtrace: =========
/usr/sbin/asterisk[0x4615d6]
/lib64/libc.so.6(+0x81299)[0x7f10f7c52299]
/usr/sbin/asterisk(__ao2_ref+0x27d)[0x45e33d]
/usr/sbin/asterisk[0x4f09e4]
/usr/lib64/asterisk/modules/res_rtp_asterisk.so(+0xd6f8)[0x7f10674cc6f8]
/lib64/libpthread.so.0(+0x7ca2)[0x7f10f892fca2]
/usr/sbin/asterisk[0x5419c1]
/lib64/libpthread.so.0(+0x7eb3)[0x7f10f892feb3]
/usr/sbin/asterisk(__ao2_ref+0x27d)[0x45e33d]
/lib64/libc.so.6(clone+0x6d)[0x7f10f7ccf96d]
======= Memory map: ========
/usr/sbin/asterisk(ast_rtp_instance_destroy+0x1b)[0x53fbbb]
/usr/lib64/asterisk/modules/res_pjsip_sdp_rtp.so(+0x5007)[0x7f1063837007]
/usr/lib64/asterisk/modules/res_pjsip_session.so(+0x662e)[0x7f106872462e]
/usr/sbin/asterisk[0x4607fd]
/usr/lib64/asterisk/modules/res_pjsip_session.so(+0x696d)[0x7f106872496d]
/usr/sbin/asterisk(__ao2_ref+0x27d)[0x45e33d]
/usr/lib64/asterisk/modules/res_pjsip_session.so(ast_sip_session_media_state_reset+0x46)[0x7f1068727aa6]
/usr/lib64/asterisk/modules/res_pjsip_session.so(ast_sip_session_terminate+0x114)[0x7f1068738e64]
/usr/lib64/asterisk/modules/chan_pjsip.so(+0xf96c)[0x7f105f77296c]
/usr/sbin/asterisk(ast_taskprocessor_execute+0xd0)[0x59a360]
/usr/sbin/asterisk[0x5a12f0]
/usr/sbin/asterisk(ast_taskprocessor_execute+0xd0)[0x59a360]
/usr/sbin/asterisk[0x5a1ef0]
/usr/sbin/asterisk[0x5a9409]
/lib64/libpthread.so.0(+0x7ea5)[0x7f10f892fea5]
/lib64/libc.so.6(clone+0x6d)[0x7f10f7ccf96d]
======= Memory map: ========
00400000-006d8000 r-xp 00000000 fd:00 2622582 /usr/sbin/asterisk
008d8000-008d9000 r–p 002d8000 fd:00 2622582 /usr/sbin/asterisk
008d9000-00900000 rw-p 002d9000 fd:00 2622582 /usr/sbin/asterisk
00900000-00915000 rw-p 00000000 00:00 0
00deb000-035f5000 rw-p 00000000 00:00 0 [heap]
7f08ab1d7000-7f08ab1d8000 —p 00000000 00:00 0
7f08ab1d8000-7f08ab254000 rwxp 00000000 00:00 0
7f08ab254000-7f08ab255000 —p 00000000 00:00 0
7f08ab255000-7f08ab2d1000 rwxp 00000000 00:00 0
7f08ab34e000-7f08ab34f000 —p 00000000 00:00 0
7f08ab34f000-7f08ab3cb000 rwxp 00000000 00:00 0
7f08ab3cb000-7f08ab3cc000 —p 00000000 00:00 0
7f08ab3cc000-7f08ab448000 rwxp 00000000 00:00 0
7f08ab448000-7f08ab449000 —p 00000000 00:00 0
7f08ab449000-7f08ab4c5000 rwxp 00000000 00:00 0
7f08ab4c5000-7f08ab4c6000 —p 00000000 00:00 0
7f08ab4c6000-7f08ab542000 rwxp 00000000 00:00 0
7f08ab542000-7f08ab543000 —p 00000000 00:00 0
7f08ab543000-7f08ab5bf000 rwxp 00000000 00:00 0
7f08ab63c000-7f08ab63d000 —p 00000000 00:00 0
7f08ab63d000-7f08ab6b9000 rwxp 00000000 00:00 0
7f08ab6b9000-7f08ab6ba000 —p 00000000 00:00 0
7f08ab6ba000-7f08ab736000 rwxp 00000000 00:00 0
7f08ab736000-7f08ab737000 —p 00000000 00:00 0
7f08ab737000-7f08ab7b3000 rwxp 00000000 00:00 0
7f08ab830000-7f08ab831000 —p 00000000 00:00 0
7f08ab831000-7f08ab8ad000 rwxp 00000000 00:00 0
7f08ab92a000-7f08ab92b000 —p 00000000 00:00 0
7f08ab92b000-7f08ab9a7000 rwxp 00000000 00:00 0
7f08ab9a7000-7f08ab9a8000 —p 00000000 00:00 0
7f08ab9a8000-7f08aba24000 rwxp 00000000 00:00 0
7f08abaa1000-7f08abaa2000 —p 00000000 00:00 0
7f08abaa2000-7f08abb1e000 rwxp 00000000 00:00 0
7f08abb1e000-7f08abb1f000 —p 00000000 00:00 0
7f08abb1f000-7f08abb9b000 rwxp 00000000 00:00 0
7f08abb9b000-7f08abb9c000 —p 00000000 00:00 0
7f08abb9c000-7f08abc18000 rwxp 00000000 00:00 0
7f08abc95000-7f08abc96000 —p 00000000 00:00 0
7f08abc96000-7f08abd12000 rwxp 00000000 00:00 0
7f08abd12000-7f08abd13000 —p 00000000 00:00 0
7f08abd13000-7f08abd8f000 rwxp 00000000 00:00 0
7f08abd8f000-7f08abd90000 —p 00000000 00:00 0
7f08abd90000-7f08abe0c000 rwxp 00000000 00:00 0
7f08abe89000-7f08abe8a000 —p 00000000 00:00 0
7f08abe8a000-7f08abf06000 rwxp 00000000 00:00 0
7f08ac000000-7f08ac068000 rw-p 00000000 00:00 0
7f08ac068000-7f08b0000000 —p 00000000 00:00 0
7f08b0000000-7f08b0059000 rw-p 00000000 00:00 0
7f08b0059000-7f08b4000000 —p 00000000 00:00 0
7f08b4000000-7f08b40cd000 rw-p 00000000 00:00 0
7f08b40cd000-7f08b8000000 —p 00000000 00:00 0
7f08b8000000-7f08b806d000 rw-p 00000000 00:00 0
7f08b806d000-7f08bc000000 —p 00000000 00:00 0
7f08bc000000-7f08bc052000 rw-p 00000000 00:00 0
7f08bc052000-7f08c0000000 —p 00000000 00:00 0
7f08c0000000-7f08c0080000 rw-p 00000000 00:00 0
7f08c0080000-7f08c4000000 —p 00000000 00:00 0
7f08c4000000-7f08c4060000 rw-p 00000000 00:00 0
7f08c4060000-7f08c8000000 —p 00000000 00:00 0
7f08c8000000-7f08c80cf000 rw-p 00000000 00:00 0
7f08c80cf000-7f08cc000000 —p 00000000 00:00 0
7f08cc000000-7f08cc0cf000 rw-p 00000000 00:00 0
7f08cc0cf000-7f08d0000000 —p 00000000 00:00 0
7f08d0000000-7f08d1741000 rw-p 00000000 00:00 0
7f08d1741000-7f08d4000000 —p 00000000 00:00 0
7f08d4000000-7f08d4057000 rw-p 00000000 00:00 0
7f08d4057000-7f08d8000000 —p 00000000 00:00 0
7f08d8000000-7f08d807b000 rw-p 00000000 00:00 0
7f08d807b000-7f08dc000000 —p 00000000 00:00 0
7f08dc000000-7f08dc076000 rw-p 00000000 00:00 0
7f08dc076000-7f08e0000000 —p 00000000 00:00 0
7f08e0000000-7f08e005a000 rw-p 00000000 00:00 0
7f08e005a000-7f08e4000000 —p 00000000 00:00 0
7f08e4000000-7f08e4099000 rw-p 00000000 00:00 0
7f08e4099000-7f08e8000000 —p 00000000 00:00 0
7f08e8000000-7f08e8076000 rw-p 00000000 00:00 0
7f08e8076000-7f08ec000000 —p 00000000 00:00 0
7f08ec000000-7f08ec05d000 rw-p 00000000 00:00 0
7f08ec05d000-7f08f0000000 —p 00000000 00:00 0
7f08f0000000-7f08f00a0000 rw-p 00000000 00:00 0
7f08f00a0000-7f08f4000000 —p 00000000 00:00 0
7f08f4000000-7f08f404f000 rw-p 00000000 00:00 0
7f08f404f000-7f08f8000000 —p 00000000 00:00 0
7f08f8000000-7f08f806d000 rw-p 00000000 00:00 0
7f08f806d000-7f08fc000000 —p 00000000 00:00 0
7f08fc000000-7f08fc09c000 rw-p 00000000 00:00 0
7f08fc09c000-7f0900000000 —p 00000000 00:00 0
7f0900000000-7f09000c2000 rw-p 00000000 00:00 0
7f09000c2000-7f0904000000 —p 00000000 00:00 0
7f0904000000-7f09040d0000 rw-p 00000000 00:00 0
7f09040d0000-7f0908000000 —p 00000000 00:00 0
7f0908000000-7f0908059000 rw-p 00000000 00:00 0
7f0908059000-7f090c000000 —p 00000000 00:00 0
7f090c000000-7f090c0d3000 rw-p 00000000 00:00 0
7f090c0d3000-7f0910000000 —p 00000000 00:00 0
7f0910000000-7f0910077000 rw-p 00000000 00:00 0
7f0910077000-7f0914000000 —p 00000000 00:00 0
7f0914000000-7f091407c000 rw-p 00000000 00:00 0
7f091407c000-7f0918000000 —p 00000000 00:00 0
7f0918000000-7f091808d000 rw-p 00000000 00:00 0
7f091808d000-7f091c000000 —p 00000000 00:00 0
7f091c000000-7f091c063000 rw-p 00000000 00:00 0
7f091c063000-7f0920000000 —p 00000000 00:00 0

You haven’t stated what version of Asterisk you are using.

The big problem with memory corruption crashes is that they can happen at some time after the original corruption, so, whilst your very limited backtrace suggests a problem with RTP handling in chan_pjsip (probably actually trying to free the internal copy of the RTP frame, you really need to look at logging before this to look for other symptoms, and also to see if something relatively unusual was being done at the time.

hi, sorry, the version of asterisk is 18.2.0

I checked the previous logs and it turns out that this message is the one that is coming out res_rtp_asterisk.c: RTCP SR transmission error to 192.168.2.132:16429, rtcp halted Operation not permitted

That’s an old version of 18, and there have been fixes done in that area.

Thank you, I start the update process

thanks you, its solve de problem

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.