[asterisk-bugs] [JIRA] (ASTERISK-25783) data race in ast_begin_shutdown

Corey Farrell (JIRA) noreply at issues.asterisk.org
Fri Feb 12 11:01:32 CST 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Farrell updated ASTERISK-25783:
-------------------------------------

    Attachment: ASTERISK-25783.patch

> data race in ast_begin_shutdown
> -------------------------------
>
>                 Key: ASTERISK-25783
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25783
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.7.2
>         Environment: [root at vm-asterisk04t asterisk]# git branch -v
> * master a394865 Merge "Resources/res_phoneprov: fix memory leak and heap-use-after-free"
>            Reporter: Badalian Vyacheslav
>            Severity: Minor
>         Attachments: ASTERISK-25783.patch
>
>
> {code}
> ==================
> WARNING: ThreadSanitizer: data race (pid=16961)
>   Write of size 4 at 0x7fb30a8dd064 by main thread (mutexes: write M344395):
>     #0 ast_begin_shutdown /root/asterisk/main/asterisk.c:1819 (asterisk+0x0000002c7343)
>     #1 can_safely_quit /root/asterisk/main/asterisk.c:1909 (asterisk+0x0000002c75ec)
>     #2 quit_handler /root/asterisk/main/asterisk.c:1829 (asterisk+0x0000002c73a7)
>     #3 handle_stop_now /root/asterisk/main/asterisk.c:2353 (asterisk+0x0000002c96b4)
>     #4 ast_cli_command_full /root/asterisk/main/cli.c:2717 (asterisk+0x0000004058fa)
>     #5 consolehandler /root/asterisk/main/asterisk.c:2230 (asterisk+0x0000002c8cca)
>     #6 asterisk_daemon /root/asterisk/main/asterisk.c:4743 (asterisk+0x0000002d7411)
>     #7 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Previous read of size 4 at 0x7fb30a8dd064 by thread T64 (mutexes: write M44123, write M45314756831139840):
>     #0 ast_shutting_down /root/asterisk/main/asterisk.c:1794 (asterisk+0x0000002c7214)
>     #1 <null> <null> (chan_sip.so+0x0000001ccc19)
>     #2 <null> <null> (chan_sip.so+0x0000001ec44f)
>     #3 <null> <null> (chan_sip.so+0x0000001edbfd)
>     #4 <null> <null> (chan_sip.so+0x0000001ed1c2)
>     #5 ast_io_wait /root/asterisk/main/io.c:292 (asterisk+0x0000004ece92)
>     #6 <null> <null> (chan_sip.so+0x0000001f2283)
>     #7 dummy_start /root/asterisk/main/utils.c:1232 (asterisk+0x0000006b6674)
>     #8 <null> <null> (libtsan.so.0+0x000000023659)
>   Location is global 'shutdown_pending' of size 4 at 0x7fb30a8dd064 (asterisk+0x000000cdc064)
>   Mutex M344395 (0x7fb30a609e00) created at:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 can_safely_quit /root/asterisk/main/asterisk.c:1884 (asterisk+0x0000002c74f5)
>     #3 quit_handler /root/asterisk/main/asterisk.c:1829 (asterisk+0x0000002c73a7)
>     #4 handle_stop_now /root/asterisk/main/asterisk.c:2353 (asterisk+0x0000002c96b4)
>     #5 ast_cli_command_full /root/asterisk/main/cli.c:2717 (asterisk+0x0000004058fa)
>     #6 consolehandler /root/asterisk/main/asterisk.c:2230 (asterisk+0x0000002c8cca)
>     #7 asterisk_daemon /root/asterisk/main/asterisk.c:4743 (asterisk+0x0000002d7411)
>     #8 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Mutex M44123 (0x7fb2f25c35a0) created at:
>     #0 pthread_mutex_lock <null> (libtsan.so.0+0x000000037816)
>     #1 __ast_pthread_mutex_lock /root/asterisk/main/lock.c:313 (asterisk+0x000000503d01)
>     #2 <null> <null> (chan_sip.so+0x000000232308)
>     #3 <null> <null> (chan_sip.so+0x00000023d1df)
>     #4 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #5 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #6 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #7 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #8 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
>   Mutex M45314756831139840 is already destroyed.
>   Thread T64 (tid=17506, 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 <null> <null> (chan_sip.so+0x0000001f25ec)
>     #3 <null> <null> (chan_sip.so+0x00000023dbb7)
>     #4 start_resource /root/asterisk/main/loader.c:1015 (asterisk+0x0000004ff12f)
>     #5 load_resource_list /root/asterisk/main/loader.c:1213 (asterisk+0x000000500c7c)
>     #6 load_modules /root/asterisk/main/loader.c:1366 (asterisk+0x000000501ade)
>     #7 asterisk_daemon /root/asterisk/main/asterisk.c:4659 (asterisk+0x0000002d6e5d)
>     #8 main /root/asterisk/main/asterisk.c:4230 (asterisk+0x0000002d5cfd)
> SUMMARY: ThreadSanitizer: data race /root/asterisk/main/asterisk.c:1819 ast_begin_shutdown
> ==================
> {code}



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



More information about the asterisk-bugs mailing list