Replies: 4 comments
-
I think the fundamental reason for this issue is that the edge should not have HLS, or the HLS should be removed from the edge's source, or the edge should use a new object instead of the source, and the source should only be used for the origin server. |
Beta Was this translation helpful? Give feedback.
-
I still suggest submitting a PR to simply fix this issue in SRS2 and do a complete fix in SRS3. |
Beta Was this translation helpful? Give feedback.
-
@winlinvip Alright, I submitted a new PR: #1077 |
Beta Was this translation helpful? Give feedback.
-
Postpone to SRS4 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This issue refers to version 2.0.
Firstly, the edge source has the following two members:
The hls also has a member _req:
Next, there are two ways to fetch the edge source: pull and push.
When pulling the source, the edge source's hls is functionally identical to the origin source's hls, and it can slice normally. The hls _req is initialized in the source->on_publish call to hls->on_publish, and the assignment logic is to copy the request, as shown in the code snippet below:
At this point, both the source and its hls member have a valid _req member (the source's _req is initialized in its initialize method).
However, the situation is different when pushing to the edge.
When pushing to an edge, SrsRtmpConn::publishing calls acquire_publish, and if the current device is an edge, it will not call source->on_publish. As a result, the edge source's hls member's on_publish is not called, and the _req member of the edge source's hls member is empty.
An empty hls _req will cause a coredump. When source->dispose() calls hls->dispose, the SrsHls::dispose method will reference the empty _req, resulting in a coredump:
Most of the above logic is also mentioned in #1055, but that PR has issues, so it was closed.
Beta Was this translation helpful? Give feedback.
All reactions