[Home]

Summary:ASTERISK-25762: TSAN: Data race json unref
Reporter:Badalian Vyacheslav (slavon)Labels:
Date Opened:2016-02-09 18:27:28.000-0600Date Closed:2016-02-09 19:23:55.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:11.13.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:{code}
==================
WARNING: ThreadSanitizer: data race (pid=22242)
 Write of size 8 at 0x7d24002e70c0 by thread T21:
   #0 free <null> (libtsan.so.0+0x000000025da9)
   #1 json_mem_free /root/asterisk-13.7.0/main/json.c:69 (asterisk+0x0000004d0852)
   #2 ast_json_unref /root/asterisk-13.7.0/main/json.c:235 (asterisk+0x0000004d0ec2)
   #3 json_payload_destructor /root/asterisk-13.7.0/main/json.c:801 (asterisk+0x0000004d30f5)
   #4 internal_ao2_ref /root/asterisk-13.7.0/main/astobj2.c:445 (asterisk+0x0000002cb653)
   #5 __ao2_ref /root/asterisk-13.7.0/main/astobj2.c:516 (asterisk+0x0000002cba40)
   #6 __ao2_cleanup /root/asterisk-13.7.0/main/astobj2.c:529 (asterisk+0x0000002cbadc)
   #7 stasis_message_dtor /root/asterisk-13.7.0/main/stasis_message.c:107 (asterisk+0x00000062a4e5)
   #8 internal_ao2_ref /root/asterisk-13.7.0/main/astobj2.c:445 (asterisk+0x0000002cb653)
   #9 __ao2_ref /root/asterisk-13.7.0/main/astobj2.c:516 (asterisk+0x0000002cba40)
   #10 __ao2_cleanup /root/asterisk-13.7.0/main/astobj2.c:529 (asterisk+0x0000002cbadc)
   #11 dispatch_exec_async /root/asterisk-13.7.0/main/stasis.c:696 (asterisk+0x000000604362)
   #12 ast_taskprocessor_execute /root/asterisk-13.7.0/main/taskprocessor.c:782 (asterisk+0x000000648e9b)
   #13 default_tps_processing_function /root/asterisk-13.7.0/main/taskprocessor.c:183 (asterisk+0x00000064549d)
   #14 dummy_start /root/asterisk-13.7.0/main/utils.c:1237 (asterisk+0x00000067e255)
   #15 <null> <null> (libtsan.so.0+0x000000023659)

 Previous write of size 8 at 0x7d24002e70c0 by main thread (mutexes: write M1374579904853471352):
   #0 json_decref /usr/include/jansson.h:106 (asterisk+0x0000004d0766)
   #1 ast_json_unref /root/asterisk-13.7.0/main/json.c:224 (asterisk+0x0000004d0e89)
   #2 really_quit /root/asterisk-13.7.0/main/asterisk.c:2096 (asterisk+0x0000002bb3b0)
   #3 quit_handler /root/asterisk-13.7.0/main/asterisk.c:1929 (asterisk+0x0000002baac5)
   #4 asterisk_daemon /root/asterisk-13.7.0/main/asterisk.c:4738 (asterisk+0x0000002ca84a)
   #5 main /root/asterisk-13.7.0/main/asterisk.c:4282 (asterisk+0x0000002c93ad)

 Mutex M1374579904853471352 is already destroyed.

 Thread T21 (tid=22744, running) created by main thread at:
   #0 pthread_create <null> (libtsan.so.0+0x000000027b07)
   #1 ast_pthread_create_stack /root/asterisk-13.7.0/main/utils.c:1290 (asterisk+0x00000067e69e)
   #2 default_listener_start /root/asterisk-13.7.0/main/taskprocessor.c:200 (asterisk+0x0000006455f8)
   #3 __allocate_taskprocessor /root/asterisk-13.7.0/main/taskprocessor.c:611 (asterisk+0x000000648086)
   #4 ast_taskprocessor_get /root/asterisk-13.7.0/main/taskprocessor.c:657 (asterisk+0x000000648273)
   #5 internal_stasis_subscribe /root/asterisk-13.7.0/main/stasis.c:479 (asterisk+0x000000602b22)
   #6 stasis_subscribe /root/asterisk-13.7.0/main/stasis.c:510 (asterisk+0x000000602e1b)
   #7 stasis_message_router_create_internal /root/asterisk-13.7.0/main/stasis_message_router.c:230 (asterisk+0x00000062c40b)
   #8 stasis_message_router_create /root/asterisk-13.7.0/main/stasis_message_router.c:243 (asterisk+0x00000062c505)
   #9 manager_subscriptions_init /root/asterisk-13.7.0/main/manager.c:8512 (asterisk+0x00000051c976)
   #10 subscribe_all /root/asterisk-13.7.0/main/manager.c:8531 (asterisk+0x00000051ca44)
   #11 __init_manager /root/asterisk-13.7.0/main/manager.c:8788 (asterisk+0x00000051e4fb)
   #12 init_manager /root/asterisk-13.7.0/main/manager.c:9084 (asterisk+0x000000520a3c)
   #13 asterisk_daemon /root/asterisk-13.7.0/main/asterisk.c:4656 (asterisk+0x0000002ca324)
   #14 main /root/asterisk-13.7.0/main/asterisk.c:4282 (asterisk+0x0000002c93ad)

SUMMARY: ThreadSanitizer: data race ??:0 free
==================

{code}
Comments:By: Asterisk Team (asteriskteam) 2016-02-09 18:27:29.402-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Badalian Vyacheslav (slavon) 2016-02-09 19:23:55.694-0600

ASTERISK-25765