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

Killing an ffmpeg process kills Streamer #20

Closed
joeyparrish opened this issue Oct 2, 2019 · 1 comment
Closed

Killing an ffmpeg process kills Streamer #20

joeyparrish opened this issue Oct 2, 2019 · 1 comment
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@joeyparrish
Copy link
Member

Killing an ffmpeg process currently kills Streamer instead of shutting down cleanly.

./shaka_streamer.py -i config_files/input_looped_file_config.yaml -p config_files/pipeline_live_config.yaml

Then pick an ffmpeg process from ps in Linux and kill it by PID.

The controller should see that a process died and shut down the pipeline by killing the others.

Instead, it dies and orphans the other subprocesses.

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Oct 2, 2019
@joeyparrish joeyparrish added this to the v1.0 milestone Oct 2, 2019
@TheModMaker
Copy link
Contributor

It looks like our assumptions of child processes was wrong. When we spawn a child process, that process doesn't get closed when we exit. If we want to kill the subprocesses, we need to explicitly kill them when we shut down. Otherwise the process will get orphaned and remain running.

Also note that currently, the killing isn't detected as an error and the streamer returns success. We are ignoring the return codes from the long-running processes and just stopping when one of the exits.

@TheModMaker TheModMaker self-assigned this Oct 3, 2019
shaka-bot pushed a commit that referenced this issue Oct 3, 2019
If we don't wait for the process to exit and read its exit code, the
process will become a zombie once we exit.  These can be cleaned up by
the OS, but it is better to read the exit code to avoid it becoming a
zombie.

Issue #20

Change-Id: I6b978eb76929f7dca203d5dd9cec7d5dc08be8df
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Dec 2, 2019
@shaka-project shaka-project locked and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants