Closed ChristopherVR closed 9 months ago
I've been banging my head against this one. It happens in Linux too.
I'm not sure about the zombie processes, but the strange behavior with yt-dlp seems to be caused by its use of --Frag#
files when downloading. The two instances of yt-dlp try to use the same file and if the old one is still around when the new one starts to stream, you get the same song.
Yep I've also noticed that. Deleting the frag files before the new one starts to stream resolves the issue where you get the same song, but this has been quite frustrating trying to find the root cause.
It's disappointing seeing that zombie process issues have resurfaced; it's been one of those things that seems to crop up again at random long after you think it's dead (ha!). The current changes on next
were designed to solve this issue by doing away with long-lived subprocesses, but I appreciate it's a lot of work to convert to since it's tied to Serenity's next branch.
Yeah, we're facing a similar problem with zombie processes (NixOS).
While some processes are marked as zombies (by the OS), some ffmpeg streams are also marked as still running despite being not being used by songbird any longer
Closing as v0.4.x onwards no longer make use of ffmpeg or child processes for audio processing.
Songbird version: 0.3.1
Rust version (
rustc -V
): rustc 1.67.0 (fc594f156 2023-01-24)Serenity/Twilight version: serenity 0.11.5 (default features enabled)
Output of
ffmpeg -version
,yt-dlp --version
: ffmpeg version 5.1.2-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.1.0 (Rev2, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100Youtube-dl 2023.03.04 (build it myself from latest master)
Description:
I'm using a combination of serenity (slash commmands) and songbird voice receive examples but everytime I attempt to stop the handler youtube-dl and ffmpeg processes still persist. Attempting to receive audio and play music through discord yields in no sound being played if I use the play_source function for the second time. I've had cases where if I do try to play a different song it restarts the previous song?
Steps to reproduce:
My main.rs code:
My play command code: