Page 1 of 1

Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 29 Jan 2019 19:50
by roxx
Hi, VLC developers! My system is:

Ubuntu 16.04 32-bit with the standard Ubuntu repos, no third-party software installed
VLC 2.2.4
Video source to play: a local mp4/h264 file
How to reproduce the hang:

1. Open a local mp4/h264 file
2. Hit "Play" if it doesn't play automatically
3. Hit "Stop"
4. Repeat 2,3

I use QtPlayer and gtk_player from the VLC source code to test how libVLC works. My observation so far is that both demos hang in libvlc_media_player_stop() very often (see the testing steps above). The chance is around 2% that hitting the stop button hangs the application. Both the Qt and GTK demo applications hang in libvlc_media_player_stop(). Here is the stacktrace of the GTK application: https://pastebin.com/LQKfMFWJ

I also tried upgrading VLC to 2.2.8 with no luck. VLC 3.x cannot be compiled on Ubuntu 16.04 due to dependency errors. Any ideas? Thanks in advance!

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 29 Jan 2019 20:21
by algrev
Since you mentioned VLC 3.x, here is a possible way to install it:
1. Using VLC 3 under Ubuntu 16 or lower
To do this, make use of PPA.
sudo add-apt-repository ppa:jonathonf/vlc-3
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo add-apt-repository ppa:jonathonf/meson
sudo apt-get update && sudo apt-get install vlc
How to Restore:
You can revert back to stock version of VLC (2.2.2) in Ubuntu 16.04 by purging the PPA via command:
sudo apt-get install ppa-purge && sudo ppa-purge ppa:jonathonf/vlc-3
Also downgrade the FFmpeg libraries by purging the dependency PPA if you want:
sudo ppa-purge ppa:jonathonf/ffmpeg-4
Ref: http://ubuntuhandbook.org/index.php/201 ... 16-04-ppa/

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 29 Jan 2019 22:17
by Rémi Denis-Courmont
The trace only shows one thread, not enough to find where the problem is.

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 30 Jan 2019 11:52
by roxx
The trace only shows one thread, not enough to find where the problem is.
What can I provide to better understand the issue? I'll do my best to grab the required information per your recommendations.

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 30 Jan 2019 12:38
by roxx
algrev
Since you mentioned VLC 3.x, here is a possible way to install it:
1. Using VLC 3 under Ubuntu 16 or lower
To do this, make use of PPA.
Thanks for the recommendation. I installed VLC 3.x from the PPA. Unfortunately looks like it's not able to use HW acceleration for some reason. The error is:
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
[b2a1d1b0] vaapi generic error: profile(3) is not supported
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
[a632f650] avcodec decoder: Using OpenGL/VAAPI/libswscale backend for VDPAU for hardware decoding
[mpeg4 @ 0xa6318e80] Failed setup for format vdpau: hwaccel initialisation returned error.
[a632f650] avcodec decoder error: existing hardware acceleration cannot be reused

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 30 Jan 2019 13:36
by roxx
The trace only shows one thread, not enough to find where the problem is.
Meanwhile, here is the full stacktrace grabbed with "thread apply all bt": https://pastebin.com/yEJ1Mrxe

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 30 Jan 2019 19:32
by Rémi Denis-Courmont
The VLC timer code is locking up. Be sure to update to the latest VLC version.

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 01 Feb 2019 13:26
by Moriquendi
This was indeed an issue for VLC 2.2.8. It got fixed after VLC 3.0+ tho. (tested with 3.0.4)

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Posted: 15 Mar 2019 03:04
by roxx
I still see the issue with VLC 3.0.6 from http://ubuntuhandbook.org/index.php/201 ... 16-04-ppa/. The only solution is to remove libxdg_screensaver_plugin.so.