Bug #5017
ffmpeg piped IPTV channels being kept running forever after fast zapping
0%
Description
Not sure if this is a bug or feature request.
I've noticed that when user is zapping quickly between IPTV channels than many executed processes are being kept in running state, even though user do not watch the channel anymore.
All channels are ffmpeg piped (container copy) through bash script and source is hls m3u8 stream (not hls variant), so the video/audio is shown almost instantly.
I can re-create this behavior simply by fast zapping via Kodi (htsp streaming profile) or via VLC (pass streaming profile).
Majority of the channels that were kept running, were those that have not been fully running before swapping to another channel.
Is this some kind of known bug? I did not see this behavior cca 100 versions in the past (HTS 4.3-1066).
How can I perhaps debug this in order to fully understand what is going on? Perhaps it is issue with ffmpeg or Ubuntu 16.04.
Is there a setting that can somehow limit channel zapping rate per second?
Stop and following restart of the tvheadend kills all of those dead processes.
Am I the only one with this issue?
History
Updated by Jaroslav Kysela over 6 years ago
Do you see the 'dead' subscriptions in the status tabs (tvh)?
Updated by kodiaq kodiaq over 6 years ago
Nope, tvh status tab doesn't show 'dead' subscriptions.
Only under 'Running processes' in Ubuntu I can see those 'dead' subscriptions with connection status 'CLOSE_WAIT' and 0% CPU load.
For example: 10079 0.0 % 13:30 pipe:///usr/bin/ffmpeg -loglevel fatal -i https://ip:8554/live_710.m3u8?key=111 -map 0 -c copy -f mpegts pipe:1
So in terms of system load it is not big deal, but at the end of the day there may be so many 'dead' subscriptions that Ubuntu refuse to start new pipe scripts and tvh shows following error in the tvheadend log: "[ ERROR]:iptv: Unable to start pipe 'pipe:///home/hts/.hts/tvheadend/scripts/script.sh 446 2 Warner_Channel' (wrong executable?)"
Updated by kodiaq kodiaq over 6 years ago
I can not re-create this issue anymore in HTS Tvheadend 4.3-1171~g20e3cb8.
Tried fast zapping with Kodi and VLC. Seen no more 'dead' instances in the background.
Great work!
I will keep an eye on it anyway.