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 a race condition in the AudioLoader #125

Merged
merged 2 commits into from
Jul 20, 2018
Merged

Conversation

schnapster
Copy link
Contributor

@schnapster schnapster commented Jul 18, 2018

There are conflicts with the v3 branch. Not sure how we would update both branches with the fix (I can resolve them just not sure whether we merge this fix into both, or merge dev into v3 after this PR is merged)?

@schnapster schnapster mentioned this pull request Jul 18, 2018
4 tasks
@schnapster
Copy link
Contributor Author

schnapster commented Jul 18, 2018

I totally forgot to give some context:

The AudioLoader can lock up, when lavaplayer's loadItem returns (and therefore notifies) a result before the loadSync method has reached the line where it waits. The thread will then wait forever there.

Here's a stack of a waiting thread: https://wastebin.party/detatipocu.css
The issue can be easily reproduced after a few curls to the loadtracks endpoint by using identifiers/loaders that return very fast, like looking up a local audio file.

Copy link
Member

@freyacodes freyacodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@freyacodes freyacodes merged commit 371f272 into dev Jul 20, 2018
@schnapster schnapster deleted the fix/loader-race-condition branch July 20, 2018 10:08
@schnapster
Copy link
Contributor Author

v3 merge done in 0adc5c8

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.

None yet

2 participants