[asterisk-bugs] [JIRA] (ASTERISK-28011) chan_sip: get_refer_info() attempted unlock mutex 'peer' without owning it!

Friendly Automation (JIRA) noreply at issues.asterisk.org
Fri Aug 24 09:01:54 CDT 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=244595#comment-244595 ] 

Friendly Automation commented on ASTERISK-28011:
------------------------------------------------

Change 9990 merged by George Joseph:
chan_sip:  remove unnecessary ast_channel_unlock(peer) as RAII looks after it

[https://gerrit.asterisk.org/9990|https://gerrit.asterisk.org/9990]

> chan_sip: get_refer_info() attempted unlock mutex 'peer' without owning it!
> ---------------------------------------------------------------------------
>
>                 Key: ASTERISK-28011
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28011
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 13.22.0
>            Reporter: Alec Davis
>            Severity: Trivial
>
> Nothing untoward seems to happen but plays havoc with my OCD by seeing these {color:red}ERRORS{color} go by.
> Very repeatable, every time we blind transfer to another SIP device we get
> {code}
> [2018-08-16 15:37:07.696431] ERROR[2696][C-00001a16]: lock.c:461 __ast_pthread_mutex_unlock: chan_sip.c line 18683 (get_refer_info): mutex 'peer' freed more times than we've locked!
> [2018-08-16 15:37:07.696746] ERROR[2696][C-00001a16]: lock.c:492 __ast_pthread_mutex_unlock: chan_sip.c line 18683 (get_refer_info): Error releasing mutex: Operation not permitted
> {code}
> or
> {code}
>   == Extension Changed 8512[phones] new state Hold for Notify User cisco1
> [2018-08-14 14:49:42.708375] ERROR[2696][C-000014f3]: lock.c:450 __ast_pthread_mutex_unlock: chan_sip.c line 18683 (get_refer_info): attempted unlock mutex 'peer' without owning it!
> [2018-08-14 14:49:42.708579] ERROR[2696][C-000014f3]: lock.c:452 __ast_pthread_mutex_unlock: channel.c line 3813 (__ast_read): 'peer' was locked here.
> [2018-08-14 14:49:42.709197] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/sbin/asterisk(__ast_bt_get_addresses+0x14) [0x80a02c8]
>     -- Channel SIP/jeremy-00001c67 left 'simple_bridge' basic-bridge <6c720cbf-7f7b-4ff6-9d7f-b51bb4cc3232>
> [2018-08-14 14:49:42.709668] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/sbin/asterisk(__ast_pthread_mutex_lock+0x8a) [0x8153d9c]
> [2018-08-14 14:49:42.710482] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/sbin/asterisk(__ao2_lock+0x70) [0x8096e94]
> [2018-08-14 14:49:42.710747] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/sbin/asterisk(pbx_builtin_setvar_helper+0xd3) [0x819eae8]
> [2018-08-14 14:49:42.711242] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/lib/asterisk/modules/chan_sip.so(+0x5156c) [0xb50c656c]
> [2018-08-14 14:49:42.711501] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/lib/asterisk/modules/chan_sip.so(+0x74ff7) [0xb50e9ff7]
> [2018-08-14 14:49:42.711815] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/lib/asterisk/modules/chan_sip.so(+0x7d4a4) [0xb50f24a4]
> [2018-08-14 14:49:42.712273] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/lib/asterisk/modules/chan_sip.so(+0x7ddf1) [0xb50f2df1]
> [2018-08-14 14:49:42.712719] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/lib/asterisk/modules/chan_sip.so(+0x7d9da) [0xb50f29da]
> [2018-08-14 14:49:42.713212] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/sbin/asterisk(ast_io_wait+0x131) [0x814c20a]
> [2018-08-14 14:49:42.713610] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/lib/asterisk/modules/chan_sip.so(+0x7f870) [0xb50f4870]
> [2018-08-14 14:49:42.714093] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /usr/sbin/asterisk() [0x81fcb38]
> [2018-08-14 14:49:42.714443] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /lib/i386-linux-gnu/i686/cmov/libpthread.so.0(+0x6ecb) [0xb7217ecb]
> [2018-08-14 14:49:42.714824] ERROR[2696][C-000014f3]: lock.c:58 __dump_backtrace: /lib/i386-linux-gnu/i686/cmov/libc.so.6(clone+0x5e) [0xb6fdbd0e]
> [2018-08-14 14:49:42.715134] ERROR[2696][C-000014f3]: lock.c:492 __ast_pthread_mutex_unlock: chan_sip.c line 18683 (get_refer_info): Error releasing mutex: Operation not permitted
> [2018-08-14 14:49:42.715276] ERROR[16109][C-000014f3]: lock.c:461 __ast_pthread_mutex_unlock: channel.c line 3882 (__ast_read): mutex 'chan' freed more times than we've locked!
> {code}
> I believe the fix is at line 18683 of chan_sip where ast_channel_unlock(peer) is called where it should be ast_channel_unref(peer).



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list