Kodi Community Forum
New MythTV add-on using libcmyth - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694)



RE: New MythTV add-on using libcmyth - fetzerch - 2013-02-16

(2013-02-15, 23:49)simora Wrote: @cfetzer

About the addon not loading on my arm box... do you want me to open an issue on your github so any other dev contributors can take a look at it? I tried to go through the stack trace but I haven't been able to take a deep look at it assuming I know what I should be looking for.

Sorry it takes a bit sometimes Wink
I checked your strace log but it does not show that it even tries to load the add-on file. This is strange.
Does /root/.xbmc/addons/pvr.mythtv.cmyth/XBMC_MythTV_cmyth.pvr exist?
And can you call ldd on that file and post the output?

The problem is that this is not an issue with our addon, it's somewhere in the packaging/build system.
So github is the wrong place.

@Janbar: any ideas?

(2013-02-15, 23:50)richardk Wrote:
(2013-02-15, 00:59)cfetzer Wrote: @richardk:
I have pushed a small fix to master and to debug-backend-cpu that adjusts all tcp rcv buffers to a bigger value (128000).

I was seeing a socket error: "writeStringList: Error, No data written on writeBlock" on the backend and I think I've seen a similar one also in a log you posted.
Janbar told me that this error message usually goes hand in hand with a high load on the backend.

Therefore it could be somehow related to your problem. It would be nice if you could retest (if possible with both branches).
How is your experience currently without images. Did it fix the issue for you?

Thanks,
Christian

This version of the addon worked for several hours. Then I got a box that said:

The PVR backend does not support this action Check the l...
An unexpected error occurred. Try again later or check the l...

I captured the log, and it's here:

http://pastebin.com/aVZJSwaq

You mean the master version? Can you quickly explain what you did? LiveTV for several hours?
Any changes on the backend performance?


RE: New MythTV add-on using libcmyth - simora - 2013-02-16

So that is that. I believe I may have changed the permissions... you mentioned that it may not have permission so I just went and chmod 755 everything even though xbmc runs as root.

[root@buildroot pvr.mythtv.cmyth]# pwd
/root/.xbmc/addons/pvr.mythtv.cmyth
[root@buildroot pvr.mythtv.cmyth]# ls -l
-rwxr-xr-x 1 root root 5423320 Feb 10 16:08 XBMC_MythTV_cmyth.pvr*
-rwxr-xr-x 1 root root 15116 Feb 10 16:08 addon.xml*
-rwxr-xr-x 1 root root 2197 Feb 10 16:08 changelog.txt*
-rwxr-xr-x 1 root root 54653 Feb 10 16:08 icon.png*
drwxr-xr-x 1 root root 8176 Feb 10 16:08 resources/
[root@buildroot pvr.mythtv.cmyth]#

there doesn't seem to be ldd on this image. I need to figure out where it went.


RE: New MythTV add-on using libcmyth - richardk - 2013-02-16

(2013-02-16, 00:11)cfetzer Wrote: You mean the master version? Can you quickly explain what you did? LiveTV for several hours?
Any changes on the backend performance?

No, this was on the latest debug version. I didn't watch Live TV, but I did play several recordings. The addon apparently died about 44 minutes into playing a recording. After capturing the log and restarting XBMC, I turned on debug logging and played the same recording with no errors. I'm currently playing another recording.

So far, mythbackend performance looks fine with this version of the addon. But, again, the excessive cpu load sometimes takes a while to show up. It looks like it's fixed, but I'm not sure I can say with certainty.


RE: New MythTV add-on using libcmyth - richardk - 2013-02-16

(2013-02-15, 23:50)richardk Wrote:
(2013-02-15, 00:59)cfetzer Wrote: @richardk:
I have pushed a small fix to master and to debug-backend-cpu that adjusts all tcp rcv buffers to a bigger value (128000).

I was seeing a socket error: "writeStringList: Error, No data written on writeBlock" on the backend and I think I've seen a similar one also in a log you posted.
Janbar told me that this error message usually goes hand in hand with a high load on the backend.

Therefore it could be somehow related to your problem. It would be nice if you could retest (if possible with both branches).
How is your experience currently without images. Did it fix the issue for you?

Thanks,
Christian

This version of the addon worked for several hours. Then I got a box that said:

The PVR backend does not support this action Check the l...
An unexpected error occurred. Try again later or check the l...

I captured the log, and it's here:

http://pastebin.com/aVZJSwaq

So far, I have not been able to replicate this error.

My MythTV backend has now been up for over 2.5 days, with pretty heavy use. CPU usage when playing a video has not increased. It's still 1.5% - 6%.

I have made certain that the only XBMC instance accessing the backend is running the non-image version of the addon. Approximately the last day of usage included the socket error fix. So I cannot be completely sure which change corrected the problem, but it does seem to be gone.

Again, it would be great if other folks who have experienced the elevated mythbackend cpu usage could test the changes. It's always a little dangerous to draw firm conclusions from a single test.


RE: New MythTV add-on using libcmyth - fetzerch - 2013-02-16

(2013-02-16, 01:21)simora Wrote: So that is that. I believe I may have changed the permissions... you mentioned that it may not have permission so I just went and chmod 755 everything even though xbmc runs as root.

[root@buildroot pvr.mythtv.cmyth]# pwd
/root/.xbmc/addons/pvr.mythtv.cmyth
[root@buildroot pvr.mythtv.cmyth]# ls -l
-rwxr-xr-x 1 root root 5423320 Feb 10 16:08 XBMC_MythTV_cmyth.pvr*
-rwxr-xr-x 1 root root 15116 Feb 10 16:08 addon.xml*
-rwxr-xr-x 1 root root 2197 Feb 10 16:08 changelog.txt*
-rwxr-xr-x 1 root root 54653 Feb 10 16:08 icon.png*
drwxr-xr-x 1 root root 8176 Feb 10 16:08 resources/
[root@buildroot pvr.mythtv.cmyth]#

there doesn't seem to be ldd on this image. I need to figure out where it went.

Hm that's really strange, so the file is there but it xbmc doesn't load it for some reason.
I asked for ldd because it could show you if the file is a correct shared library for your addon. objdump or any similar tool could work as well.

Does this XIOS distro that you are running have a support forum?
Could you try to ask them for help, especially how to build and install the xbmc-pvr-addons package.
Without knowing the platform I'm absolutely in the dark.

I can say for sure that it the addon itself works on arm linux. (tested a couple of weeks ago with openelec on the raspberry pi)

(2013-02-16, 16:46)richardk Wrote:
(2013-02-15, 23:50)richardk Wrote:
(2013-02-15, 00:59)cfetzer Wrote: @richardk:
I have pushed a small fix to master and to debug-backend-cpu that adjusts all tcp rcv buffers to a bigger value (128000).

I was seeing a socket error: "writeStringList: Error, No data written on writeBlock" on the backend and I think I've seen a similar one also in a log you posted.
Janbar told me that this error message usually goes hand in hand with a high load on the backend.

Therefore it could be somehow related to your problem. It would be nice if you could retest (if possible with both branches).
How is your experience currently without images. Did it fix the issue for you?

Thanks,
Christian

This version of the addon worked for several hours. Then I got a box that said:

The PVR backend does not support this action Check the l...
An unexpected error occurred. Try again later or check the l...

I captured the log, and it's here:

http://pastebin.com/aVZJSwaq

So far, I have not been able to replicate this error.

My MythTV backend has now been up for over 2.5 days, with pretty heavy use. CPU usage when playing a video has not increased. It's still 1.5% - 6%.

I have made certain that the only XBMC instance accessing the backend is running the non-image version of the addon. Approximately the last day of usage included the socket error fix. So I cannot be completely sure which change corrected the problem, but it does seem to be gone.

Again, it would be great if other folks who have experienced the elevated mythbackend cpu usage could test the changes. It's always a little dangerous to draw firm conclusions from a single test.

Thanks. In the meantime I have fixed the error message that you've been seeing. I got it as well after playing a recording that was marked as watched.
Could you do me a favor and run the master code with images enabled. I'd like to know if the buffer fix might have solved the issue already.
If not, I have another idea and will come back to you as soon as I have some code to try.

Thanks a lot! Christian


RE: New MythTV add-on using libcmyth - sfrooster - 2013-02-16

I just happened to pull and build latest from hit last night (I was previously running a version I built last Sunday). I installed it this morning and see previously nonexistent buffering issues. Two hardware identical machines, being fed the same recording from the same back end and the one built last Sunday does not stutter, but last night's does. It's reporting itself as 1.6.9.

Did I get a build I shouldn't have?


RE: New MythTV add-on using libcmyth - richardk - 2013-02-16

(2013-02-16, 20:38)sfrooster Wrote: I just happened to pull and build latest from hit last night (I was previously running a version I built last Sunday). I installed it this morning and see previously nonexistent buffering issues. Two hardware identical machines, being fed the same recording from the same back end and the one built last Sunday does not stutter, but last night's does. It's reporting itself as 1.6.9.

Did I get a build I shouldn't have?

I'm presumably running the same build (under Ubuntu), and I'm not seeing buffering.

I am seeing slightly higher cpu usage for mythbackend than I was with the non-image version -- 6% - 9% versus 3% - 6%, so probably nothing to worry about.


RE: New MythTV add-on using libcmyth - simora - 2013-02-16

@cfetzer

I am trying to build it into the image with the build tools and build environment buildroot uses. i'm building from opdenkamp's repo since it holds all the other pvr addons and it was recently bumped to 1.6.8 myth addon. Image for this box doesn't have ldd or objdump... i'm still trying to find a way to get it built into the image. Should be able to test it this evening and let you know what I find.


RE: New MythTV add-on using libcmyth - KeithLM - 2013-02-17

Every five minutes I see the following in my log:
Code:
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Information Channel - INFO131' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Cartoon Network' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'KDFIDT2 (KDFI-DT2)' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'TEAM HD 2' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'TEAM HD 3' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'TEAM HD 4' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'TEAM HD 5' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'NBC Olympic HD Basketball' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'NBC Olympic HD Soccer' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Cine Estelar' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'BBC America HD' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Local Origination - LOOR1003' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'NBC Olympic 3D' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Univision Deportes Network' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Cine Sony Television' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Music Choice: University' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'TV Guide Network HD' from client '1'
21:03:22 T:139818222741248    INFO: EPG - UpdateFromScraper - updating EPG for channel 'Local Origination - LOOR1767' from client '1'
21:03:22 T:139818583451392   DEBUG: CPVRTimers - Update - updating timers

These are all channels I don't have in my guide, and some, like the Olympic channels, probably don't exist anymore. Now I don't care too much about queries for these channels, but every five minutes? That seems odd. Anyone have any idea how I can stop that?


RE: New MythTV add-on using libcmyth - sfrooster - 2013-02-17

(2013-02-16, 22:44)richardk Wrote:
(2013-02-16, 20:38)sfrooster Wrote: I just happened to pull and build latest from hit last night (I was previously running a version I built last Sunday). I installed it this morning and see previously nonexistent buffering issues. Two hardware identical machines, being fed the same recording from the same back end and the one built last Sunday does not stutter, but last night's does. It's reporting itself as 1.6.9.

Did I get a build I shouldn't have?

I'm presumably running the same build (under Ubuntu), and I'm not seeing buffering.

I am seeing slightly higher cpu usage for mythbackend than I was with the non-image version -- 6% - 9% versus 3% - 6%, so probably nothing to worry about.

A full system reboot (including the back end) seems to have cleared up the stuttering. Back end usage also seems a little higher for me.

What do you mean about it being a non-image version?


RE: New MythTV add-on using libcmyth - simora - 2013-02-17

@cfetzer

Added opdenkamp pvr-addons repo to buildroot and built the image... all works fine. I wasn't building it right. That was my bad. The addon is pretty nice so far though. The EPG is fantastic. Good work.


RE: New MythTV add-on using libcmyth - sfrooster - 2013-02-17

(2013-02-17, 02:37)sfrooster Wrote:
(2013-02-16, 22:44)richardk Wrote:
(2013-02-16, 20:38)sfrooster Wrote: I just happened to pull and build latest from hit last night (I was previously running a version I built last Sunday). I installed it this morning and see previously nonexistent buffering issues. Two hardware identical machines, being fed the same recording from the same back end and the one built last Sunday does not stutter, but last night's does. It's reporting itself as 1.6.9.

Did I get a build I shouldn't have?

I'm presumably running the same build (under Ubuntu), and I'm not seeing buffering.

I am seeing slightly higher cpu usage for mythbackend than I was with the non-image version -- 6% - 9% versus 3% - 6%, so probably nothing to worry about.

A full system reboot (including the back end) seems to have cleared up the stuttering. Back end usage also seems a little higher for me.

What do you mean about it being a non-image version?

Scratch that. The stuttering came back with Live Tv. Backend cup was higher too. So I dropped back to my previous version and things are better.


RE: New MythTV add-on using libcmyth - fetzerch - 2013-02-17

(2013-02-17, 03:20)simora Wrote: @cfetzer

Added opdenkamp pvr-addons repo to buildroot and built the image... all works fine. I wasn't building it right. That was my bad. The addon is pretty nice so far though. The EPG is fantastic. Good work.

Good to hear!


RE: New MythTV add-on using libcmyth - simora - 2013-02-17

Are there config or make options to only build the myth addon from your repo so make install only installs the myth addon or atleast so I don't have to build all the other addons? Then I could stick your repo in and opdenkamp's and get the best of everything.


RE: New MythTV add-on using libcmyth - fetzerch - 2013-02-17

(2013-02-17, 13:12)simora Wrote: Are there config or make options to only build the myth addon from your repo so make install only installs the myth addon or atleast so I don't have to build all the other addons? Then I could stick your repo in and opdenkamp's and get the best of everything.

That again depends on the build system, maybe it's better to ask in the xbmc irc channel or in the linux specific help section of the forum.
Maybe something like "make -C lib/cmyth && make -C addons/pvr.mythtv.cmyth" works for you.

But are you using different pvr addons? If not, then you can just use our repository.
In addition we try to release fixes and new features more often now, so that using opdenkamps git repo might be fine for you as well.