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

Unresponsiveness with long songs #88

Closed
danrpinho opened this issue Jan 11, 2022 · 13 comments · Fixed by #165
Closed

Unresponsiveness with long songs #88

danrpinho opened this issue Jan 11, 2022 · 13 comments · Fixed by #165
Assignees
Labels
🐛 bug Something isn't working

Comments

@danrpinho
Copy link

Description

When playing long songs, such as radios or playlists (which usually run about an hour long), the bot suddenly stops playing audio and stops responding to commands.

Expected vs. Observed

- -
Expected The song plays until the end, and users can input commands.
Observed The audio playback stops (around the 30-minute mark) and the bot does not respond to commands.

Repro Steps

  1. !play a long video (for example, this one)
  2. Listen until the video ends
  3. Attempt to add commands later in the video's runtime

Environment

Key Value
Operating System Ubuntu 21.10 impish
Kernel x86_64 Linux 5.13.0-23-generic
CPU Intel Core i5-6500 @ 4x 3,6GHz [22.0°C]
RAM 7866MiB / 15893MiB
@afonsojramos
Copy link
Collaborator

I can confirm that this happens as well. I haven't had many occasions where I listened to long videos, however, everytime that I have, it has stalled at some point.

Ps: I think this is unrelated to the Windows bug that we've discovered the other day @aquelemiguel @joao-conde

@afonsojramos afonsojramos added the 🐛 bug Something isn't working label Jan 11, 2022
@aquelemiguel
Copy link
Owner

Thank you for the bug report, @danrpinho.

It just might, @afonsojramos, they seem too similar... 99.99% chance it's unrelated to our code however, given v0.2.0 is also failing now. Should most likely be some funky dependency on both issues. I'm still investigating this.

@afonsojramos
Copy link
Collaborator

The thing is that your case @aquelemiguel does not fail on Linux, and this one does. If it IS the same problem, it is much worse on Windows vs Linux.

@aquelemiguel
Copy link
Owner

It's the same issue, no? Only that on Windows it freezes after a minute or so and on Linux it's half an hour.

@rafaeldamasceno
Copy link
Contributor

rafaeldamasceno commented Jan 12, 2022

This issue is, sadly, a regression. 51a9937 is a good commit (and possibly the last, if you say v0.2.0 is now failing).

@joao-conde
Copy link
Collaborator

@rafaeldamasceno thanks for testing it <3 So you mean that commit works fine for you? Let us all test and double-check that. If that is confirmed, would that mean 2b7f635 to e1c0249 are the culprit? Let's test that as well.

@aquelemiguel
Copy link
Owner

aquelemiguel commented Jan 12, 2022

This issue is, sadly, a regression. 51a9937 is a good commit (and possibly the last, if you say v0.2.0 is now failing).

God's work, @rafaeldamasceno. 💖

@joao-conde I can also confirm 51a9937 is working on Windows and failing on 2b7f635 meaning that it was the transition from youtube-dl to yt-dlp. In order to get yt-dlp, we're getting the latest version of Songbird from their current branch:

# Cargo.toml
git = "https://github.com/serenity-rs/songbird"
branch = "current"
features = ["builtin-queue", "yt-dlp"]

@rafaeldamasceno
Copy link
Contributor

@rafaeldamasceno thanks for testing it <3 So you mean that commit works fine for you?

Yeah, the commit I mentioned works fine. This is the same machine/environment as reported by @danrpinho. I simply checked out that commit (since it was the last before the youtube-dl change), built parrot, restarted the service and have been listening to long songs for some time with no issue. When the current track is over, I can try e1c0249 again to see if the issue was already present there on Linux.

Also youtube-dl and yt-dlp versions might be relevant.

@joao-conde
Copy link
Collaborator

I believe this might be related to songbird and the latest version. To use yt-dlp we need to use songbird's current branch which likely has a bug. But if we revert to youtube-dl we won't be able to use !seek

@aquelemiguel
Copy link
Owner

Guys over at Serenity's Discord seem to have repro'd it.

image

@joao-conde
Copy link
Collaborator

Seems to be this will be an easy fix 😄 Let us wait for a Serenity patch release and see. Preferably we should stop depending on the current branch, so if they do make a release with the fix, we should swap to the version.

@afonsojramos
Copy link
Collaborator

Waiting it out it is then 🤓 Awesome, thanks for contacting them directly @aquelemiguel!

@aquelemiguel
Copy link
Owner

No fucking way, I think I got it.

@aquelemiguel aquelemiguel removed the 🚫 blocked This issue or pull request is blocked label Mar 4, 2022
@aquelemiguel aquelemiguel self-assigned this Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants