-
Notifications
You must be signed in to change notification settings - Fork 68
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
Raciness in client handle termination leading to hang in Python main thread #47
Comments
I tested this exact script on an up-to-date debian sid against python-mpv v0.3.3 and libmpv 0.26.0-3 and it worked without any problems. I'd first try getting an up-to-date ffmpeg/libmpv. If that doesn't help try the following for extended logging and have a close look at the output: def my_log(loglevel, component, message):
print('[{}] {}: {}'.format(loglevel, component, message))
player = mpv.MPV(log_handler=my_log, loglevel='debug', af='lavfi=[acompressor]') If that still doesn't help raise an issue against upstream. Even if Here's what I'm running:
|
Bah. The PPA I'm using to get (Just Do you want to rename this to "Failure to initialize audio filter chain causes hang without a |
Could you tell me your libmpv version and post a script causing the hang? |
The snippet in the initial post is enough to cause the hang and I'm using the NOTE: The packager forgot to ensure the bare sudo ln -s /usr/lib/x86_64-linux-gnu/libmpv.so.1 /usr/lib/x86_64-linux-gnu/libmpv.so |
Ok, I still can't reproduce this. The pure presence of a This really sounds like a problem with libmpv. libmpv is changing quite rapidly (>1k commits since v0.22.0) so probably I can't reproduce your problem on v0.26.0 since it has already been solved. If you can work around this issue I think its not worth your time investigating it further since it's very likely already fixed in the current libmpv release. If you do wish to trace this further, get your hands on some debug symbols for your libmpv build and then get a close look at where it hangs using gdb (see this comment for some guidance). |
You're probably right but, since I was curious, here's the state of things when it's hung:
Thread 0x7ffff7fae740 (LWP 25088) "python3"
Thread 0x7fffde0cd700 (LWP 25095) "mpv/mpv core"
|
That's really interesting! That points towards some raciness in the cleanup of mpv handles. I will definitely look into that further when I have some time to spare. |
Just for information: I have the exact same behavior (arch linux, Not a big issue in my case, but I followed this thread, tried the proposed workarounds, and nothing changed, so I thought I might as well mention it 😊. |
I'm not in a position to be certain whether this is a python-mpv issue or a libmpv issue, but I thought it'd be better to have you close it than for you to never know.
This code cases the program to just sit there, doing nothing, while commenting out the
af
argument makes it work:The argument has been copy-pasted, verbatim except for the minor
af="..."
syntax change, from my.mpv/config
where it works without issue.The text was updated successfully, but these errors were encountered: