Bug 492 - undefined symbol _nv022tls on libGL.so.1
: undefined symbol _nv022tls on libGL.so.1
Status: RESOLVED WORKSFORME
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Marathon
: All Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-06 19:00 MSD by jpereira@linkare.com
Modified: 2013-02-13 13:20 MSK (History)
1 user (show)

See Also:
RPM Package: vlc-2.0.1-2plf-plf2012.0.x86_64
ISO-related:
Bad POT generating:
Upstream:


Attachments
Strace on the crashing process (808.57 KB, text/plain)
2012-07-16 17:48 MSD, jpereira@linkare.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jpereira@linkare.com 2012-07-06 19:00:39 MSD
Description of problem:
When executing some operations inside VLC 2.0.1, such as trying to open a media file, the vlc interface blows up without any error shown on the interface.

Version-Release number of selected component (if applicable):
VLC media player 2.0.1 Twoflower (revision 2.0.1-0-gf432547)
vlc-2.0.1-2plf-plf2012.0.x86_64
x11-driver-video-nvidia-current-295.40-2-rosa.lts2012.0.x86_64

How reproducible:
allways reproducible 

Steps to Reproduce:
1. Open vlc from a command line
2. Access Menu "Media" -> "Open File..."
3. Vlc interface closes immediately
4. Error on the console shows:

VLC media player 2.0.1 Twoflower (revision 2.0.1-0-gf432547)
[0x1645048] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
vlc: symbol lookup error: /usr/lib64/nvidia-current/libGL.so.1: undefined symbol: _nv022tls
Comment 1 Denis Silakov 2012-07-10 15:45:48 MSD
What does `ldd -r /usr/lib64/nvidia-current/libGL.so.1` say?
Comment 2 jpereira@linkare.com 2012-07-10 19:32:13 MSD
$>ldd -r /usr/lib64/nvidia-current/libGL.so.1
        linux-vdso.so.1 =>  (0x00007fff17304000)
        libnvidia-tls.so.295.40 => /usr/lib64/nvidia-current/tls/libnvidia-tls.so.295.40 (0x00007f5f556fa000)
        libnvidia-glcore.so.295.40 => /usr/lib64/nvidia-current/libnvidia-glcore.so.295.40 (0x00007f5f533d5000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f5f53096000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f5f52e83000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f5f52af6000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f5f528f2000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f5f52670000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f5f52452000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5f55c35000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f5f5224e000)
        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f5f52048000)
Comment 3 Denis Silakov 2012-07-11 13:23:47 MSD
Interesting, ld resolves all libs and symbols successfully.

Does it help to launch vlc with preloaded libnvidia-tls.so:

LD_PRELOAD=/usr/lib64/nvidia-current/tls/libnvidia-tls.so.295.40 vlc

?
Comment 4 jpereira@linkare.com 2012-07-11 15:03:37 MSD
yes,.with LD_PRELOAD it does work correctly,.
I also tried to run it under strace to find the problem, but then, strangely, even wirhout preload it works correctly
Comment 5 Denis Silakov 2012-07-15 19:55:07 MSD
(In reply to comment #4)
> yes,.with LD_PRELOAD it does work correctly,.
> I also tried to run it under strace to find the problem, but then,
> strangely, even wirhout preload it works correctly

You can install debuginfo package for vlc  (vlc-debug) and obtain backtrace for the segfault. Unfortunately, I don't have a machine with nvidia card to reproduce this atm...

Do you experience this problem only with vlc? Do other programs that use libGL (e.g., glxgears) run successfully?
Comment 6 jpereira@linkare.com 2012-07-16 17:42:59 MSD
Running glxgears does not present any problems:

[~]$ glxgears
8623 frames in 5.0 seconds = 1724.435 FPS
8967 frames in 5.0 seconds = 1793.270 FPS
9033 frames in 5.0 seconds = 1806.481 FPS
5404 frames in 5.0 seconds = 1080.480 FPS

But then again, so doesn't vlc until I try to use the "Open File" menu entry. Plus, the vlc inside "strace" works correctly or with LD_PRELOAD as well.

I've installed vlc-debug, but then, what do you want me to do? If I just start vlc from the commandline, then the crash is similar to the first one I reported here.

If I try to run inside gdb or valgrind it just works correctly, without any crash as well.
Comment 7 jpereira@linkare.com 2012-07-16 17:48:38 MSD
Created attachment 392 [details]
Strace on the crashing process

process started in different shell and attached as PID from strace on another shell.
Comment 8 Denis Silakov 2012-07-18 16:20:34 MSD
It still would be nice to get a trace with debug package installed, to bind errors to the source code lines...
Comment 9 Denis Silakov 2012-07-18 17:11:19 MSD
As for debug package, it would be nice to get core dump. To obtain it, you should first set core dump size to something > 0 (e.g., `ulimit -c 50000000`). You can then load this core together with vlc binary to gdb to investigate source code.
Comment 10 jpereira@linkare.com 2012-07-29 20:08:40 MSD
Executing 
$jpereira:/tmp> ulimit -c 50000000
$jpereira:/tmp> vlc
VLC media player 2.0.1 Twoflower (revision 2.0.1-0-gf432547)
[0x1eea048] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
vlc: symbol lookup error: /usr/lib64/nvidia-current/libGL.so.1: undefined symbol: _nv022tls

There is no "core" file anywhere
$jpereira:/tmp> ls -a
./             akonadi-jpereira.7kvI9R/                 Ivu8FFUQ.pdf.part           .Test-unix/
../            CRX_75DAF8CB7768/                        J8ZwulYM.pdf.part           .urpmi-40000/
afuse-0ZL6y6/  dkms_rpm_safe_upgrade_lock.11044.byvjVG  jna4589741676835367571.tmp  .vbox-jpereira-ipc/
afuse-30feDD/  DLHTRP3t.pdf.part                        kde-jpereira/               .X0-lock
afuse-I30aCN/  .esd-40000/                              keyring-kmhFPY/             .X11-unix/
afuse-iTC2yq/  .font-unix/                              ksocket-jpereira/           .XIM-unix/
afuse-l3lQGz/  .google-talk-plugin-jpereira.lock        orbit-jpereira/
afuse-sj0hjb/  .ICE-unix/                               pulse-VKToXuWkAgsn/
 

On the other side, sysctl shows:

$>sysctl -a | grep kernel | grep core
kernel.core_uses_pid = 1
kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t
kernel.core_pipe_limit = 0


So, I could I help further and produce a core file?
Comment 11 Denis Silakov 2012-08-23 00:03:00 MSD
Indeed, since this is not a fault of the program itself but of the dynamic linker, we can't obtain core file in this way. I'm afraid atm I can't suggest any solution except LD_PRELOAD...
Comment 12 Denis Silakov 2012-08-23 00:11:16 MSD
...One mre thought - do you help "vlc-plugin-projectm" installed and does it help if you remove this package?
Comment 13 Denis Silakov 2013-02-13 13:20:24 MSK
Well, no activity for a long time and no solid reproducer, so closing as 'worksforme'.

If you experience the issues described in this bug - use the LD_PRELOAD workaround. (and hope that the issue will occasionally go away with further updates).