[asterisk-bugs] [JIRA] (ASTERISK-25774) Data race on deleting threads

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


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

Corey Farrell commented on ASTERISK-25774:
------------------------------------------

Your line numbers do not match 13 or 13.7.2.  Please tell me the exact revision these backtraces are based on.

> Data race on deleting threads
> -----------------------------
>
>                 Key: ASTERISK-25774
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25774
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.7.2
>            Reporter: Badalian Vyacheslav
>
> {code}
> *CLI> core stop now
> Beginning asterisk shutdown....
> Asterisk cleanly ending (0).
> Executing last minute cleanups
>   == Destroying musiconhold processes
>   == Manager unregistered action DBGet
>   == Manager unregistered action DBPut
>   == Manager unregistered action DBDel
>   == Manager unregistered action DBDelTree
> ==================
> WARNING: ThreadSanitizer: data race (pid=31057)
>   Read of size 8 at 0x7d0800035040 by thread T4:
>     #0 ast_unregister_thread /root/asterisk/main/asterisk.c:573 (asterisk+0x0000002bdcac)
>     #1 dummy_start /root/asterisk/main/utils.c:1230 (asterisk+0x0000006b6649)
>     #2 listener /root/asterisk/main/asterisk.c:1500 (asterisk+0x0000002c5070)
>     #3 dummy_start /root/asterisk/main/utils.c:1232 (asterisk+0x0000006b6674)
>     #4 <null> <null> (libtsan.so.0+0x000000023659)
>   Previous write of size 8 at 0x7d0800035040 by thread T11 (mutexes: write M52):
>     #0 ast_unregister_thread /root/asterisk/main/asterisk.c:575 (asterisk+0x0000002bdbc5)
>     #1 dummy_start /root/asterisk/main/utils.c:1234 (asterisk+0x0000006b6694)
>     #2 <null> <null> (libtsan.so.0+0x000000023659)
>   Location is heap block of size 32 at 0x7d0800035040 allocated by thread T13:
>     #0 calloc <null> (libtsan.so.0+0x000000025bed)
>     #1 _ast_calloc /root/asterisk/include/asterisk/utils.h:573 (asterisk+0x0000002bc5a0)
>     #2 ast_register_thread /root/asterisk/main/asterisk.c:554 (asterisk+0x0000002bd84f)
>     #3 dummy_start /root/asterisk/main/utils.c:1229 (asterisk+0x0000006b6607)
>     #4 <null> <null> (libtsan.so.0+0x000000023659)
>   Mutex M52 (0x7f0ab18d1bb0) created at:
>     #0 pthread_rwlock_wrlock <null> (libtsan.so.0+0x0000000293ad)
>     #1 __ast_rwlock_wrlock /root/asterisk/main/lock.c:1018 (asterisk+0x00000050420f)
>     #2 ast_register_thread /root/asterisk/main/asterisk.c:563 (asterisk+0x0000002bd953)
>     #3 dummy_start /root/asterisk/main/utils.c:1229 (asterisk+0x0000006b6607)
>     #4 <null> <null> (libtsan.so.0+0x000000023659)
>   Thread T4 (tid=31548, running) created by main thread at:
>     #0 pthread_create <null> (libtsan.so.0+0x000000027b07)
>     #1 ast_pthread_create_stack /root/asterisk/main/utils.c:1285 (asterisk+0x0000006b6abd)
>     #2 ast_makesocket /root/asterisk/main/asterisk.c:1601 (asterisk+0x0000002c6605)
>     #3 asterisk_daemon /root/asterisk/main/asterisk.c:4435 (asterisk+0x0000002d6661)
>     #4 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Thread T11 (tid=31555, finished) created by main thread at:
>     #0 pthread_create <null> (libtsan.so.0+0x000000027b07)
>     #1 ast_pthread_create_stack /root/asterisk/main/utils.c:1285 (asterisk+0x0000006b6abd)
>     #2 astdb_init /root/asterisk/main/db.c:1022 (asterisk+0x00000044fb3b)
>     #3 asterisk_daemon /root/asterisk/main/asterisk.c:4491 (asterisk+0x0000002d68ab)
>     #4 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Thread T13 (tid=31557, running) created by main thread at:
>     #0 pthread_create <null> (libtsan.so.0+0x000000027b07)
>     #1 ast_pthread_create_stack /root/asterisk/main/utils.c:1285 (asterisk+0x0000006b6abd)
>     #2 bridge_manager_create /root/asterisk/main/bridge.c:4695 (asterisk+0x0000003134a6)
>     #3 ast_bridging_init /root/asterisk/main/bridge.c:5331 (asterisk+0x00000031708c)
>     #4 asterisk_daemon /root/asterisk/main/asterisk.c:4519 (asterisk+0x0000002d698c)
>     #5 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
> SUMMARY: ThreadSanitizer: data race /root/asterisk/main/asterisk.c:573 ast_unregister_thread
> ==================
> {code}



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



More information about the asterisk-bugs mailing list