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

Fix zombie ffmpeg processes #262

Merged
merged 1 commit into from
Oct 10, 2019
Merged

Fix zombie ffmpeg processes #262

merged 1 commit into from
Oct 10, 2019

Conversation

tmm1
Copy link
Contributor

@tmm1 tmm1 commented Oct 10, 2019

After (*exec.Cmd).Start() it is required to call (*exec.Cmd).Wait() to reap the process and prevent it from sticking around in the zombie state.

Without this fix, Telly running in Docker without an init process (which generally reaps zombies when child procs forget to) would pile up zombies indefinitely.

root     17910  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17911  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17912  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17913  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17914  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17915  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17916  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17917  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17918  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>
root     17919  0.0  0.0      0     0 ?        Z    06:59   0:00 [ffmpeg] <defunct>

@chazlarson chazlarson merged commit 9eb5e99 into tellytv:dev Oct 10, 2019
chazlarson added a commit to chazlarson/telly that referenced this pull request Jan 12, 2020
* Extend m3u.Track to return line number and raw line

* Checkpoint on internal overhaul of playlist/tracks/lineup/channels.

* FIll PlaylistsCount

* XMLTV/EPG parsing checkpoint

* XMLTV checkpoint

* Checkpoint before redoing Lineup

* Checkpoint again. Too much to list, all good things

* Minor fixes around logging, XMLTV and more

* Checkpoint on Schedules Direct before migrating to new repo

* Migrate to new repo

* Finish hooking in SD

* More Schedules Direct fixes

* Update README

* Update Gopkg.lock

* Fix XMLTV tests

* Fix example.xml path

* Update README.md

* Allow xmltv/example.xml into Git

* Add option to ignore-epg-icons under misc

* Only initialize Schedules Direct if configured. Fixes tellytv#149

* FAQs

Add remarks to address questions asked repeatedly on discord.

* Fixes for bad providers & gzip

* Temporary fix for artwork nil issues

* Change username/password replacement tokens

* Dont panic on empty tags

* Add Iris as a supported provider

* Lowercase tags

* Add Area51 as a provider

* Support including only specific channels

* Possibly fix some weird <new /> behavior

* Maybe fix TV shows for Plex?

* Cleanup .promu.yml, limit to certain platforms for crossbuild

* Update Gopkg.toml

* Bump version

* Fix for <new> XMLTV tag

* Improve logic around adding original-air-date

* Add CORS headers for Angular

* Add frontend

* Initial ffmpeg support

* Update Gopkg

* Telly ffmpeg image

* Add ffmpeg flag

* Add supported providers to comments

* Update readme

Add comments to config file example
Add ffmpeg notes
Expand Docker notes.

* Create ISSUE_TEMPLATE.md

* Delete ISSUE_TEMPLATE.md

* Add note that M3U can be a file path.

* Fix some spelling

* Update README.md

* Update README.md

* Note about pre-release status.

* Update README.md

* Clarify which sections are required

* Update README.md

* Update README.md

* Update routes.go

Remove the  "-bsf:v", "h264_mp4toannexb" to fix HEVC streams.

* Update to address minor bug in ffmpeg key handling

* Typo

* Minor fixes for breaking changes in go.schedulesdirect

* More fixes for SD

* Spelling fixes

* Update README.md

Specifically state not to change the magic provider names.

* Note on key fields for multiple instances

* Update .circleci/config.yml to use dep so that we stop having build breakage

* Note about IPTV-EPG field names

They don't make sense, but cest la vie.

* Update README.md

* Update README.md

* Fix XMLTV date parsing because Vaders doesnt know how to write dates properly

* Update README.md

Add a reference to specific version.

* Update Vaders URL

* Update README.md

* bump version to 1.1.0.5

* Add a log line in a situation that might indicate a missing config file.

* Add a couple more targets

* Build using the same mechanism as the makefile so the docker build has a version number
Remove redundant build

* Update README.md

* Update tnt.go

* hdhr device ids are alpha numeric

* remove HDHomerun prefix from friendly name

* Removed references to the late, lamented Vader Streams.

* set content type for ffmpeg stream

* remove unused ffmpeg option

-tune is an encoding option. when passing -codec copy,
no encoding is happening so that option is not used.

since there is no encoding or decoding happening, it is
incorrect to state that ffmpeg is transcoding.

* replace dep with go mod

* update dependencies

* fix test failure

* GOPATH not required anymore

* fix version number configuration to be compatible with go modules

* Bump version number to 1.1.0.6

* updated go.mod, go.sum

* Use standard crossbuild for docker build instead of spinning up a docker build container.

* Support multicast streams through udpxy in the custom provider (tellytv#238)

* m3uplus parser: support UDP streams.

* Allow customers using the custom provider to use udpxy as a multicast proxy.

* ensure that ffmpeg processes are reaped to prevent zombies (tellytv#262)

* Remove -re from ffmpeg command (tellytv#267)

Remove '-re' from ffmpeg command, was causing buffering/packet loss.  From the ffmpeg docs:

-re (input)

Read input at native frame rate. Mainly used to simulate a grab device, or live input stream (e.g. when reading from a file). Should not be used with actual grab devices or live input streams (where it can cause packet loss).

* Remove references to non-Custom providers.

* Add a few more filetypes to ignore.

* Issues tellytv#185, tellytv#265

* Trimmed build platforms

* tarballs require crossbuild

* bump version

Co-authored-by: Robbie Trencheny <me@robbiet.us>
Co-authored-by: Guy Spronck <guyspr@users.noreply.github.com>
Co-authored-by: EnorMOZ <13998170+EnorMOZ@users.noreply.github.com>
Co-authored-by: BillOatman <woatman@rochester.rr.com>
Co-authored-by: EinAuslander <44206660+EinAuslander@users.noreply.github.com>
Co-authored-by: Aman Gupta <aman@tmm1.net>
Co-authored-by: 5Ub-Z3r0 <1673590+5Ub-Z3r0@users.noreply.github.com>
Co-authored-by: iMx <17220013+iMiMx@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants