Bug 20954 - VLC crashes on start with segmentation fault; also while running vlc-cache-gen
Summary: VLC crashes on start with segmentation fault; also while running vlc-cache-gen
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: x86_64 Linux
Priority: High major
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard:
Keywords:
: 21005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-27 09:37 CEST by man draker
Modified: 2018-09-20 08:28 CEST (History)
6 users (show)

See Also:
Source RPM: vlc-2.2.5.1-1.mga5.tainted
CVE:
Status comment:


Attachments

Description man draker 2017-05-27 09:37:09 CEST
Description of problem:
When started, VLC crashes with "Speicherzugriffsfehler"

Version-Release number of selected component (if applicable):


How reproducible:
Start vlc

Steps to Reproduce:
1.
2.
3.

$ vlc
VLC media player 2.2.5.1 Umbrella (revision 2.2.5.1-14-g05b653355c)
Speicherzugriffsfehler
Comment 1 man draker 2017-05-28 11:13:12 CEST
While deinstalling or installing VLC and its Plugins the following error-Message occurs:

vlc-plugin-pulse-2.2.5.1-1.mga5.tainted.x86_64.rpm von /var/cache/urpmi/rpms wird installiert                       
Vorbereiten …                    ###################################################################################
    17/17: vlc-plugin-pulse      ###################################################################################
/var/lib/rpm/filetriggers/vlc-generate-plugins-cache.script: Zeile 4: 19482 Speicherzugriffsfehler  /usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugins


While in a fresh installation in a VM, the problem does not occur, I'm not the only one, having this problem.

The Version 2.2.6 in Core-Testing does not solve this problem.
Rémi Verschelde 2017-05-28 11:16:24 CEST

CC: (none) => luigiwalser, pkg-bugs
Assignee: bugsquad => shlomif

Rémi Verschelde 2017-05-28 11:17:10 CEST

Summary: VLC crashes on start with "memory error" => VLC crashes on start with segmentation fault; also while running vlc-cache-gen

Rémi Verschelde 2017-05-28 11:17:19 CEST

Severity: normal => major
Priority: Normal => High

Angelo Naselli 2017-05-28 23:07:06 CEST

CC: (none) => anaselli

Comment 2 David Walser 2017-05-29 05:33:47 CEST
You're not the only one who's seen this, but it also doesn't affect everyone; most of us have not been able to reproduce it.  Unfortunately it's very difficult to debug as well, as another user reported that running vlc or vlc-cache-gen under strace or gdb (which would be useful to debug it) *doesn't* result in the crash.  Usually when something like that happens, it's a minor memory access violation.  Perhaps running it under valgrind would help reveal the exact bug.
Comment 3 Angelo Naselli 2017-05-29 22:33:56 CEST
By using valgrind, it starts.

I run vlc with -vvv option and i had 
 core libvlc warning: cannot read /usr/lib64/vlc/plugins/plugins.dat: No such file or director

So i decided to install again vlc-plugin-common and got:
LC_ALL=C urpmi --replacepkgs vlc-plugin-common-2.2.6-1.mga5.tainted
 
 
    $MIRRORLIST: media/tainted/updates/vlc-plugin-common-2.2.6-1.mga5.tainted.x86_64.rpm
installing vlc-plugin-common-2.2.6-1.mga5.tainted.x86_64.rpm from /var/cache/urpmi/rpms                                                            
Preparing...                     ################################################################################
      1/1: vlc-plugin-common     #################################################################################
/var/lib/rpm/filetriggers/vlc-generate-plugins-cache.script: line 4: 11709 Segmentation fault      /usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugin

Then I run valgrind on teh above command:
valgrind /usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugins
==11819== Memcheck, a memory error detector
==11819== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==11819== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==11819== Command: /usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugins
==11819== 
==11819== 
==11819== HEAP SUMMARY:
==11819==     in use at exit: 162,407 bytes in 492 blocks
==11819==   total heap usage: 45,053 allocs, 44,561 frees, 2,392,752,499 bytes allocated
==11819== 
==11819== LEAK SUMMARY:
==11819==    definitely lost: 8,256 bytes in 4 blocks
==11819==    indirectly lost: 33,024 bytes in 16 blocks
==11819==      possibly lost: 4,676 bytes in 83 blocks
==11819==    still reachable: 116,451 bytes in 389 blocks
==11819==         suppressed: 0 bytes in 0 blocks
==11819== Rerun with --leak-check=full to see details of leaked memory
==11819== 
==11819== For counts of detected and suppressed errors, rerun with: -v
==11819== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[root@localhost ~]# ll /usr/lib64/vlc/plugins/plugins.dat
-rw-r--r-- 1 root root 253091 mag 29 22:26 /usr/lib64/vlc/plugins/plugins.dat

Now vlc works again.
Comment 4 Angelo Naselli 2017-05-29 22:35:20 CEST
and digikam works again, too
Comment 5 David Walser 2017-05-30 00:59:57 CEST
Angelo, I saw your comment on IRC.

plugins.dat should *not* be packaged as it needs to be generated (by vlc-cache-gen) on your machine based on the plugins you have installed.  If you can get vlc-cache-gen to run successfully, which it seems to through strace/gdb/valgrind, then you'll have a correct plugins.dat and will not have the crashes.  We have the correct filetriggers to create and update the plugins.dat file, but if vlc-cache-gen crashes when you try to create it, there's a chicken and egg issue.  This is going to need an upstream report if it's going to go any farther, and the valgrind output will hopefully be helpful.
Comment 6 Rémi Verschelde 2017-06-02 09:57:53 CEST
*** Bug 21005 has been marked as a duplicate of this bug. ***

CC: (none) => jim

Comment 7 Florian Hubold 2017-06-18 22:05:20 CEST
Has someone uploaded a stacktrace of the vlc-cache-gen segfault upstream?

From what I've seen this happens on many distributions, although for pretty different reasons:

- linker flags, and also some calls to kwallet ?
https://www.linuxquestions.org/questions/slackware-14/vlc-cache-gen-segfaults-4175579740/
- intel microcode bug
https://www.reddit.com/r/archlinux/comments/33laqv/segmentation_fault_in_vlccachegen_after_updating/

CC: (none) => doktor5000

Comment 8 David Walser 2017-06-18 23:21:03 CEST
The latter may help explain why this is so hard to reproduce and debug.
Comment 9 David Walser 2017-06-18 23:22:12 CEST
As far as a stacktrace, one of the challenges to this is that the crash doesn't happen under gdb, which is why I suggested valgrind earlier (Angelo tried that; I'm not sure if it shows anything interesting).
Comment 10 Angelo Naselli 2017-06-19 11:43:29 CEST
using valgrind -as well as gdb or strace- it starts, so we don't have any crashes.

And that's why running:
valgrind /usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugins

and that rebuilds /usr/lib64/vlc/plugins/plugins.dat, so after it starts
Comment 11 Marja Van Waes 2018-09-20 08:28:43 CEST
Hi all,

This bug was filed against Mageia 5 and if I searched correctly, then there are no Mageia 6 or later duplicates.

Please reopen this report and adjust its Version: if it's still valid in 6 and/or later.

Closing as OLD, because Mageia 5 is no longer supported

CC: (none) => marja11
Resolution: (none) => OLD
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.