Kodi Community Forum

Full Version: Kodi, VDR and Slackware [SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I hope this is the right place to post this! I'm running Slackware64-current on an Intel platform, which means I have to compile everything from scratch. Gcc version is 7.1.0. Tv hardware is a PCTV usb stick 292e. This works fine with Kaffeine, VLC and the various dvb utilities, so I know the hardware is OK.

Finding all the documentation on how to achieve success has not been easy, but I'm *almost* there! I've successfully compiled Kodi with the vdr plugin. As far as I can tell, anyway! Kodi runs fine and recognises the plugin, so hopefully all is well.

Compiling vdr proved a problem, until Klaus pointed me towards the developer versions. 2.3.8 built fine. However, none of the techniques I found for compiling the vnsi server worked. It all seemed to compile OK (no errors) but nothing in the lib directory either! In the end, I did a git clone of vnsiserver, placed the resulting folder in the PLUGINS/src directory of vdr, and then rebuilt vdr. This seemed to work. There were no errors, and all the expected files were present after compiling.

So, as far as I can tell, everything is built without errors.

However, when I run kodi, and select TV, I get the channels list (yes, I did manage to build a compatible channels.conf!), but as soon as I click on a channel to watch it, I get an error message saying that the connection to the server has been lost. Sometimes I see a few seconds of video in the background before it freezes. After a few seconds, the connection is re-established, but as soon as I click on a channel, it fails again.

Running vdr from a command prompt as root produces the following error:

Code:
runvdr: line 69:  4093 Segmentation fault      /usr/local/bin/vdr -w 60 --lib=/usr/local/lib/vdr --video=/Multimedia/Recordings/vdr --epgfile=/Multimedia/Recordings/vdr/epg --config=/etc/vdr -P vnsiserver

the syslog shows:

Code:
Aug  5 10:13:59 Lightning vdr: [4093] ERROR: no OSD provider available - using dummy OSD!
Aug  5 10:14:16 Lightning last message repeated 2 times
Aug  5 10:14:30 Lightning vdr: [4168] ERROR: no OSD provider available - using dummy OSD!

and dmesg shows:

Code:
[ 5641.512978] cLiveStreamer s[4150]: segfault at 38 ip 00000000004acb40 sp 00007f9f627fbd68 error 4 in vdr[400000+192000]
[ 5651.541471] si2168 8-0064: downloading firmware from file 'dvb-demod-si2168-b40-01.fw'
[ 5651.998607] si2168 8-0064: firmware version: B 4.0.25

I'm now stumped! I've no doubt its something I've done wrong, or configured incorrectly, but I can't see what.

Any help gratefully appreciated!

--
Pete
VDR 2.3.8 crashes becuase of logging of locking sequence. Disable it with this patch: https://github.com/FernetMenta/VDR/commi...c080b7374a
Thanks for your reply. I've applied the patch, but the problem persists, I'm afraid. Exactly the same as before.

--
Pete
Please run vdr with gdb and post back trace after segfault.
Bear with me, I'm not familiar with gdb! If I run "gdb runvdr", it complains that "runvdr" is not in a valid format. If I run gdb vdr followed by the necessary vdr configuration options, gdb complains about invalid options. If I run gdb vdr, then vdr can't find any of its configuration files and fails anyway!

Can you give me a clue how to call it, please?

Cheers,

--
Pete
gdb --args executablename arg1 arg2 arg3
OK, think I've found out how to do it!

Code:
run
Starting program: /usr/local/bin/vdr -w 60 --lib=/usr/local/lib/vdr --video=/Multimedia/Recordings/vdr --epgfile=/Multimedia/Recordings/vdr/epg --config=/etc/vdr -P vnsiserver
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7f26628e5700 (LWP 3851)]
[New Thread 0x7f26620e4700 (LWP 3852)]
[Thread 0x7f26628e5700 (LWP 3851) exited]
[Thread 0x7f26620e4700 (LWP 3852) exited]
[New Thread 0x7f26620e4700 (LWP 3854)]
[New Thread 0x7f26628e5700 (LWP 3855)]
[New Thread 0x7f26618e3700 (LWP 3856)]
[New Thread 0x7f26610e2700 (LWP 3857)]
[New Thread 0x7f26608e1700 (LWP 3858)]
[New Thread 0x7f264bfff700 (LWP 3859)]
[New Thread 0x7f264b7fe700 (LWP 3863)]
[New Thread 0x7f264af4f700 (LWP 3895)]
[New Thread 0x7f264a74e700 (LWP 3905)]
[New Thread 0x7f2649a4c700 (LWP 3906)]
[New Thread 0x7f2648d4a700 (LWP 3907)]
[New Thread 0x7f2633fff700 (LWP 3908)]

Thread 15 "cLiveStreamer s" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f2633fff700 (LWP 3908)]
0x00000000004ac9d0 in cSchedule::GetEventAround(long) const ()
(gdb) quit

Is this what you wanted?

(Sorry, just seen your reply! Was away researching!)

--
Pete
when gdb breaks on the exception type "thread apply all bt"
please rebase vnsiserver. I just pushed an update
Here's the revised gdb output:

Code:
thread apply all bt

Thread 15 (Thread 0x7f25f50ac700 (LWP 8901)):
#0  0x00007f2602d68d58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000000005251f7 in cCondWait::Wait(int) ()
#2  0x0000000000525236 in cCondWait::SleepMs(int) ()
#3  0x000000000048aa22 in ?? ()
#4  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#5  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 14 (Thread 0x7f25f58ad700 (LWP 8900)):
#0  0x00000000004ac9d0 in cSchedule::GetEventAround(long) const ()
#1  0x00007f25ff8eed32 in cLiveStreamer::sendStreamTimes(sStreamPacket&) ()
   from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#2  0x00007f25ff8f046b in cLiveStreamer::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#3  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#4  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 13 (Thread 0x7f25f60ae700 (LWP 8899)):
#0  0x00007f2602d68d58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000000005251f7 in cCondWait::Wait(int) ()
#2  0x00000000004fc996 in cRingBufferLinear::Get(int&) ()
#3  0x000000000048f692 in cTSBuffer::Get(int*, bool) ()
#4  0x0000000000493b09 in cDvbDevice::GetTSPacket(unsigned char*&) ()
#5  0x000000000048f85a in cDevice::Action() ()
#6  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#7  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f26016ea19f in clone () from /lib64/libc.so.6

---Type <return> to continue, or q <return> to quit---

Thread 12 (Thread 0x7f25f68af700 (LWP 8898)):
#0  0x00007f26016dea5d in poll () from /lib64/libc.so.6
#1  0x000000000052f87e in cPoller::Poll(int) ()
#2  0x00007f25ff8e8cd2 in cxSocket::read(void*, unsigned long, int) ()
   from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#3  0x00007f25ff8e5d0c in cVNSIClient::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#4  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#5  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7f25f7fff700 (LWP 8875)):
#0  0x00007f26016dea5d in poll () from /lib64/libc.so.6
#1  0x000000000052f87e in cPoller::Poll(int) ()
#2  0x00007f25ff8e8cd2 in cxSocket::read(void*, unsigned long, int) ()
   from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#3  0x00007f25ff8e5d0c in cVNSIClient::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#4  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#5  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7f25fcffe700 (LWP 8840)):
#0  0x00007f26016dea5d in poll () from /lib64/libc.so.6
#1  0x000000000052f87e in cPoller::Poll(int) ()
#2  0x000000000052399d in cSVDRPServerHandler::Action() ()
#3  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#4  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f26016ea19f in clone () from /lib64/libc.so.6

---Type <return> to continue, or q <return> to quit---

Thread 9 (Thread 0x7f25fd8ad700 (LWP 8837)):
#0  0x00007f26016aefad in nanosleep () from /lib64/libc.so.6
#1  0x00007f26016e10c7 in usleep () from /lib64/libc.so.6
#2  0x00007f25ff900862 in CVNSITimers::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#3  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#4  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f25fe0ae700 (LWP 8836)):
#0  0x00007f26016aefad in nanosleep () from /lib64/libc.so.6
#1  0x00007f26016e10c7 in usleep () from /lib64/libc.so.6
#2  0x00007f25ff8fd3d1 in cVNSIStatus::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#3  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#4  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f25fe8af700 (LWP 8835)):
#0  0x00007f26016dea5d in poll () from /lib64/libc.so.6
#1  0x000000000052f87e in cPoller::Poll(int) ()
#2  0x00000000004f6e96 in cKbdRemote::ReadKey() ()
#3  0x00000000004f6f26 in cKbdRemote::ReadKeySequence() ()
#4  0x00000000004f7125 in cKbdRemote::Action() ()
#5  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#6  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f25ff0b0700 (LWP 8834)):
#0  0x00007f26016e0903 in select () from /lib64/libc.so.6
#1  0x00007f25ff8f2883 in cVNSIServer::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8

---Type <return> to continue, or q <return> to quit---

Thread 9 (Thread 0x7f25fd8ad700 (LWP 8837)):
#0  0x00007f26016aefad in nanosleep () from /lib64/libc.so.6
#1  0x00007f26016e10c7 in usleep () from /lib64/libc.so.6
#2  0x00007f25ff900862 in CVNSITimers::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#3  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#4  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f25fe0ae700 (LWP 8836)):
#0  0x00007f26016aefad in nanosleep () from /lib64/libc.so.6
#1  0x00007f26016e10c7 in usleep () from /lib64/libc.so.6
#2  0x00007f25ff8fd3d1 in cVNSIStatus::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8
#3  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#4  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f25fe8af700 (LWP 8835)):
#0  0x00007f26016dea5d in poll () from /lib64/libc.so.6
#1  0x000000000052f87e in cPoller::Poll(int) ()
#2  0x00000000004f6e96 in cKbdRemote::ReadKey() ()
#3  0x00000000004f6f26 in cKbdRemote::ReadKeySequence() ()
#4  0x00000000004f7125 in cKbdRemote::Action() ()
#5  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#6  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f25ff0b0700 (LWP 8834)):
#0  0x00007f26016e0903 in select () from /lib64/libc.so.6
#1  0x00007f25ff8f2883 in cVNSIServer::Action() () from /usr/local/lib/vdr/libvdr-vnsiserver.so.2.3.8

---Type <return> to continue, or q <return> to quit---

#2  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#3  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f25ff8b1700 (LWP 8833)):
#0  0x00007f26016dea5d in poll () from /lib64/libc.so.6
#1  0x00000000004fe5d4 in cSectionHandler::Action() ()
#2  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#3  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f25f70b0700 (LWP 8832)):
#0  0x00007f2602d68d58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000052539d in cCondVar::TimedWait(cMutex&, int) ()
#2  0x00000000004971be in cDvbTuner::Action() ()
#3  0x0000000000525a55 in cThread::StartThread(cThread*) ()
#4  0x00007f2602d62504 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f26016ea19f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f26033aee40 (LWP 8825)):
#0  0x00007f2602d68d58 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000052539d in cCondVar::TimedWait(cMutex&, int) ()
#2  0x00000000004f6af3 in cRemote::Get(int, char**) ()
#3  0x0000000000470d10 in main ()
(gdb)

(Might have inadvertently doubled some of that up! Sorry!)

I'm going to try the revised vnsiserver now - will report back when done.

--
Pete
YES! Just rebuilt vdr with the new vnsiserver and it is now working as expected!

Many thanks!

One final question, if I may? All the documentation I've found for vdr is based upon Ubuntu, which uses systemd. Slackware is a systemd free zone Wink so what is the preferred way of starting vdr?

If I start it from rc.local (using runvdr), the boot process hangs at that point. I can start it (as root) from a command prompt, but then I have to keep the console open all the time I'm running kodi. There must be some way of starting it that doesn't require keeping the command line open.

Any suggestions?

Again, many thanks!

--
Pete
Starting vdr is more related to a specific Linix distro than vdr itself. You can use runvdr but you don't have to.

Quote:I can start it (as root) from a command prompt, but then I have to keep the console open all the time I'm running kodi.

Why do you have to keep the console open?

Quote:If I start it from rc.local (using runvdr), the boot process hangs at that point.

You just need to call the script non blocking.
(2017-08-07, 07:23)FernetMenta Wrote: [ -> ]You just need to call the script non blocking.

Adding
Code:
/usr/local/bin/runvdr &
to rc.local seems to have sorted the problem!

I'm sure I tried that during the time I was trying to get vdr to talk nicely to kodi, and it didn't work. It kept losing the connection to vnsiserver. Perhaps that was related to the same "feature" which your last patch cured! Wink

Anyway, its now all working fine! Thank you very much for your assistance!

--
Pete