Opened 15 years ago

Closed 14 years ago

#2670 closed defect (fixed)

shutdown won't be initialized any more, once "shut down"

Reported by: fux@… Owned by: paulh
Priority: minor Milestone: unknown
Component: mythtv Version: 0.20
Severity: low Keywords:
Cc: Ticket locked: no



once the master backend decided to shutdown my system, even if it actually didn't start down entirely, the master never reruns the preshutdown or shutdown-commands, although it schedules another "shutdown", when being idle again.

2006-11-09 11:11:00.995 10 secs left to system shutdown!
2006-11-09 11:11:10.043 0 secs left to system shutdown!
running /usr/local/sbin/preshutdown on pulp with
running /usr/local/sbin/mythtv-set-wol on pulp with  19:52 2006-11-09
2006-11-09 11:13:18.328 Slave backend: zoe no longer connected

this works well and actually only shuts down my slave backend, the master-server never gets shut down. now:

2006-11-09 16:06:29.100 10 secs left to system shutdown!
2006-11-09 16:06:39.143 0 secs left to system shutdown!
2006-11-09 16:09:18.189 Reschedule requested for id -1.

there are many new "system shutdown" events in the log, but non of them are calling the actuall shutdown command any more, which is a pitty.

In my setup the slave backend gets woken up by wol and records the showing I want to record it, but is never send to sleep again, I guess as the master itself thinks "he" or the slave is already in sleep/shutdown-mode.

Well if he really thinks this, he wouldn't have to reschedule those shutdown-sequences, so I presume, there is a bug, which prevents the server from actually shutting down the system more often than once.


I'm now restarting my backend every wol-call of the client, which can't be intentional by design :)

I know, this isn't the setup you intended to use the shutdown-wakeup-mechanism for but this is my usecase:

My master-backend runs 24/7 and I only want to boot the slave-backend once in a while, a record should take place: I use a "shutdown" command, which only shuts down the slave backend and the wakeup call is timed with a at-cmd-call and a corresponding etherwake-call to the slave.



Change History (2)

comment:1 Changed 14 years ago by paulh

Owner: changed from Isaac Richards to paulh

comment:2 Changed 14 years ago by paulh

Resolution: fixed
Status: newclosed

(In [13100]) Fix a problem with the current shutdown code in the scheduler where if for some reason ShutdownServer?() fails it gets into a limbo state and never recovers.

It will now wait for 60 seconds for the shutdown to complete and if it doesn't puts a warning in the log, resets the idle time and the shut down flag so the shutdown sequence will start again from the beginning.

It also adds some additional debugging to help to see what's going on during the shutdown sequence.

Fixes #2670.

Note: See TracTickets for help on using tickets.