[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mythtv-users
Subject:    Re: [mythtv-users] unstable backend
From:       Mark Perkins <perkins1724 () hotmail ! com>
Date:       2017-04-22 23:15:03
Message-ID: ME1PR01MB141096427CB2D662E155AB0BB71D0 () ME1PR01MB1410 ! ausprd01 ! prod ! outlook ! com
[Download RAW message or body]

On 22 April 2017 9:28:07 AM Gabe Rubin \
<gaberubin@gmail.com><mailto:gaberubin@gmail.com> wrote:

> On Fri, Apr 21, 2017 at 2:48 PM, Mark Perkins \
> <perkins1724@hotmail.com><mailto:perkins1724@hotmail.com> wrote:
> 
> > On 22 April 2017 4:01:49 AM Gabe Rubin \
> > <gaberubin@gmail.com><mailto:gaberubin@gmail.com> wrote: 
> > > I will look into fixing journal.  Meanwhile, I am still getting fluky
> > > issues where the my recordings are empty.  I put my backend log here:
> > > https://pastebin.com/ZaB2Jxqa
> > > 
> > > It looks like there are some issues, but I am unable to identify/diagnose
> > > them.  Again, any help would be greatly appreciated.
> > > 
> > > 
> > > 
> > 
> > I had a quick scan through your log file but only saw one recording which
> > appeared to be successful, was it in fact zero bytes ( "60 Days
> > In":"Atlanta: Bloods Rising" ) ?
> > 
> > Otherwise you have a number of existing orphaned recording entries where
> > the BE is looking for files but can't find them. I have previously found
> > that they can cause odd behaviour in places so it might be worth running
> > find_orphans.py to clear them out.
> > 
> > There was one warning about a slow write but I wouldnt particularly worry
> > about it unless you got a lot of them ( TFWWrite threadedfilewriter.cpp:571
> > (DiskLoop) - TFW(/storage/recordings/2190_20170421040000.ts:61):
> > write(65424) cnt 35 total 2220656 -- took a long time, 2934 ms ).
> > 
> 
> I am discovering new issues.  I installed the find_orphans script and ran
> it.  I was able to remove some stuff, but when trying to remove orphaned
> videos and recordings, I get the following errors:
> 
> Traceback (most recent call last):
> File "./find_orphans.py", line 230, in <module>
> main()
> File "./find_orphans.py", line 214, in main
> opt[1](opt[2])
> File "./find_orphans.py", line 129, in delete_recs
> rec.delete(True, True)
> File "/usr/lib/python2.7/site-packages/MythTV/dataheap.py", line 365, in
> delete
> return self.getProgram().delete(force, rerecord)
> File "/usr/lib/python2.7/site-packages/MythTV/mythproto.py", line 960, in
> delete
> res = int(be.deleteRecording(self, force=force))
> ValueError: invalid literal for int() with base 10: ''

I'm don't know Python but one thing comes to mind. If you select an option that has a \
lot of changes it can take the BE a while to process it all. So if you refresh \
find_orphans.py while the BE is still churning away it might still find records that \
the BE is still processing. By the time you select the next option the BE state has \
changed and the result list is out of date so unexpected things may result. Try again \
after a couple of hours to see if you still get the same error.

Otherwise make sure the environment you are running find_orphans.py from is correct \
(ie maybe run as the user that is running your BE and / or make sure env variables \
are correct). I use something like this in my bash scripts, make sure to correct \
paths for your environment:

PATH=/usr/local/mythtv_0_28/bin:$PATH
LD_LIBRARY_PATH=/usr/local/mythtv_0_28/lib:$LD_LIBRARY_PATH
MYTHCONFDIR=$HOME/.mythtv_0_28/
PYTHONPATH=/usr/local/mythtv_0_28/lib/python2.7/site-packages

export PATH LD_LIBRARY_PATH MYTHCONFDIR PYTHONPATH


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div style="color: black;">
<p style="margin: 0 0 1em 0; color: black; font-family:
        sans-serif;">On 22 April 2017 9:28:07 AM Gabe Rubin
<a class="moz-txt-link-rfc2396E" \
href="mailto:gaberubin@gmail.com">&lt;gaberubin@gmail.com&gt;</a> wrote:</p> <p \
style="margin: 0 0 1em 0; color: black; font-family:  sans-serif;">&gt; On Fri, Apr \
21, 2017 at 2:48 PM, Mark Perkins <a class="moz-txt-link-rfc2396E" \
href="mailto:perkins1724@hotmail.com">&lt;perkins1724@hotmail.com&gt;</a><br> &gt; \
wrote:<br> &gt;<br>
&gt;&gt; On 22 April 2017 4:01:49 AM Gabe Rubin <a class="moz-txt-link-rfc2396E" \
href="mailto:gaberubin@gmail.com"> &lt;gaberubin@gmail.com&gt;</a> wrote:<br>
&gt;&gt;<br>
&gt;&gt; &gt; I will look into fixing journal.&nbsp; Meanwhile, I am still getting \
fluky<br> &gt;&gt; &gt; issues where the my recordings are empty.&nbsp; I put my \
backend log here:<br> &gt;&gt; &gt; <a \
href="https://pastebin.com/ZaB2Jxqa">https://pastebin.com/ZaB2Jxqa</a><br> &gt;&gt; \
&gt;<br> &gt;&gt; &gt; It looks like there are some issues, but I am unable to \
identify/diagnose<br> &gt;&gt; &gt; them.&nbsp; Again, any help would be greatly \
appreciated.<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; I had a quick scan through your log file but only saw one recording \
which<br> &gt;&gt; appeared to be successful, was it in fact zero bytes ( &quot;60 \
Days<br> &gt;&gt; In&quot;:&quot;Atlanta: Bloods Rising&quot; ) ?<br>
&gt;&gt;<br>
&gt;&gt; Otherwise you have a number of existing orphaned recording entries where<br>
&gt;&gt; the BE is looking for files but can't find them. I have previously found<br>
&gt;&gt; that they can cause odd behaviour in places so it might be worth running<br>
&gt;&gt; find_orphans.py to clear them out.<br>
&gt;&gt;<br>
&gt;&gt; There was one warning about a slow write but I wouldnt particularly \
worry<br> &gt;&gt; about it unless you got a lot of them ( TFWWrite \
threadedfilewriter.cpp:571<br> &gt;&gt; (DiskLoop) - \
TFW(/storage/recordings/2190_20170421040000.ts:61):<br> &gt;&gt; write(65424) cnt 35 \
total 2220656 -- took a long time, 2934 ms ).<br> &gt;&gt;<br>
&gt;<br>
&gt; I am discovering new issues.&nbsp; I installed the find_orphans script and \
ran<br> &gt; it.&nbsp; I was able to remove some stuff, but when trying to remove \
orphaned<br> &gt; videos and recordings, I get the following errors:<br>
&gt;<br>
&gt; Traceback (most recent call last):<br>
&gt;&nbsp;&nbsp; File &quot;./find_orphans.py&quot;, line 230, in &lt;module&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; main()<br>
&gt;&nbsp;&nbsp; File &quot;./find_orphans.py&quot;, line 214, in main<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; opt[1](opt[2])<br>
&gt;&nbsp;&nbsp; File &quot;./find_orphans.py&quot;, line 129, in delete_recs<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; rec.delete(True, True)<br>
&gt;&nbsp;&nbsp; File \
&quot;/usr/lib/python2.7/site-packages/MythTV/dataheap.py&quot;, line 365, in<br> \
&gt; delete<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; return self.getProgram().delete(force, \
rerecord)<br> &gt;&nbsp;&nbsp; File \
&quot;/usr/lib/python2.7/site-packages/MythTV/mythproto.py&quot;, line 960, in<br> \
&gt; delete<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; res = int(be.deleteRecording(self, \
force=force))<br> &gt; ValueError: invalid literal for int() with base 10: ''</p>
<p style="margin: 0 0 1em 0; color: black;">I'm don't know Python but one thing comes \
to mind. If you select an option that has a lot of changes it can take the BE a while \
to process it all. So if you refresh find_orphans.py while the BE is still churning \
away  it might still find records that the BE is still processing. By the time you \
select the next option the BE state has changed and the result list is out of date so \
unexpected things may result. Try again after a couple of hours to see if you still \
get the same  error. </p>
<p style="margin: 0 0 1em 0; color: black;">Otherwise make sure the environment you \
are running find_orphans.py from is correct (ie maybe run as the user that is running \
your BE and / or make sure env variables are correct). I use something like this in \
my  bash scripts, make sure to correct paths for your environment:</p>
<pre wrap="">PATH=/usr/local/mythtv_0_28/bin:$PATH
LD_LIBRARY_PATH=/usr/local/mythtv_0_28/lib:$LD_LIBRARY_PATH
MYTHCONFDIR=$HOME/.mythtv_0_28/
PYTHONPATH=/usr/local/mythtv_0_28/lib/python2.7/site-packages

export PATH LD_LIBRARY_PATH MYTHCONFDIR PYTHONPATH</pre>
</div>
</body>
</html>



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org

--===============6427327601294438059==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic