You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phenomenon: In the SRS (Simple Real-time Streaming) system, when entering the stream_service_cycle to provide service, the client is first verified. When it is determined to be Identify_create_stream_client, it will enter the function to create a stream. However, when parsing the information sent by the client, if it is still about creating a stream, it will call Identify_create_stream_client again. If the client continuously sends requests to create a stream, it will recursively call Identify_create_stream_client, causing a loop and eventually causing a core dump.
Changes made: After receiving the message, the basic header, message header, and payload are parsed. Previously, when parsing the message header, a 31-bit timestamp was used in the timestamp section. According to the RTMP (Real-Time Messaging Protocol) protocol, the extended timestamp is an absolute timestamp when fmt=0, and it is a delta value when fmt=1 or 2. Referring to the ngx_rtmp_recv function in the ngx_rtmp_module, the original timestamp parsing logic was modified as follows: for fmt=0, the original absolute timestamp is maintained, and for fmt=1 or 2, the delta value is used. After the modification, the aforementioned core dump issue occurred. Currently, it is not certain whether modifying the timestamp caused the continuous occurrence of the create_stream problem. This is because the core dump may be caused by modifying the timestamp, or it may be due to abnormal behavior of the client, continuously sending requests to create a stream.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered:
winlinvip
changed the title
identify_create_stream_client出现无限递归导致栈爆掉出core现象
identify_create_stream_client' appears to have an infinite recursion, causing the stack to overflow and resulting in a core dump.
Jul 29, 2023
Phenomenon: In the SRS (Simple Real-time Streaming) system, when entering the
stream_service_cycle
to provide service, the client is first verified. When it is determined to beIdentify_create_stream_client
, it will enter the function to create a stream. However, when parsing the information sent by the client, if it is still about creating a stream, it will callIdentify_create_stream_client
again. If the client continuously sends requests to create a stream, it will recursively callIdentify_create_stream_client
, causing a loop and eventually causing a core dump.Changes made: After receiving the message, the basic header, message header, and payload are parsed. Previously, when parsing the message header, a 31-bit timestamp was used in the timestamp section. According to the RTMP (Real-Time Messaging Protocol) protocol, the extended timestamp is an absolute timestamp when
fmt=0
, and it is a delta value whenfmt=1
or2
. Referring to thengx_rtmp_recv
function in thengx_rtmp_module
, the original timestamp parsing logic was modified as follows: forfmt=0
, the original absolute timestamp is maintained, and forfmt=1
or2
, the delta value is used. After the modification, the aforementioned core dump issue occurred. Currently, it is not certain whether modifying the timestamp caused the continuous occurrence of thecreate_stream
problem. This is because the core dump may be caused by modifying the timestamp, or it may be due to abnormal behavior of the client, continuously sending requests to create a stream.TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: