Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

This forum is about all development around libVLC.
roxx
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Aug 2014 17:30

Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby roxx » 29 Jan 2019 19:50

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!

algrev
New Cone
New Cone
Posts: 5
Joined: 28 Jan 2019 21:56

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby algrev » 29 Jan 2019 20:21

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/

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby Rémi Denis-Courmont » 29 Jan 2019 22:17

The trace only shows one thread, not enough to find where the problem is.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

roxx
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Aug 2014 17:30

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby roxx » 30 Jan 2019 11:52

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.

roxx
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Aug 2014 17:30

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby roxx » 30 Jan 2019 12:38

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

roxx
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Aug 2014 17:30

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby roxx » 30 Jan 2019 13:36

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby Rémi Denis-Courmont » 30 Jan 2019 19:32

The VLC timer code is locking up. Be sure to update to the latest VLC version.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby Moriquendi » 01 Feb 2019 13:26

This was indeed an issue for VLC 2.2.8. It got fixed after VLC 3.0+ tho. (tested with 3.0.4)

roxx
Blank Cone
Blank Cone
Posts: 17
Joined: 26 Aug 2014 17:30

Re: Deadlock in libvlc_media_player_stop() | Ubuntu 16.04

Postby roxx » 15 Mar 2019 03:04

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests