[asterisk-bugs] [JIRA] (ASTERISK-25776) lock-order-inversion (potential deadlock) when loading app_queue

Corey Farrell (JIRA) noreply at issues.asterisk.org
Fri Feb 12 10:08:33 CST 2016


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

Corey Farrell commented on ASTERISK-25776:
------------------------------------------

This looks like a duplicate of ASTERISK-25780?

> lock-order-inversion (potential deadlock) when loading app_queue
> ----------------------------------------------------------------
>
>                 Key: ASTERISK-25776
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25776
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.7.2
>            Reporter: Badalian Vyacheslav
>
> {code}
>   == Manager registered action QueueMemberRingInUse
>   == Manager registered action QueueRule
>   == Manager registered action QueueReload
>   == Manager registered action QueueReset
>   == Registered custom function 'QUEUE_VARIABLES'
>   == Registered custom function 'QUEUE_EXISTS'
>   == Registered custom function 'QUEUE_MEMBER'
>   == Registered custom function 'QUEUE_MEMBER_COUNT'
>   == Registered custom function 'QUEUE_MEMBER_LIST'
>   == Registered custom function 'QUEUE_GET_CHANNEL'
>   == Registered custom function 'QUEUE_WAITING_COUNT'
>   == Registered custom function 'QUEUE_MEMBER_PENALTY'
> ==================
> WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=4962)
>   Cycle in lock order graph: M321986 (0x7d280016ec20) => M1076 (0x7d640004bf00) => M1075 (0x7d280007cf60) => M321986
>   Mutex M1076 acquired here while holding mutex M321986 in main thread:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 __ao2_lock /root/asterisk/main/astobj2.c:200 (asterisk+0x0000002d78be)
>     #3 stasis_topic_pool_get_topic /root/asterisk/main/stasis.c:1140 (asterisk+0x00000063a9b8)
>     #4 ast_device_state_topic /root/asterisk/main/devicestate.c:710 (asterisk+0x0000004524e6)
>     #5 device_state_aggregate_publish /root/asterisk/main/devicestate.c:805 (asterisk+0x000000452976)
>     #6 caching_topic_exec /root/asterisk/main/stasis_cache.c:853 (asterisk+0x00000064b702)
>     #7 subscription_invoke /root/asterisk/main/stasis.c:433 (asterisk+0x000000635f0d)
>     #8 dispatch_message /root/asterisk/main/stasis.c:754 (asterisk+0x000000637e86)
>     #9 publish_msg /root/asterisk/main/stasis.c:822 (asterisk+0x00000063838f)
>     #10 stasis_publish /root/asterisk/main/stasis.c:830 (asterisk+0x00000063846e)
>     #11 ast_publish_device_state_full /root/asterisk/main/devicestate.c:766 (asterisk+0x00000045279e)
>     #12 ast_devstate_changed_literal /root/asterisk/main/devicestate.c:500 (asterisk+0x00000045139c)
>     #13 ast_devstate_changed /root/asterisk/main/devicestate.c:532 (asterisk+0x0000004516f2)
>     #14 init_queue /root/asterisk/apps/app_queue.c:2677 (app_queue.so+0x000000037e97)
>     #15 reload_single_queue /root/asterisk/apps/app_queue.c:9011 (app_queue.so+0x0000000734e1)
>     #16 reload_queues /root/asterisk/apps/app_queue.c:9142 (app_queue.so+0x00000007436f)
>     #17 reload_handler /root/asterisk/apps/app_queue.c:9208 (app_queue.so+0x000000074822)
>     #18 load_module /root/asterisk/apps/app_queue.c:10963 (app_queue.so+0x000000082025)
>     #19 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #20 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #21 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #22 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #23 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Mutex M321986 previously acquired by the same thread here:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 __ao2_lock /root/asterisk/main/astobj2.c:200 (asterisk+0x0000002d78be)
>     #3 publish_msg /root/asterisk/main/stasis.c:816 (asterisk+0x0000006382df)
>     #4 stasis_publish /root/asterisk/main/stasis.c:830 (asterisk+0x00000063846e)
>     #5 ast_publish_device_state_full /root/asterisk/main/devicestate.c:766 (asterisk+0x00000045279e)
>     #6 ast_devstate_changed_literal /root/asterisk/main/devicestate.c:500 (asterisk+0x00000045139c)
>     #7 ast_devstate_changed /root/asterisk/main/devicestate.c:532 (asterisk+0x0000004516f2)
>     #8 init_queue /root/asterisk/apps/app_queue.c:2677 (app_queue.so+0x000000037e97)
>     #9 reload_single_queue /root/asterisk/apps/app_queue.c:9011 (app_queue.so+0x0000000734e1)
>     #10 reload_queues /root/asterisk/apps/app_queue.c:9142 (app_queue.so+0x00000007436f)
>     #11 reload_handler /root/asterisk/apps/app_queue.c:9208 (app_queue.so+0x000000074822)
>     #12 load_module /root/asterisk/apps/app_queue.c:10963 (app_queue.so+0x000000082025)
>     #13 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #14 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #15 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #16 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #17 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Mutex M1075 acquired here while holding mutex M1076 in main thread:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 __ao2_lock /root/asterisk/main/astobj2.c:200 (asterisk+0x0000002d78be)
>     #3 stasis_forward_all /root/asterisk/main/stasis.c:919 (asterisk+0x000000638f4b)
>     #4 stasis_topic_pool_get_topic /root/asterisk/main/stasis.c:1157 (asterisk+0x00000063ac4f)
>     #5 ast_device_state_topic /root/asterisk/main/devicestate.c:710 (asterisk+0x0000004524e6)
>     #6 ast_publish_device_state_full /root/asterisk/main/devicestate.c:761 (asterisk+0x00000045276d)
>     #7 ast_devstate_changed_literal /root/asterisk/main/devicestate.c:500 (asterisk+0x00000045139c)
>     #8 ast_devstate_changed /root/asterisk/main/devicestate.c:532 (asterisk+0x0000004516f2)
>     #9 init_queue /root/asterisk/apps/app_queue.c:2677 (app_queue.so+0x000000037e97)
>     #10 reload_single_queue /root/asterisk/apps/app_queue.c:9011 (app_queue.so+0x0000000734e1)
>     #11 reload_queues /root/asterisk/apps/app_queue.c:9142 (app_queue.so+0x00000007436f)
>     #12 reload_handler /root/asterisk/apps/app_queue.c:9208 (app_queue.so+0x000000074822)
>     #13 load_module /root/asterisk/apps/app_queue.c:10963 (app_queue.so+0x000000082025)
>     #14 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #15 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #16 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #17 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #18 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Mutex M1076 previously acquired by the same thread here:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 __ao2_lock /root/asterisk/main/astobj2.c:200 (asterisk+0x0000002d78be)
>     #3 stasis_topic_pool_get_topic /root/asterisk/main/stasis.c:1140 (asterisk+0x00000063a9b8)
>     #4 ast_device_state_topic /root/asterisk/main/devicestate.c:710 (asterisk+0x0000004524e6)
>     #5 ast_publish_device_state_full /root/asterisk/main/devicestate.c:761 (asterisk+0x00000045276d)
>     #6 ast_devstate_changed_literal /root/asterisk/main/devicestate.c:500 (asterisk+0x00000045139c)
>     #7 ast_devstate_changed /root/asterisk/main/devicestate.c:532 (asterisk+0x0000004516f2)
>     #8 init_queue /root/asterisk/apps/app_queue.c:2677 (app_queue.so+0x000000037e97)
>     #9 reload_single_queue /root/asterisk/apps/app_queue.c:9011 (app_queue.so+0x0000000734e1)
>     #10 reload_queues /root/asterisk/apps/app_queue.c:9142 (app_queue.so+0x00000007436f)
>     #11 reload_handler /root/asterisk/apps/app_queue.c:9208 (app_queue.so+0x000000074822)
>     #12 load_module /root/asterisk/apps/app_queue.c:10963 (app_queue.so+0x000000082025)
>     #13 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #14 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #15 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #16 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #17 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Mutex M321986 acquired here while holding mutex M1075 in main thread:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 __ao2_lock /root/asterisk/main/astobj2.c:200 (asterisk+0x0000002d78be)
>     #3 topic_add_subscription /root/asterisk/main/stasis.c:660 (asterisk+0x00000063716c)
>     #4 topic_add_subscription /root/asterisk/main/stasis.c:671 (asterisk+0x0000006375bf)
>     #5 internal_stasis_subscribe /root/asterisk/main/stasis.c:503 (asterisk+0x000000636532)
>     #6 stasis_subscribe /root/asterisk/main/stasis.c:517 (asterisk+0x000000636608)
>     #7 load_module /root/asterisk/apps/app_queue.c:11028 (app_queue.so+0x0000000826a6)
>     #8 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #9 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #10 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #11 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #12 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Mutex M1075 previously acquired by the same thread here:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 __ao2_lock /root/asterisk/main/astobj2.c:200 (asterisk+0x0000002d78be)
>     #3 topic_add_subscription /root/asterisk/main/stasis.c:660 (asterisk+0x00000063716c)
>     #4 internal_stasis_subscribe /root/asterisk/main/stasis.c:503 (asterisk+0x000000636532)
>     #5 stasis_subscribe /root/asterisk/main/stasis.c:517 (asterisk+0x000000636608)
>     #6 load_module /root/asterisk/apps/app_queue.c:11028 (app_queue.so+0x0000000826a6)
>     #7 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #8 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #9 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #10 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #11 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
> SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) ??:0 __interceptor_pthread_mutex_lock
> {code}



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



More information about the asterisk-bugs mailing list