Project

General

Profile

Actions

Bug #1283

open

Plugin crashing vdr with segfault

Added by rene almost 12 years ago. Updated over 10 years ago.

Status:
Assigned
Priority:
Normal
Assignee:
Start date:
03/05/2013
Due date:
% Done:

0%

Estimated time:

Description

The most resent git-version and the latest release-version does not work with vdr 1.7.33. The plugin loads normally, and i can access the plugin from the main menu. But selecting any menu-item (Yle, Youtube) segfaults VDR.

latest release-package

Mar  5 02:36:09 htpc kernel: [1437645.885949] vdr[11991]: segfault at 0 ip           (null) sp 00007fff70a1fd48 error 14 in vdr[400000+17a000]

Git-souce:

Mar  5 02:22:40 htpc kernel: [1436836.880267] vdr[11973]: segfault at 18a0cd88 ip 00007f40187f7ffb sp 00007f3fca7fa930 error 6 in libvdr-webvideo.so.1.7.33[7f40187e4000+27000]


Files

backtrace.log (24.2 KB) backtrace.log rene, 04/05/2013 01:09 AM
valgrind.log (338 KB) valgrind.log rene, 04/14/2013 11:21 AM
Actions #1

Updated by rene almost 12 years ago

Got same vdr-crash with latest vdr 1.7.41

Mar 18 22:30:39 htpc kernel: [198851.546785] vdr[13961]: segfault at ac1cdd88 ip 00007f23abfb907b sp 00007f236e7fa930 error 6 in libvdr-webvideo.so.1.7.41[7f23abfa5000+27000]

Actions #2

Updated by aajanki almost 12 years ago

  • Status changed from New to Resolved

I believe the crash was caused because Makefile was incompatible with recent VDR 1.7.x versions.

I updated the Makefile and it is now working at least here. Can you confirm by testing a version from git?

Actions #3

Updated by rene almost 12 years ago

Hi,

Unfortunately it crashes already by startup with the following error:

Mar 20 21:54:04 htpc vdr: [18762] loading plugin: /data/home/vdr_ubuntu/vdr-1.7.41/PLUGINS/lib/libvdr-webvideo.so.1.7.41
Mar 20 21:54:04 htpc vdr: [18762] ERROR: /data/home/vdr_ubuntu/vdr-1.7.41/PLUGINS/lib/libvdr-webvideo.so.1.7.41: undefined symbol: xmlFree

Actions #4

Updated by aajanki over 11 years ago

The undefined symbol error means that linking with libxml2.so failed for some reason.

Do you have libxml2-dev installed? What does xml2-config --libs output? The output should be something similar to

$ xml2-config --libs
-L/usr/lib -lxml2
Actions #5

Updated by rene over 11 years ago

I get this:

root@htpc:~# xml2-config --libs
-L/usr/lib/x86_64-linux-gnu -lxml2

Actions #6

Updated by rene over 11 years ago

I btw updated to vdr 1.7.42, and when doing a "make all" inside the source-dir i don't get the plugin copied to PLUGINS/lib. To get this done i need to do a make plugins in the source-dir of vdr. Not sure if it's because of the new Makefile-change in VDR..

Actions #7

Updated by aajanki over 11 years ago

xml2-config output looks sensible, but is doesn't explain why libxml is not found when the plugin is loaded.

Antoher thing you can try is running ldd on the plugin .so file:

$ ldd /usr/lib/vdr/plugins/libvdr-webvideo.so.1.7.41
        linux-gate.so.1 =>  (0xb77ac000)
        libxml2.so.2 => /usr/lib/i386-linux-gnu/libxml2.so.2 (0xb7626000)
        libwebvi.so.1 => /usr/lib/libwebvi.so.1 (0xb7620000)
        libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb7533000)
        libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb750d000)
        libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb74f0000)
        libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb738d000)
        libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb7389000)
        libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb736f000)
        liblzma.so.5 => /lib/i386-linux-gnu/liblzma.so.5 (0xb7348000)
        libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0xb707a000)
        /lib/ld-linux.so.2 (0xb77ad000)
        libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb7061000)
        libutil.so.1 => /lib/i386-linux-gnu/i686/cmov/libutil.so.1 (0xb705d000)

Check that it founds all the libraries (otherwise the output says "not found").

At least on 1.7.41, make all should do make plugins automatically. Maybe this has changed in 1.7.42?

Actions #8

Updated by rene over 11 years ago

Hmm.. Looks like it does not find the libxml2.so.2.. I wonder what i have messed up...

root@htpc:~# ldd lib/libvdr-webvideo.so.1.7.41 
        linux-vdso.so.1 =>  (0x00007fffc5992000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f94e1923000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f94e170d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f94e134d000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f94e1051000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f94e1e69000)
Actions #9

Updated by aajanki over 11 years ago

Can you try again with the latest git version? I modified the library link order. The old link command might in some cases cause the symptoms you are seeing.

Actions #10

Updated by rene over 11 years ago

Hi,

Now i get to the main-menu, but when i pick for example Youtube it crashes again vdr with the following line in syslog:

Mar 25 00:37:41 htpc kernel: [102303.677201] vdr[31756]: segfault at c9baad88 ip 00007f1bc999607b sp 00007f1b9effb910 error 6 in libvdr-webvideo.so.1.7.41[7f1bc9982000+27000]

Actions #11

Updated by aajanki over 11 years ago

I have no idea what is the problem this time... Can you generate a backtrace and attach it here or send it to me by email? Approximate instructions (more in German at http://www.vdr-wiki.de/wiki/index.php/Gdb):

1. Make sure that the plugin is compiled with debug information. This should be the default (unless you use the Debian packaging scripts). If the output of the command file libvdr-webvideo.so includes text "not stripped", everything is fine.

2. Start vdr

3. In a new terminal window, attach debugger to the running vdr process by typing gdb /usr/bin/vdr `pidof vdr`

4. In the gdb prompt, type continue.

5. In VDR, browse in the webvideo menu and wait for a crash.

6. After a crash, you get back to the gdb prompt. Type threads apply all bt and send to output to me.

Another thing that might be useful is the full output of the make command.

Actions #12

Updated by aajanki over 11 years ago

  • Status changed from Resolved to Assigned
Actions #13

Updated by rene over 11 years ago

Sorry that it took me so long time to follow up on this. I had screwed up my ubuntu-upgrade, and i needed to roll back to a previous version, and that took some time :-(

Attached is the backtrace. I hope that i got the right info for you :-)

Actions #14

Updated by aajanki over 11 years ago

I don't understand why it would segfault where the log shows. This probably means that it is some kind of nasty memory corruption bug, and that the actual error is somewhere else.

One thing that might still help, is valgrind log. Run valgrind --leak-check=yes vdr --lirc -Pwebvideo (you probably need to give more arguments to vdr) and post the log.

Actions #15

Updated by rene over 11 years ago

I removed all plugins, and did run VDR only with the remote-plugin and xineliboutput.

With valgrid webvideo worked, but without it crashed as til now when i tried to enter eg. Yle. With Valgrid I managed now to browse Yle, and i could pick a program. Rtpdump started to do it's work, and downloaded a .flv to the download-dir, BUT it did not replay it..

hopefully you get something out form the valgrid-log...

Actions #16

Updated by aajanki over 11 years ago

According to valgrind log, there are dubious out-of-bounds reads in cNavigationMenu::NewLinkItem, but I can't see anything wrong in the code. I'll have to go through the code more thoroughly.

Does it work, if you remove all other plugins and run without valgrind? This could also be due to some kind interaction with other plugins.

Actions #17

Updated by rene almost 11 years ago

Hi,

10 months later i upgraded vdr to the latest devel-version 2.1.3, and webvideo still segfaults vdr..

Jan 25 17:10:53 htpc kernel: [13235.641553] show_signal_msg: 52 callbacks suppressed
Jan 25 17:10:53 htpc kernel: [13235.641558] vdr[21804]: segfault at aefa3d88 ip 00007f1daed8f09b sp 00007f1d8951d910 error 6 in libvdr-webvideo.so.2.1.3[7f1daed7b000+27000]

I'm still running Ubuntu 12.04.3 LTS...
Actions #18

Updated by rene over 10 years ago

Any chance that webvideo would get fixed for VDR 2.x?

Actions

Also available in: Atom PDF