Page 1 of 1

Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Sat Mar 05, 2016 10:37 am
by sh0dan
I realise this is a very unfair test but I would like to turn off my quad core Xeon and move my tuners to a pi. To that end I'm trying a comparison.

The server is a Pi2 running Raspbian Jessie Lite (2016-02-26) and DvbLink (dvblink-server-raspberry-linux-arm-5.5.0), no other software was added to Raspbian.

The TV tuners are Sony PlayTV USB DVB-T boxes, one was connected for the test.

The clients are Nexus Players running both Android TV Live Channels and Kodi (Jarvis).

Problem 1:
Using the DVBLogic beta Android TV live channels source the DvbLink server runs stably. However, there is some occasional breaking up and "Discon..." noted when monitoring in DvbLink. I know this is specific to the Pi2/DvbLink because the same isn't true when I use the Windows version on my current server.

The CPU and memory are both under 15% while playing the channel, checked using the "top" command.

Problem 2:
Using the DVBLink plugin within the Android Kodi (Jarvis) client I get a few minutes of live TV when a channel is selected and then the DvbLink server "stops" on the Pi2? This is obviously the most concerning issue at the moment.

I noted the following in the server log: [E] Error. Received SIGSEGV: Segmentation Violation.

I'd appreciate any help diagnosing.

Edit - "no other software was added to Raspbian " except the firmware for the TV Tuner: "sudo apt-get install firmware-linux-nonfree"

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Sat Mar 05, 2016 11:08 am
by sh0dan
Problem 2:

Extended logging doesn't seem to reveal anything more :( These are the moments before the server process died. Although, the timeshift event does seem to be happening a lot compared to previous log entries.

2016-Mar-05 09:59:48: [I] timeshift length: 34966496, duration: 85, position: 34966496
2016-Mar-05 09:59:48: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 09:59:49: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 09:59:49: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 09:59:49: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 09:59:49: [I] timeshift length: 35180252, duration: 86, position: 35180252
2016-Mar-05 09:59:49: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 09:59:50: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 09:59:50: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 09:59:50: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 09:59:50: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 09:59:50: [I] timeshift length: 35393068, duration: 87, position: 35393068
2016-Mar-05 09:59:50: [I] timeshift length: 35404348, duration: 87, position: 35404348
2016-Mar-05 09:59:50: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 09:59:51: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 09:59:51: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 09:59:51: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 09:59:51: [I] timeshift length: 35784672, duration: 88, position: 35784672
2016-Mar-05 09:59:52: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 09:59:52: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 09:59:52: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 09:59:52: [I] timeshift length: 36450944, duration: 89, position: 36450944
2016-Mar-05 09:59:52: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 09:59:52: [I] timeshift length: 36487980, duration: 89, position: 36487980
2016-Mar-05 09:59:53: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 09:59:53: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 09:59:53: [I] timeshift length: 37020396, duration: 90, position: 37020396
2016-Mar-05 09:59:55: [I] timeshift length: 37544352, duration: 92, position: 37544352
2016-Mar-05 09:59:55: [I] timeshift length: 37577440, duration: 92, position: 37577440
2016-Mar-05 09:59:56: [I] timeshift length: 38082784, duration: 93, position: 38082784
2016-Mar-05 09:59:56: [I] timeshift length: 38103276, duration: 93, position: 38103276
2016-Mar-05 09:59:57: [I] timeshift length: 38571020, duration: 94, position: 38571020
2016-Mar-05 09:59:58: [I] timeshift length: 39015640, duration: 95, position: 39015640
2016-Mar-05 09:59:58: [I] timeshift length: 39038764, duration: 95, position: 39038764
2016-Mar-05 09:59:59: [I] timeshift length: 39486580, duration: 96, position: 39486580
2016-Mar-05 10:00:00: [I] timeshift length: 39972936, duration: 97, position: 39972936
2016-Mar-05 10:00:00: [I] timeshift length: 39997564, duration: 97, position: 39997564
2016-Mar-05 10:00:01: [I] timeshift length: 40547652, duration: 98, position: 40547652
2016-Mar-05 10:00:02: [I] timeshift length: 41140980, duration: 99, position: 41140980
2016-Mar-05 10:00:02: [I] timeshift length: 41175008, duration: 99, position: 41175008
2016-Mar-05 10:00:03: [I] timeshift length: 41771532, duration: 100, position: 41771532
2016-Mar-05 10:00:04: [I] timeshift length: 42285148, duration: 101, position: 42285148
2016-Mar-05 10:00:04: [I] timeshift length: 42313724, duration: 101, position: 42310528
2016-Mar-05 10:00:05: [I] timeshift length: 42811736, duration: 102, position: 42811736
2016-Mar-05 10:00:07: [I] timeshift length: 43142804, duration: 104, position: 43142804
2016-Mar-05 10:00:07: [I] timeshift length: 43165364, duration: 104, position: 43165364
2016-Mar-05 10:00:08: [I] timeshift length: 43624084, duration: 105, position: 43624084
2016-Mar-05 10:00:08: [I] timeshift length: 43653600, duration: 105, position: 43653600
2016-Mar-05 10:00:09: [I] timeshift length: 44169848, duration: 106, position: 44169848
2016-Mar-05 10:00:10: [I] timeshift length: 44724824, duration: 107, position: 44724824
2016-Mar-05 10:00:10: [I] timeshift length: 44750768, duration: 107, position: 44750768
2016-Mar-05 10:00:11: [I] timeshift length: 45263444, duration: 108, position: 45262128
2016-Mar-05 10:00:12: [I] timeshift length: 45777060, duration: 109, position: 45777060
2016-Mar-05 10:00:12: [I] timeshift length: 45804132, duration: 109, position: 45804132
2016-Mar-05 10:00:13: [I] timeshift length: 46347452, duration: 110, position: 46347452
2016-Mar-05 10:00:14: [I] timeshift length: 46799216, duration: 111, position: 46799216
2016-Mar-05 10:00:14: [I] timeshift length: 46820084, duration: 111, position: 46820084
2016-Mar-05 10:00:15: [I] timeshift length: 47301364, duration: 112, position: 47301364
2016-Mar-05 10:00:16: [I] timeshift length: 47745796, duration: 113, position: 47745796
2016-Mar-05 10:00:16: [I] timeshift length: 47763280, duration: 113, position: 47763280
2016-Mar-05 10:00:17: [I] timeshift length: 48117660, duration: 114, position: 48117660
2016-Mar-05 10:00:18: [I] timeshift length: 48471852, duration: 115, position: 48471852
2016-Mar-05 10:00:19: [I] timeshift length: 48489712, duration: 116, position: 48489712
2016-Mar-05 10:00:20: [I] timeshift length: 48867780, duration: 117, position: 48867780
2016-Mar-05 10:00:21: [I] timeshift length: 49244156, duration: 118, position: 49243404
2016-Mar-05 10:00:21: [I] timeshift length: 49263520, duration: 118, position: 49263520
2016-Mar-05 10:00:22: [I] timeshift length: 49669412, duration: 119, position: 49669412
2016-Mar-05 10:00:23: [I] timeshift length: 50020032, duration: 120, position: 50020032
2016-Mar-05 10:00:23: [I] timeshift length: 50033568, duration: 120, position: 50033568
2016-Mar-05 10:00:24: [I] timeshift length: 50372532, duration: 121, position: 50372532
2016-Mar-05 10:00:24: [I] timeshift length: 50378360, duration: 121, position: 50378360
2016-Mar-05 10:00:25: [I] timeshift length: 50745712, duration: 122, position: 50745712
2016-Mar-05 10:00:25: [I] timeshift length: 50764888, duration: 122, position: 50764888
2016-Mar-05 10:00:26: [I] timeshift length: 51193716, duration: 123, position: 51193716
2016-Mar-05 10:00:27: [I] timeshift length: 51623860, duration: 124, position: 51623860
2016-Mar-05 10:00:27: [I] timeshift length: 51649052, duration: 124, position: 51649052
2016-Mar-05 10:00:28: [I] timeshift length: 52040468, duration: 125, position: 52039904
2016-Mar-05 10:00:29: [I] timeshift length: 52397856, duration: 126, position: 52397856
2016-Mar-05 10:00:29: [I] timeshift length: 52415904, duration: 126, position: 52415528
2016-Mar-05 10:00:30: [I] timeshift length: 52799800, duration: 127, position: 52799800
2016-Mar-05 10:00:31: [I] timeshift length: 53185012, duration: 128, position: 53184636
2016-Mar-05 10:00:32: [I] timeshift length: 53206444, duration: 129, position: 53206444
2016-Mar-05 10:00:33: [I] timeshift length: 53541836, duration: 130, position: 53541836
2016-Mar-05 10:00:33: [I] timeshift length: 53554808, duration: 130, position: 53554808
2016-Mar-05 10:00:34: [I] timeshift length: 53851848, duration: 131, position: 53851848
2016-Mar-05 10:00:35: [I] timeshift length: 54192316, duration: 132, position: 54192316
2016-Mar-05 10:00:35: [I] timeshift length: 54211492, duration: 132, position: 54211492
2016-Mar-05 10:00:36: [I] timeshift length: 54432956, duration: 133, position: 54432956
2016-Mar-05 10:00:37: [I] timeshift length: 54720972, duration: 134, position: 54720972
2016-Mar-05 10:00:37: [I] timeshift length: 54742780, duration: 134, position: 54742780
2016-Mar-05 10:00:38: [I] timeshift length: 55270308, duration: 135, position: 55270308
2016-Mar-05 10:00:39: [I] timeshift length: 55786180, duration: 136, position: 55786180
2016-Mar-05 10:00:39: [I] timeshift length: 55810056, duration: 136, position: 55810056
2016-Mar-05 10:00:40: [I] timeshift length: 56289268, duration: 137, position: 56289268
2016-Mar-05 10:00:41: [I] timeshift length: 56698168, duration: 138, position: 56698168
2016-Mar-05 10:00:41: [I] timeshift length: 56723172, duration: 138, position: 56721292
2016-Mar-05 10:00:42: [I] timeshift length: 57277396, duration: 139, position: 57277396
2016-Mar-05 10:00:43: [I] timeshift length: 57885576, duration: 140, position: 57885576
2016-Mar-05 10:00:44: [I] timeshift length: 57919416, duration: 141, position: 57919416
2016-Mar-05 10:00:45: [I] timeshift length: 58338656, duration: 142, position: 58338656
2016-Mar-05 10:00:46: [I] timeshift length: 58634192, duration: 143, position: 58634192
2016-Mar-05 10:00:46: [I] timeshift length: 58651112, duration: 143, position: 58651112
2016-Mar-05 10:00:47: [I] timeshift length: 58980864, duration: 144, position: 58980864
2016-Mar-05 10:00:48: [I] timeshift length: 59260420, duration: 145, position: 59260420
2016-Mar-05 10:00:48: [I] timeshift length: 59269820, duration: 145, position: 59269820
2016-Mar-05 10:00:48: [E] Error. Received SIGSEGV: Segmentation Violation.
2016-Mar-05 10:00:48: [I] timeshift length: 59269820, duration: 145, position: 59269820

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Mon Mar 07, 2016 2:03 pm
by the_man
Just try to disable the timeshift option at the DVBLink PVR addon, restart the client, and try to play LiveTV again. Result?

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Mon Mar 07, 2016 9:05 pm
by sh0dan
Problem 2:
Good suggestion! The DvbLink_Server process no longer crashes if timeshift is disabled in the Kodi client. That would appear to indicate an issue with the timeshift option in the Kodi client (see problem 3)?

Problem 1:
The picture still breaks up, blocks of green etc...

Problem 3:
While the suggestion stopped the DvbLink_Server process from crashing the live tv eventually froze after about 15 minutes and wont restart when selecting the channel again. There are a lot of other repetitive entries in the logs, is it possible there is some kind of infinite loop going on?

016-Mar-05 10:05:20: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:21: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:21: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:21: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:21: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:21: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:21: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:22: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:22: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:22: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:22: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:22: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:22: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:23: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:24: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:24: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:24: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:24: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:24: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:24: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:25: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:26: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:26: [I] recorder_engine::run_active: PeekCommand: recGetSchedules
2016-Mar-05 10:05:26: [I] recorder_engine::run_active: PeekCommand: recGetTimers
2016-Mar-05 10:05:26: [I] recorder_engine::run_active: PeekCommand: recBrowseEPG
2016-Mar-05 10:05:26: [I] recorder_engine::run_active: PeekCommand: recGetSchedules

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Fri Mar 11, 2016 9:27 pm
by sh0dan
Anyone any other tips :( I'd really like to get this working.

I'm also looking at other options, LattePanda or something else x86 based?

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Mon Mar 14, 2016 10:27 am
by the_man
Can you test the streaming on the VLC player (On the Desktop machine)?
- install and launch the VLC player and press the combination Ctrl+N
- in the "Please, enter a Network URL" enter:http://ip-of-your-server:8100/mobile/?command=get_playlist_m3u
- start to play channels ...

During the stuttering/pixelixation of the LiveTV, go to the Monitoring tab and observe Whether an Error or Discontinuity counts there ?

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Thu Mar 17, 2016 10:01 pm
by sh0dan
Sorry I've been away from my Pi but will run that test asap.

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Mon Mar 21, 2016 11:31 pm
by sh0dan
While testing on the x86 board I noticed the same issues and eventual crashing using Ubuntu, discontinuity count again around 20 in monitoring. I did work out that switching to another of the four identical Usb tuners appeared to resolve that to an extent and showed a zero discontinuity count plus picture was stable. So am currently working on the theory the original test tuner is damaged? What is the discontinuity count?

I'll re-test the Pi soon.

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Tue Mar 22, 2016 9:28 am
by the_man
The @toga user has described a quite clearly "what it is":

To answer this question: The receiver of a DVB transport stream has two means to verify the integrity of the data:

a) Every packet in the TS has an error bit, that is set by the receiver’s hardware when an uncorrectable bit error was found in the packet. This indicates that the signal quality is poor or any other – most likely physical – problem exists so that the data bits are wrong.

b) Every packet in the TS has also a small 4-bit counter field that is incremented for each packet by the sender. With the help of this field, the receiver can detect when packets are missing in the packet stream it receives, simply by comparing the counter field in the next packet with the expected value which is calculated by the last packet’s counter+1. When they differ, packets got lost, and that’s called a “discontinuity error”. (That counter is actually one individual counter per each stream packet id PID, so discontinuity errors can be detected for each PID stream individually.)

DVBLink software shows errors of type a) in the “Errors” column, and type b) in the “Discon…” column.

So the meaning of “Discon…” is not “disconnect”, but “discontinuity error”.

For the possible reasons: Discontinuity errors indicate that packets somehow are dropped at or before DVBlink can process the TS stream. It can mean that the hardware (CPU, bus, etc.) is not fast enough to transfer the data from the receiver’s hardware (PC card, USB stick, etc.) to the system.

In your case, IIUC, you’re using a HDHomeRun hardware, and from its website, it seems that it is an external box that sends the TS data via the local network. Maybe you should check the network connection, temporarily disconnect all other devices from the network, and/or try a direct cable connection from the HDHomeRun box to the DVBLink PC. Also you might want to check the network driver, or any network related software (like filters, personal firewall, or anti-virus software with network inspection).

I hope that helps.




So, the firstly should be checked the hardware: Antenna, tuners, cables , connectors ...

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Tue Mar 22, 2016 11:30 pm
by sh0dan
Thanks, well annoyingly the Pi is now running stably... only annoying as in the mean time I bought an x86 board.

I'll continue to test but appreciate your help and would love to think that's fixed it.

I'm off to bin the original usb tuner...

Re: Android Kodi (Jarvis) DvbLink client crashing server

PostPosted: Fri Mar 25, 2016 6:52 pm
by sh0dan
Sorry, the_man I forgot timeshift was switched off in Kodi. When I turned it back on the dvblink server crashed within seconds. Could you provide any help in resolving that?

The above aside the pi recorded 4 simultaneous sd tv streams, I would say its performing ok and am testing further.