You are not logged in.

#1 2013-04-29 22:54:16

dafrizz
Member
Registered: 2011-05-27
Posts: 21

mythtv, auto shutdown no longer working, scheduler.cpp ?

Following a recent update the automatic shutdown of my backend is no longer working (well, at least not reliably).

I have 3 scripts set up in the relevant sections of the mythtv-setup to check if myth is ok to shut down, set the new wakeup time and perform the actual shutdown. These scripts still work alright, but the backend is not initiating the shutdown any more in some cases.

Lots of trial and error makes me think that this is somehow related to scheduler.cpp, but I am not sure if this is the case or how to fix it.

I think I have established a pattern:

Scenario 1:

- Boot backend

- do nothing else (e.g. start remote frontend or mythfrontend on the backend)

- automatic shutdown does not work

Scenario 2:

- Boot backend

- start remote frontend

- shut down frontend

- automatic shutdown does not work

- restart backend service (without reboot)

- automatic shutdown works

I also notice that in scenario 2 (when automatic shutdown works) there are a whole heap of these kind of messages right until shutdown occurs:

2013-04-29 19:18:07.592125 N [660/738] Expire autoexpire.cpp:641 (SendDeleteMessages) - Expiring 156 MB for 1073 at 2013-04-13T11:50:20Z => Hulk
2013-04-29 19:18:07.632899 E [660/660] CoreContext mainserver.cpp:2610 (DoHandleDeleteRecording) - ERROR when trying to delete file: myth://192.168.1.103:65103:6543/1070_20120126203445.mpg. File doesn't exist.  Database metadata will not be removed.
2013-04-29 19:18:07.889638 E [660/660] CoreContext mainserver.cpp:2610 (DoHandleDeleteRecording) - ERROR when trying to delete file: myth://192.168.1.103:65103:6543/1022_20120206192600.mpg. File doesn't exist.  Database metadata will not be removed.

In scenario 2 (successful) I see the following in the log just before the above auto expire stuff:

Scheduler scheduler.cpp:2307 (HandleRunSchedulerStartup) - Scheduler: Seem to be woken up by USER

then a whole heap of auto expiry stuff and finally:

Scheduler scheduler.cpp:2862 (CheckShutdownServer) - CheckShutdownServer returned - OK to shutdown
2013-04-29 19:19:55.276775 N [660/735] Scheduler scheduler.cpp:2947 (ShutdownServer) - Running the command to set the next scheduled wakeup time :-
                                                sudo /home/laffi/scripts/MythSetWakeup 1367229120
2013-04-29 19:19:55.372582 N [660/735] Scheduler scheduler.cpp:2974 (ShutdownServer) - Running the command to shutdown this computer :-
                                                sudo /home/laffi/scripts/MythShutdown

In scenario 1 (unsuccessfull shutdown) I also get

Scheduler scheduler.cpp:2307 (HandleRunSchedulerStartup) - Scheduler: Seem to be woken up by USER

and then autoexpiry, but then, once a frontend connects:

ProcessRequest mainserver.cpp:1385 (HandleAnnounce) - adding: frontend as a client (events: 0)

I don't get autoexpiry of files and no shutdown, both of which I believe are initiated by scheduler.cpp

I also noticed the following in the logs when auto shutdown does not work:

2013-04-29 15:40:36.046359 I [648/848] ProcessRequest mainserver.cpp:1385 (HandleAnnounce) - adding: mythbackend as a client (events: 1)

which does not seem to appear in the logs when auto shutdown works.

Any ideas ? I have found very little (next to none) regarding scheduler.cpp when searching.

Offline

Board footer

Powered by FluxBB