We run Asterisk 22.7.0 (Sangoma Debian package, FreePBX 17, Debian 12) with about 180 WebRTC agents over WSS. Agents blind-transfer callers to an external number over a PJSIP trunk using SIP REFER, about 2,000 to 5,000 a day. Transfer handling is the default (not ari-only).
Twice in 8 days (7 and 14 October) a REFER blind transfer triggered this, and the whole PBX stalled until we restarted Asterisk:
ERROR stasis.c: FRACK!, Failed assertion user_data is NULL (0)
# 2: __ao2_unlock+0x60
# 3: stasis_subscription_accept_message_type+0x20a
# 4: res_pjsip_refer.so(+0x72ee)
# 5: bridge_channel_internal_queue_blind_transfer+0xf0
# 6: ast_bridge_transfer_blind+0x4a9
# 7-22: res_pjsip_refer / res_pjsip_session / pjsip_dlg_on_rx_request
After the FRACK, no transfer or queue answer completes, bridged calls lose audio, stasis/p:manager:core-* task processors grow to about 30,000 and never drain, PJSIP stops handling REGISTERs and WebRTC agents drop. Asterisk does not crash; only a restart recovers it.
It looks like the race in issue #930 (the bridge:all topic lock left held). #1467 and #2166 look related but use ari-only transfer handling. It hits roughly 1 in 26,000 REFER transfers for us. DTMF (##) blind transfers have not triggered it, so as a workaround we are moving agents from REFER to ## blind transfers.
Questions:
1. Has anyone else seen this on Asterisk 22.x with core (non-ARI) transfer handling?
2. Is a fix known or in progress for this race?
3. Any other workaround besides avoiding REFER blind transfers?