Mailing List Archive

backend stops recording after many days
I have looked though the logs but nothing has jumped out at me...

After some number of days, mythbakend just stops recording. Nothing shows
in the "Upcoming recordings". The frontend continues to work as expected
for existing recordings and videos.

When I restart the backend (systemctl restart mythbackend) it takes 30+
seconds which is way longer than usual, but once it does, recordings resume
as expected.

I'm not really sure where to start.

# mythbackend --version
Please attach all output as a file in bug reports.
MythTV Version : v0.28.1-21-ge26a33c
MythTV Branch : fixes/0.28
Network Protocol : 88
Library API : 0.28.20161120-1
QT Version : 5.7.1
Options compiled in:
linux release use_hidesyms using_alsa using_oss using_pulse
using_pulseoutput using_backend using_bindings_perl using_bindings_python
using_bindings_php using_crystalhd using_dvb using_firewire using_frontend
using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv
using_joystick_menu using_libcec using_libcrypto using_libdns_sd
using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl
using_opengl_video using_opengl_themepainter using_qtwebkit using_qtscript
using_qtdbus using_taglib using_v4l2 using_x11 using_xrandr using_xv
using_systemd_notify using_bindings_perl using_bindings_python
using_bindings_php using_freetype2 using_mythtranscode using_opengl
using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass
using_libxml2

Thanks,
Richard
Re: backend stops recording after many days [ In reply to ]
On 07/02/2017 06:32 PM, Richard Shaw wrote:
> I have looked though the logs but nothing has jumped out at me...
>
> After some number of days, mythbakend just stops recording. Nothing
> shows in the "Upcoming recordings". The frontend continues to work as
> expected for existing recordings and videos.
>
> When I restart the backend (systemctl restart mythbackend) it takes
> 30+ seconds which is way longer than usual, but once it does,
> recordings resume as expected.
>
> I'm not really sure where to start.
>
> # mythbackend --version
> Please attach all output as a file in bug reports.
> MythTV Version : v0.28.1-21-ge26a33c
> MythTV Branch : fixes/0.28
> Network Protocol : 88
> Library API : 0.28.20161120-1
> QT Version : 5.7.1
> Options compiled in:
> linux release use_hidesyms using_alsa using_oss using_pulse
> using_pulseoutput using_backend using_bindings_perl
> using_bindings_python using_bindings_php using_crystalhd using_dvb
> using_firewire using_frontend using_hdhomerun using_vbox using_ceton
> using_hdpvr using_ivtv using_joystick_menu using_libcec
> using_libcrypto using_libdns_sd using_libfftw3 using_libxml2
> using_lirc using_mheg using_opengl using_opengl_video
> using_opengl_themepainter using_qtwebkit using_qtscript using_qtdbus
> using_taglib using_v4l2 using_x11 using_xrandr using_xv
> using_systemd_notify using_bindings_perl using_bindings_python
> using_bindings_php using_freetype2 using_mythtranscode using_opengl
> using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass
> using_libxml2
>
> Thanks,
> Richard
>
>
This is a question for the mythtv-users@mythtv.org mailing list.
Re: backend stops recording after many days [ In reply to ]
On Sun, Jul 2, 2017 at 4:33 PM Richard Shaw <hobbes1069@gmail.com> wrote:

> I have looked though the logs but nothing has jumped out at me...
>
> After some number of days, mythbakend just stops recording. Nothing shows
> in the "Upcoming recordings". The frontend continues to work as expected
> for existing recordings and videos.
>
> When I restart the backend (systemctl restart mythbackend) it takes 30+
> seconds which is way longer than usual, but once it does, recordings resume
> as expected.
>
> I'm not really sure where to start.
>

What are you using for guide data? It almost sounds like a "resched" is
never happening for you. Mythbackend, itself, does not automatically run
the scheduler to populate the upcoming recordings. That is left the
whatever is handling populating the guide data.

Next time it happens, see if "mythutil --resched" "fixes" the problem.

John
Re: backend stops recording after many days [ In reply to ]
On Sun, Jul 2, 2017 at 7:06 PM, Peter Bennett <pgbennett@comcast.net> wrote:

> This is a question for the mythtv-users@mythtv.org mailing list.
>

I thought about that, but I have been using MythTV since 2012 at least and
I don't believe it's a configuration issue since I have not made any
intentionally setting changes. It may or may not be a "bug" but something
isn't right.

Richard
Re: backend stops recording after many days [ In reply to ]
On 03/07/17 13:10, Richard Shaw wrote:
> On Sun, Jul 2, 2017 at 7:06 PM, Peter Bennett <pgbennett@comcast.net
> <mailto:pgbennett@comcast.net>> wrote:
>
> This is a question for the mythtv-users@mythtv.org
> <mailto:mythtv-users@mythtv.org>mailing list.
>
>
> I thought about that, but I have been using MythTV since 2012 at least
> and I don't believe it's a configuration issue since I have not made any
> intentionally setting changes. It may or may not be a "bug" but
> something isn't right.
>

I only get this if my dvb stick gets wedged and needs hard resetting.
I have to check dmesg to see if things have gone south when this
happens.

Regards
Stuart
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: backend stops recording after many days [ In reply to ]
This bug has been plaguing me for at least ten years. I don't use any
guide data.
I manually set up all of my recordings, usually on a once per week
basis. The
two news programs I watch get recorded on a daily basis.

The time until failure varies greatly, but I'd estimate that it
happens at least
once every 3 weeks. Every day, I check to see the Upcoming Recording list.
When I find that there are items missing, I stop and restart the backend.
All the missing recordings appear after doing this.

I suspect that whatever data structure is used to keep track of upcoming
recordings get corrupted over time. Maybe it's missing semaphore protection
when one thread is adding and another is deleting at the same time?

It's hard to come up with a scheme to catch the bug because it takes a
fairly long time to reproduce.

- Steve


On 07/02/2017 07:27 PM, John P Poet wrote:
> On Sun, Jul 2, 2017 at 4:33 PM Richard Shaw <hobbes1069@gmail.com
> <mailto:hobbes1069@gmail.com>> wrote:
>
> I have looked though the logs but nothing has jumped out at me...
>
> After some number of days, mythbakend just stops recording.
> Nothing shows in the "Upcoming recordings". The frontend continues
> to work as expected for existing recordings and videos.
>
> When I restart the backend (systemctl restart mythbackend) it
> takes 30+ seconds which is way longer than usual, but once it
> does, recordings resume as expected.
>
> I'm not really sure where to start.
>
>
> What are you using for guide data? It almost sounds like a "resched"
> is never happening for you. Mythbackend, itself, does not
> automatically run the scheduler to populate the upcoming recordings.
> That is left the whatever is handling populating the guide data.
>
> Next time it happens, see if "mythutil --resched" "fixes" the problem.
>
> John
>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Re: backend stops recording after many days [ In reply to ]
Ok, new data points...

I have verified that mythfilldatabase is running. It does the whole
"Attempting to contact master backend for rescheduling" which doesn't seem
to do anything.

I have also run mythutil --resched manually over the last couple of days
and nothing changes. Even though I had guide data passing 7/15, that's the
last date anything was set to record.

I just restarted mythbackend, which took way longer than it should (but has
been the usual lately) and now I have recordings scheduled through 7/18.

Where to I look now?

Thanks,
Richard
Re: backend stops recording after many days [ In reply to ]
On 2017-07-03 14:24, Stuart Auchterlonie wrote:
> On 03/07/17 13:10, Richard Shaw wrote:
>> On Sun, Jul 2, 2017 at 7:06 PM, Peter Bennett <pgbennett@comcast.net
>> <mailto:pgbennett@comcast.net>> wrote:
>>
>> This is a question for the mythtv-users@mythtv.org
>> <mailto:mythtv-users@mythtv.org>mailing list.
>>
>>
>> I thought about that, but I have been using MythTV since 2012 at least
>> and I don't believe it's a configuration issue since I have not made any
>> intentionally setting changes. It may or may not be a "bug" but
>> something isn't right.
>>
>
> I only get this if my dvb stick gets wedged and needs hard resetting.
> I have to check dmesg to see if things have gone south when this
> happens.
>

i have a similar problem but it is related to the ca module not getting
setup or reset properly.
every single time i restart my backend computer i have to do the following:
open mythfrontend and make sure it is tuned to a channel that always
transmitts, no picture shows up, then pull out ca module and reinsert,
wait a little while and picture comes up just fine and everything works
perfectly until next reboot.

has been like this for years

so perhaps the person that had the problem also have a ca module that
gets stuck.
if i tune to a channel that don't always transmit it tends to get stuck
semi randomly and i will get zero length recordings.

a simple ca reset at the right spot is almost guaranteed to fix it, was
experimenting with just this a long time ago but never figured out where
to put it in the mythtv code and how to wire up the reset.

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: backend stops recording after many days [ In reply to ]
Well, I filed a ticket, we'll see what happens.

https://code.mythtv.org/trac/ticket/13062#ticket

Thanks,
Richard
backend stops recording after many days [ In reply to ]
One of my backends (28fixes -mythbuntu installed about a year ago) is
configured without a grabber and does not repopulate upcoming recordings.
Each time one of the manual timers triggers, the upcoming recordings are
decreased by one until ~2 weeks later there are no upcoming recordings.

I observed that upcoming recordings were repopulated:

-on a rerun of mythfilldatabase,

-if a new timer is saved.

-one of the existing timers is resaved.

I now run a chron tab.


Wayne
Re: backend stops recording after many days [ In reply to ]
On 07/14/2017 09:34 AM, M D wrote:
>
> One of my backends (28fixes -mythbuntu installed about a year ago) is
> configured without a grabber and does not repopulate upcoming
> recordings. Each time one of the manual timers triggers, the upcoming
> recordings are decreased by one until ~2 weeks later there are no
> upcoming recordings.
>
> I observed that upcoming recordings were repopulated:
>
> -on a rerun of mythfilldatabase,
>
> -if a new timer is saved.
>
> -one of the existing timers is resaved.
>
> I now run a chron tab.
>
>
>
Does mythutil --resched repopulate them?
backend stops recording after many days [ In reply to ]
On 07/14/2017 09:34 AM, M D wrote:
>
> *One of my backends (28fixes -mythbuntu installed about a year ago) is *
> *configured without a grabber and does not repopulate upcoming *
> *recordings. Each time one of the manual timers triggers, the upcoming *
> *recordings are decreased by one until ~2 weeks later there are no *
> *upcoming recordings.*
>
> *I observed that upcoming recordings were repopulated:*
>
> *-on a rerun of mythfilldatabase,*
>
> *-if a new timer is saved.*
>
> *-one of the existing timers is resaved.*
>
> *I now run a chron tab.*
>
>
>
Does mythutil --resched repopulate them?

Just tried. Closed/reopened front end. No it did not.
Re: backend stops recording after many days [ In reply to ]
On Fri, Jul 14, 2017 at 9:48 AM, M D <weworama@gmail.com> wrote:

> On 07/14/2017 09:34 AM, M D wrote:
> >
> > *One of my backends (28fixes -mythbuntu installed about a year ago) is *
> > *configured without a grabber and does not repopulate upcoming *
> > *recordings. Each time one of the manual timers triggers, the upcoming *
> > *recordings are decreased by one until ~2 weeks later there are no *
> > *upcoming recordings.*
> >
> > *I observed that upcoming recordings were repopulated:*
> >
> > *-on a rerun of mythfilldatabase,*
> >
> > *-if a new timer is saved.*
> >
> > *-one of the existing timers is resaved.*
> >
> > *I now run a chron tab.*
> >
> >
> >
> Does mythutil --resched repopulate them?
>
> Just tried. Closed/reopened front end. No it did not.
>


https://code.mythtv.org/trac/ticket/13062

Thanks,
Richard
backend stops recording after many days [ In reply to ]
My version info with some outputs are below in case they might be of use.

OS/Myth originally installed January-February 2016, with the last real
upgrade January 11/17 ( v0.28-104-g3930f5d - full data below).

It has always shown this behavior [but with no grabbers - that likely could
be expected].


> Richard Shaw hobbes1069 at gmail.com
> Wed Jul 5 19:15:12 UTC 2017

> I have verified that mythfilldatabase is running. It does the whole
> "Attempting to contact master backend for rescheduling" which doesn't seem
> to do anything.

With my setup, mythfilldatabase doesn't say it updates timers other than
"Attempting...", but the next time it runs (or if one looks at upcoming
recordings in the FE) it does show timers have been repopulated. After
running it today it has timers from Jul16 to Jul28.

Mythfilldatabase output appears to report different numerical values
between a terminal run (episodes) than from a BElog (items). I did change
and add a daily timer later on 2017-07-15; currently there are 2 weekly
timers and 2 daily.



Wayne




Linux machinename 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC
2017 x86_64 x86_64 x86_64 GNU/Linu

MythTV Version :
v0.28-104-g3930f5d

MythTV Branch :
fixes/0.28

Network Protocol :
88

Library API :
0.28.20161120-1

QT Version :
5.5.1

Options compiled
in:

linux profile use_hidesyms using_alsa using_oss using_pulse
using_pulseoutput using_backend using_bindings_perl using_bindings_python
using_bindings_php using_crystalhd using_dvb using_firewire using_frontend
using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv
using_joystick_menu using_libcec using_libcrypto using_libdns_sd
using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl
using_opengl_video using_opengl_themepainter using_qtwebkit using_qtscript
using_qtdbus using_sdl using_taglib using_v4l2 using_x11 using_xrandr
using_xv using_profiletype using_bindings_perl using_bindings_python
using_bindings_php using_freetype2 using_mythtranscode using_opengl
using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass
using_libxml2

From a terminal
2017-07-15 10:14:38.564476 C mythfilldatabase version: fixes/0.28
[v0.28-104-g3930f5d] www.mythtv.org
2017-07-15 10:14:38.564508 C Qt version: compile: 5.5.1, runtime: 5.5.1
2017-07-15 10:14:38.564514 N Enabled verbose msgs: general
2017-07-15 10:14:38.564529 N Setting Log Level to LOG_INFO
2017-07-15 10:14:38.578787 I Added logging to the console
2017-07-15 10:14:38.579226 I Setup Interrupt handler
2017-07-15 10:14:38.579238 I Setup Terminated handler
2017-07-15 10:14:38.579245 I Setup Segmentation fault handler
2017-07-15 10:14:38.579255 I Setup Aborted handler
2017-07-15 10:14:38.579262 I Setup Bus error handler
2017-07-15 10:14:38.579271 I Setup Floating point exception handler
2017-07-15 10:14:38.579279 I Setup Illegal instruction handler
2017-07-15 10:14:38.579290 I Setup Real-time signal 0 handler
2017-07-15 10:14:38.579302 I Setup Hangup handler
2017-07-15 10:14:38.579428 N Using runtime prefix = /usr
2017-07-15 10:14:38.579432 N Using configuration directory =
/home/xxxx/.mythtv
2017-07-15 10:14:38.579522 I Assumed character encoding: en_CA.UTF-8
2017-07-15 10:14:38.579829 N Empty LocalHostName.
2017-07-15 10:14:38.579836 I Using localhost value of xxxx
2017-07-15 10:14:38.639219 N Setting QT default locale to en_CA
2017-07-15 10:14:38.639233 I Current locale en_CA
2017-07-15 10:14:38.639275 N Reading locale defaults from
/usr/share/mythtv//locales/en_ca.xml
2017-07-15 10:14:38.645944 I Loading en_ca translation for module
mythfrontend
2017-07-15 10:14:38.647084 I Current MythTV Schema Version (DBSchemaVer):
1344
2017-07-15 10:14:38.649468 I MythCoreContext::ConnectCommandSocket():
Connecting to backend server: xx..xx.xx.xx:6543 (try 1 of 1)
2017-07-15 10:14:38.650994 I MythCoreContext::CheckProtoVersion(): Using
protocol version 88 XmasGift
2017-07-15 10:14:38.651251 I Opening blocking connection to master backend
2017-07-15 10:14:38.652342 I Source 1 configured with no grabber. Nothing
to do.
2017-07-15 10:14:38.654291 N Data fetching complete.
2017-07-15 10:14:38.654312 I Adjusting program database end times.
2017-07-15 10:14:38.669433 I 0 replacements made
2017-07-15 10:14:38.669442 I Marking generic episodes.
2017-07-15 10:14:38.669938 I Found 0
2017-07-15 10:14:38.669942 I Extending non-unique programids with multiple
parts.
2017-07-15 10:14:38.670375 I Found 0
2017-07-15 10:14:38.670380 I Fixing missing original airdates.
2017-07-15 10:14:38.670897 I Found 0 with programids
2017-07-15 10:14:38.671450 I Found 0 without programids
2017-07-15 10:14:38.671455 I Marking repeats.
2017-07-15 10:14:38.672521 I Found 0
2017-07-15 10:14:38.672528 I Unmarking new episode rebroadcast repeats.
2017-07-15 10:14:38.672754 I Found 0
2017-07-15 10:14:38.673447 I Marking episode first showings.
2017-07-15 10:14:38.682474 I Found 53
2017-07-15 10:14:38.682499 I Marking episode last showings.
2017-07-15 10:14:38.686401 I Found 53
2017-07-15 10:14:38.687382 I

on a second run

snip
2017-07-15 10:25:08.435869 I Marking episode first showings.
2017-07-15 10:25:08.440012 I Found 67
2017-07-15 10:25:08.440021 I Marking episode last showings.
2017-07-15 10:25:08.444199 I Found 67
2017-07-15 10:25:08.445121 I | Attempting etc



A piece from the backend log from a reboot/restartBE + filldatabase today.

Jul 16 11:24:56 machinename mythbackend: mythbackend[1402]: I
ProcessRequest mainserver.cpp:1735 (HandleAnnounce) MainServer: adding:
machinename(e0c1e0) as a client (events: 0)
Jul 16 11:24:56 machinename mythbackend: mythbackend[1402]: I
ProcessRequest mainserver.cpp:1730 (HandleAnnounce) MainServer:
MainServer::ANN Monitor
Jul 16 11:24:56 machinename mythbackend: mythbackend[1402]: I
ProcessRequest mainserver.cpp:1735 (HandleAnnounce) MainServer: adding:
machinename(e12c70) as a client (events: 1)
Jul 16 11:25:40 machinename mythbackend: mythbackend[1402]: I
MythSocketThread(64) mainserver.cpp:7656 (connectionClosed) Monitor
sock(e12c70) 'machinename' disconnected
Jul 16 11:25:40 machinename mythbackend: mythbackend[1402]: I
MythSocketThread(52) mainserver.cpp:7656 (connectionClosed) Monitor
sock(e0c1e0) 'machinename' disconnected
Jul 16 11:25:52 machinename mythbackend: mythbackend[1402]: I
ProcessRequest mainserver.cpp:1730 (HandleAnnounce) MainServer:
MainServer::ANN Playback
Jul 16 11:25:52 machinename mythbackend: mythbackend[1402]: I
ProcessRequest mainserver.cpp:1735 (HandleAnnounce) MainServer: adding:
machinename(e0cab0) as a client (events: 0)
Jul 16 11:25:52 machinename mythbackend: mythbackend[1402]: I Scheduler
scheduler.cpp:2263 (HandleReschedule) Reschedule requested for MATCH 0 0 0
- HandleRescheduleRecordings
Jul 16 11:25:52 machinename mythbackend: mythbackend[1402]: I Scheduler
scheduler.cpp:2376 (HandleReschedule) Scheduled 47 items in 0.1 = 0.03
match + 0.01 check + 0.02 place
Jul 16 11:25:52 machinename mythbackend: mythbackend[1402]: I
MythSocketThread(51) mainserver.cpp:7656 (connectionClosed) Playback
sock(e0cab0) 'machinename' disconnected


From the terminal output of mythfilldatabase after the reboot.

snip
2017-07-16 11:33:52.576259 I Marking episode first showings.
2017-07-16 11:33:52.581208 I Found 84
2017-07-16 11:33:52.581220 I Marking episode last showings.
2017-07-16 11:33:52.586275 I Found 84
etc