Hi everyone,
(Note: English is not my native language; this post was translated from Spanish using Gemini).
We are experiencing repeated crashes/segfaults in Asterisk in our production environment. Looking into /var/log/syslog, the crashes consistently point to res_http_websocket.so (with a couple occurring directly in the main asterisk binary).
/var/log/syslog:2026-10-21T11:49:18.498429-05:00 voice-to-voice-colp-2-1 kernel: asterisk[4089069]: segfault at 140 ip 0000790e54c971d3 sp 0000790db3123ae0 error 4 in res_http_websocket.so[81d3,790e54c93000+6000] likely on CPU 2 (core 1, socket 0)
/var/log/syslog:2026-10-21T14:12:22.705790-05:00 voice-to-voice-colp-2-1 kernel: asterisk[926265]: segfault at 140 ip 00007669425001d3 sp 0000766920909ae0 error 4 in res_http_websocket.so[81d3,7669424fc000+6000] likely on CPU 7 (core 3, socket 0)
/var/log/syslog:2026-10-21T14:22:08.861611-05:00 voice-to-voice-colp-2-1 kernel: asterisk[2344807]: segfault at 140 ip 0000724a664b21d3 sp 0000724a4095cae0 error 4 in res_http_websocket.so[81d3,724a664ae000+6000] likely on CPU 8 (core 4, socket 0)
/var/log/syslog:2026-10-21T14:39:35.371434-05:00 voice-to-voice-colp-2-1 kernel: asterisk[2427667]: segfault at 140 ip 000078d21e13d1d3 sp 000078d21867fae0 error 4 in res_http_websocket.so[81d3,78d21e139000+6000] likely on CPU 2 (core 1, socket 0)
/var/log/syslog:2026-10-22T07:17:31.880429-05:00 voice-to-voice-colp-2-1 kernel: asterisk[1142448]: segfault at 140 ip 00007c493d2711d3 sp 00007c48d35dbae0 error 4 in res_http_websocket.so[81d3,7c493d26d000+6000] likely on CPU 20 (core 10, socket 0)
/var/log/syslog:2026-10-22T07:29:48.057449-05:00 voice-to-voice-colp-2-1 kernel: asterisk[1541414]: segfault at 140 ip 00007ef763b091d3 sp 00007ef716010ae0 error 4 in res_http_websocket.so[81d3,7ef763b05000+6000] likely on CPU 20 (core 10, socket 0)
/var/log/syslog:2026-10-22T07:59:20.355886-05:00 voice-to-voice-colp-2-1 kernel: asterisk[1687463]: segfault at 88 ip 0000630f10f2c7a5 sp 00007059a04fe650 error 4 in asterisk[13e7a5,630f10e35000+231000] likely on CPU 5 (core 2, socket 0)
/var/log/syslog:2026-10-22T08:17:34.642600-05:00 voice-to-voice-colp-2-1 kernel: asterisk[2228341]: segfault at 88 ip 00005d20c85d07a5 sp 00007ee74edb8650 error 4 in asterisk[13e7a5,5d20c84d9000+231000] likely on CPU 23 (core 11, socket 0)
/var/log/syslog:2026-10-22T08:26:03.120436-05:00 voice-to-voice-colp-2-1 kernel: asterisk[2514718]: segfault at 140 ip 000076b52b2b21d3 sp 000076b4e5746b00 error 4 in res_http_websocket.so[81d3,76b52b2ae000+6000] likely on CPU 22 (core 11, socket 0)
Key Observations
-
Most crashes occur at address offset
140withinres_http_websocket.so. -
Some secondary crashes happen at offset
88within the mainasteriskbinary. -
error 4indicates a user-space read attempt on unmapped/null memory (likely dereferencing a null or dangling pointer during WebSocket read/write/close operations). -
Our service handles real-time voice streaming / WebRTC connections over WebSockets.
Environment Details
-
Asterisk Version:
Asterisk 22.9.0 -
OS / Kernel: 6.17.0-1016-oracle
-
Distribution: 24.04.4 LTS (Noble Numbat)
Has anyone encountered this specific segfault in res_http_websocket.so recently? Any insights on whether this is a known race condition during connection teardown, or if there is a recommended patch/workaround?
I can provide GDB backtraces (bt and bt full) from the generated core dumps if needed.
Thank you for your help!