﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
7752	mythshutdown sometimes doesn't shut down	Petr Stehlik <pstehlik@…>	Isaac Richards	"Using up-to-date mythtv 0.22-fixes. Sometimes mythshutdown (started from mythbackend) doesn't shut the machine down. Not sure when and why. I have disabled active EIT recently but it didn't help, see the following mythbackend log from yesterday night:
{{{
2009-12-13 22:53:03.313 I'm idle now... shutdown will occur in 60 seconds.
2009-12-13 22:53:05.988 AFD: Opened codec 0x9b8bcf0, id(MPEG2VIDEO) type(Video)
2009-12-13 22:53:05.992 AFD: codec MP2 has 2 channels
2009-12-13 22:53:06.001 AFD: Opened codec 0x9b8c460, id(MP2) type(Audio)
2009-12-13 22:53:07.032 Preview: Grabbed preview '/myth/tv/14138_20091213200000.mpg' 720x576@600s
2009-12-13 22:54:04.170 MainServer::ANN Monitor
2009-12-13 22:54:04.176 adding: htpc as a client (events: 0)
2009-12-13 22:54:04.178 MainServer::ANN Monitor
2009-12-13 22:54:04.196 adding: htpc as a client (events: 1)
2009-12-13 22:54:04.272 CheckShutdownServer returned - OK to shutdown
2009-12-13 22:54:04.280 Running the command to set the next scheduled wakeup time :-
                                                mythshutdown --setwakeup 2009-12-14T09:13:00
2009-12-13 22:54:04.487 Running the command to shutdown this computer :-
                                                mythshutdown --shutdown
2009-12-13 22:56:01.088 UPnpMedia: BuildMediaMap VIDEO scan starting in :/myth/video:
2009-12-13 22:56:01.804 UPnpMedia: BuildMediaMap Done. Found 580 objects
...
}}}

Yesterday at 22:54:04 it should have shut down. 24 hours later the running processes are (ps ax | grep myth):
{{{
 2912 ?        Ssl    6:59 /usr/local/myth/bin/mythbackend -d -l /var/log/mythtv/mythbackend.log
 4783 ?        SNl    0:00 mythshutdown --shutdown
21734 ?        Sl     0:07 mythwelcome
}}}

If, in this state, I run the mythshutdown -q manually it does shut down properly.
What's bad is that when it's in this zombie state it doesn't record anything like if scheduling was disabled. The MythWelcome even shows that next recording will start this morning which was 10 hours ago. So the backend is sort of unusable and needs to be restarted to get things recording again.
"	defect	closed	minor	unknown	MythTV - General	unknown	medium	fixed			0
