Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The source stream fails to be pulled via HTTP-FLV during the http_hooks_on_publish period, and subsequent stream pulls will continue to fail. #4182

Open
retamia opened this issue Sep 20, 2024 · 2 comments
Labels
EnglishNative This issue is conveyed exclusively in English.

Comments

@retamia
Copy link
Contributor

retamia commented Sep 20, 2024

Describe the bug

This occurs probabilistically. The source stream fails to be pulled via HTTP-FLV during the http_hooks_on_publish period, and subsequent stream pulls will continue to fail.

Version
release6.0

To Reproduce
Steps to reproduce the behavior:

  1. Add the code srs_usleep(2000 * SRS_UTIME_MILLISECONDS); to srs_error_t SrsRtmpConn::http_hooks_on_publish() to simulate a delay.
  2. Start streaming with OBS to rtmp://127.0.0.1:1935/live/test, then immediately run the following command in the terminal: ffprobe -rw_timeout 10000000 -i http://127.0.0.1:8080/live/test.flv.
  3. ffprobe will hang until it times out, and any subsequent executions of ffprobe will also time out, with all stream pulls failing.

Expected behavior
pull normally

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Sep 20, 2024
@retamia
Copy link
Contributor Author

retamia commented Sep 23, 2024

After reviewing the code, it seems that SrsLiveSourceManager::notify invokes SrsLiveSource::stream_is_dead to determine whether to remove an item from the map. When the on_publish callback has not yet returned, the can_publish_ state is true and stream_die_at_ is 0, which causes stream_is_dead() to return true, leading to the removal of the item from the map.

TRANS_BY_GPT4

@retamia
Copy link
Contributor Author

retamia commented Sep 23, 2024

@winlinvip

It's because this section of code was removed: #4097. After I restored this section, everything worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

No branches or pull requests

2 participants