[asterisk-bugs] [JIRA] (ASTERISK-23605) res_http_websocket: Race condition in shutting down websocket causes crash
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Wed Apr 9 11:05:18 CDT 2014
Matt Jordan created ASTERISK-23605:
--------------------------------------
Summary: res_http_websocket: Race condition in shutting down websocket causes crash
Key: ASTERISK-23605
URL: https://issues.asterisk.org/jira/browse/ASTERISK-23605
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Resources/res_http_websocket
Affects Versions: 12.1.1
Reporter: Matt Jordan
Attachments: ws_backtrace.txt
Note that this crash would also most likely occur in Asterisk 11.
The crash occurs when a call to write to the websocket (via {{fwrite}}) is passed a NULL {{FILE *}}. We would typically only end up in that situation when we had previously shutdown the websocket and set {{session->f}} pointer to NULL.
The core file shows this being the case as well:
{noformat}
284 if (fwrite(frame, 1, header_size, session->f) != header_size) {
(gdb) p frame
$1 = <value optimized out>
(gdb) p session->f
$2 = (FILE *) 0x0
(gdb)
{noformat}
Backtrace is attached.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list