[mythtv] Commercial flagging, shutdowns & lost recordings

Paul Harrison mythtv at dsl.pipex.com
Sun Feb 5 11:30:44 UTC 2006

----- Original Message ----- 
From: "Matthew Carle" <matthew_carle at hotmail.com>
To: "'Development of mythtv'" <mythtv-dev at mythtv.org>
Sent: Sunday, February 05, 2006 3:54 AM
Subject: Re: [mythtv] Commercial flagging, shutdowns & lost recordings

>Thanks Paul,

>It sounds like that should stop the problem. Does the 'Pre shutdown check
>command' continue to run while waiting for shutdown (eg every 10 secs) or
>does it just run either when first idle or when starting the shutdown? 

Basically the shutdown sequence goes something like this :- The backend
is constantly checking for active connections i.e. it has frontends connected. 
When all active connections are closed and it is not recording or about to start
recording it starts the shutdown count down sequence. The last thing it does 
before actually shutting down is call the 'Pre Shutdown check command'  this 
is the last chance for the shutdown to be cancelled. If the script returns 0 the 
shutdown continues, 1 the shutdown is aborted - the backend starts the 
checking for active connection loop again, 2 - the backend waits for an active 
connection again before starting the checks again.

>The current behaviour still seems quite strange to me. I can't see why it
>doesn't already abort the shutdown count down if a commflag or transcode is
>running (and yet it seems to abort shutdown at the last minute - but not
>restart the countdown). Maybe there is something I am missing.

The backend doesn't know that commflag or transcode is running so once it is idle
it starts the shutdown countdown regardless. Only the 'Pre shutdown check 
command' can stop it at this point.  

There was a bug,  may still be in current svn not sure,  in the shutdown stuff 
where the backend assumes the 'server halt command' succeeded. If it fails the backend
gets stuck in a limbo state and never restarts the shutdown sequence which it looks like 
what happened to your system. On a properly configured system it should never be a 

>I had a read about mythwelcome/mythshutdown. Am I correct in thinking that
>mythshutdown just manages nvram-wakeup and the system shutdown -
>(mythbackend still checks to see if the system is idle)?


>I look forward to being able to use 'mythshutdown --check' in 0.19 -
>hopefully it's not too long away now.


Paul H.

More information about the mythtv-dev mailing list