| 1 |
# Thread Sanitizer suppressions for PJSIP |
| 2 |
# Add suppressions here if needed when TSan detects false positives |
| 3 |
# |
| 4 |
# Disable data race warnings as most are by design or harmless |
| 5 |
# Focus on deadlock reports only (e.g., lock-order-inversion) |
| 6 |
race:* |
| 7 |
|
| 8 |
#============================================================================= |
| 9 |
# Lock-order-inversion between sip dialog and sip transaction |
| 10 |
# Check https://github.com/pjsip/pjproject/pull/4755 for more details |
| 11 |
|
| 12 |
# Example stack trace: |
| 13 |
# Mutex M1 acquired here while holding mutex M0 in thread T2: |
| 14 |
#4 pj_grp_lock_acquire ../src/pj/lock.c:486 |
| 15 |
#5 pjsip_tsx_set_transport ../src/pjsip/sip_transaction.c:1841 |
| 16 |
#6 pjsip_dlg_send_request ../src/pjsip/sip_dialog.c:1384 |
| 17 |
#7 pjsip_inv_send_msg ../src/pjsip-ua/sip_inv.c:3825 |
| 18 |
|
| 19 |
# Mutex M0 acquired here while holding mutex M1 in thread T2: |
| 20 |
#4 pj_grp_lock_acquire ../src/pj/lock.c:486 |
| 21 |
#5 pjsip_dlg_inc_lock ../src/pjsip/sip_dialog.c:965 |
| 22 |
#6 pjsip_inv_create_ack ../src/pjsip-ua/sip_inv.c:3732 |
| 23 |
#7 inv_send_ack ../src/pjsip-ua/sip_inv.c:583 |
| 24 |
#8 inv_on_state_early ../src/pjsip-ua/sip_inv.c:5217 |
| 25 |
#9 mod_inv_on_tsx_state ../src/pjsip-ua/sip_inv.c:859 |
| 26 |
#10 pjsip_dlg_on_tsx_state ../src/pjsip/sip_dialog.c:2249 |
| 27 |
#11 mod_ua_on_tsx_state ../src/pjsip/sip_ua_layer.c:186 |
| 28 |
#12 tsx_set_state ../src/pjsip/sip_transaction.c:1460 |
| 29 |
#13 tsx_on_state_proceeding_uac ../src/pjsip/sip_transaction.c:3404 |
| 30 |
#14 pjsip_tsx_recv_msg ../src/pjsip/sip_transaction.c:2061 |
| 31 |
|
| 32 |
# Disabled as lock chain mechanism has been implemented |
| 33 |
# deadlock:pjsip_dlg_on_tsx_state |
| 34 |
|
| 35 |
#============================================================================= |
| 36 |
# Lock-order-inversion in pjsip_endpoint |
| 37 |
# Example stack trace: |
| 38 |
# Mutex of pjsip_endpoint acquired here while holding mutex of pjsip_tsx: |
| 39 |
#1 pj_rwmutex_lock_read ../src/pj/os_core_unix.c:1830 |
| 40 |
#2 endpt_on_tx_msg ../src/pjsip/sip_endpoint.c:1114 |
| 41 |
#3 pjsip_transport_send ../src/pjsip/sip_transport.c:1010 |
| 42 |
#4 stateless_send_transport_cb ../src/pjsip/sip_util.c:1305 |
| 43 |
#5 stateless_send_resolver_callback ../src/pjsip/sip_util.c:1444 |
| 44 |
#6 pjsip_resolve ../src/pjsip/sip_resolve.c:399 |
| 45 |
#7 pjsip_endpt_resolve ../src/pjsip/sip_endpoint.c:1205 |
| 46 |
#8 pjsip_endpt_send_request_stateless ../src/pjsip/sip_util.c:1513 |
| 47 |
#9 tsx_send_msg ../src/pjsip/sip_transaction.c:2597 |
| 48 |
#10 tsx_on_state_null ../src/pjsip/sip_transaction.c:2869 |
| 49 |
#11 pjsip_tsx_send_msg ../src/pjsip/sip_transaction.c:2021 |
| 50 |
# |
| 51 |
# Mutex of pjsip_tsx acquired here while holding mutex of pjsip_endpoint: |
| 52 |
#4 pj_grp_lock_acquire ../src/pj/lock.c:486 |
| 53 |
#5 pjsip_tsx_recv_msg ../src/pjsip/sip_transaction.c:2058 |
| 54 |
#6 mod_tsx_layer_on_rx_response ../src/pjsip/sip_transaction.c:1044 |
| 55 |
#7 pjsip_endpt_process_rx_data ../src/pjsip/sip_endpoint.c:975 |
| 56 |
#8 endpt_on_rx_msg ../src/pjsip/sip_endpoint.c:1119 |
| 57 |
#9 pjsip_tpmgr_receive_packet ../src/pjsip/sip_transport.c:2465 |
| 58 |
# |
| 59 |
# Note that this is actually safe since pjsip_endpt_process_rx_data() and |
| 60 |
# endpt_on_tx_msg() use a read lock. If you want to avoid the warning, |
| 61 |
# app can register all modules first by calling pjsip_endpt_register_module() |
| 62 |
# during startup, before calling pjsip_endpt_handle_events(). Alternatively, |
| 63 |
# you can enable the suppression below. |
| 64 |
# |
| 65 |
# deadlock:pj_rwmutex_lock_read |
| 66 |
# |
| 67 |
# Note that you shouldn't use deadlock:endpt_on_tx_msg or |
| 68 |
# deadlock:endpt_on_rx_msg as this will basically filter all message |
| 69 |
# processing threads, and may potentially suppress genuine deadlock issue. |
| 70 |
#============================================================================= |
| 71 |
|
| 72 |
#============================================================================= |
| 73 |
# Lock-order-inversion inside libdbus (used by SDL2 on Linux) |
| 74 |
# This is not a PJSIP bug. TSan detects a potential deadlock between two |
| 75 |
# internal dbus mutexes acquired in the SDL video device worker thread |
| 76 |
# (job_thread in sdl_dev.c), triggered during pjsua video subsystem init. |
| 77 |
# |
| 78 |
# Example stack trace: |
| 79 |
# Mutex M1 acquired here while holding mutex M0 in thread T2: |
| 80 |
# #0 pthread_mutex_lock (libtsan.so.2) |
| 81 |
# #1 <null> (libdbus-1.so.3) |
| 82 |
# #2 job_thread ../src/pjmedia-videodev/sdl_dev.c |
| 83 |
# |
| 84 |
# Mutex M0 acquired here while holding mutex M1 in thread T2: |
| 85 |
# #0 pthread_mutex_lock (libtsan.so.2) |
| 86 |
# #1 <null> (libdbus-1.so.3) |
| 87 |
# #2 job_thread ../src/pjmedia-videodev/sdl_dev.c |
| 88 |
deadlock:libdbus |
| 89 |
#============================================================================= |