/usr/bin/mythshutdown --shutdown not working

Bug #594956 reported by Oliver Schade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mythbuntu
Expired
Medium
Unassigned

Bug Description

Dear Team,

yet another bug on my system - fresh install of 10.04, using mythwelcome on a combined Backend/Frontend.

Once or twice a day mythshutdown is not able to shutdown the system after a recording. mythwelcome,
shutdown command is set to "sudo /usr/bin/mythshutdown --shutdown".

Manually calling this command on a console results sometimes in the following output:

--- snip ---
os@mythtv-livingroom:~$ sudo /usr/bin/mythshutdown --shutdown
Cannot login to database?

Would you like to configure the database connection now? [no]
[console is not interactive, using default ´no´]
mythshutdown: Could not initialize myth context, Exiting.
--- snip ---

Database and backend use a private IP address (192.168.), not loopback device as the backend serves
other frontends as well. The network cable runs to a switch. Network chipset is a r8149.

I have no idea/clue what this error is about, but it prevents mythwelcome/mythshutdown to shutdown the
system back thus eating power forever.

This error happens only ever 5-8 time - in all other cases mythwelcome shuts down the system as requested.

Any tips?

Revision history for this message
Thomas Mashos (tgm4883) wrote :

This might be related to #574877. Can you update to 0.23.0+fixes25111 using auto-builds and see if the issue is resolved?

Revision history for this message
Oliver Schade (oliver-schade) wrote :

Hi Thomas,

thanks for the hint. I have updated to 0.23.0+fixes25111 as requested and will verify the result during
the next two days (system is recording for the next few hours so I cannot just reboot).

Thanks, Oliver

Revision history for this message
Oliver Schade (oliver-schade) wrote :

Negative, no solution.

After 5 reboots in a row, first the NVIDIA module complained being unable to initialize.
After a reboot the system no longer is able to shutdown:

2010-06-17 07:17:37.869 MainServer::ANN Monitor
2010-06-17 07:17:37.870 adding: mythtv-livingroom as a client (events: 1)
Cannot login to database?
Would you like to configure the database connection now? [no]
[console is not interactive, using default 'no']
mythshutdown: Could not initialize myth context. Exiting.
QSqlDatabasePrivate::removeDatabase: connection 'DBManager0' is still in use, all queries will cease to work.
2010-06-17 07:17:41.126 Reschedule requested for id -1.

Thanks, Oliver

Revision history for this message
Oliver Schade (oliver-schade) wrote :

Output of "sudo /usr/bin/mythshutdown -v all -x" (truncated) after the machine did not shutdown automatically:

[...]
2010-06-17 15:36:38.732 MSqlQuery::exec(DBManager0) SELECT data FROM settings WHERE value = 'mythshutdownwakeuptimefmt' AND hostname = 'mythtv-livingroom' <<<< Returns 1 row(s)
2010-06-17 15:36:38.732 MSqlQuery::next(DBManager0) Result: "data = time_t"
2010-06-17 15:36:38.732 sending command to set time in bios
                        /usr/bin/MythSetWake.sh 1276793010
2010-06-17 15:36:38.736 /usr/bin/MythSetWake.sh 1276793010 exited with code 0
2010-06-17 15:36:38.736 everything looks fine, shutting down ...
2010-06-17 15:36:38.736 MSqlQuery::exec(DBManager1) SELECT data FROM settings WHERE value = 'mythshutdownpoweroff' AND hostname = 'mythtv-livingroom' <<<< Returns 1 row(s)
2010-06-17 15:36:38.736 MSqlQuery::next(DBManager1) Result: "data = sudo /usr/bin/mythshutdown -x"
2010-06-17 15:36:38.736 ..
2010-06-17 15:36:38.736 .
2010-06-17 15:36:38.736 shutting down ...
2010-06-17 15:36:44.991 Got data on select
2010-06-17 15:36:44.991 Processing ready reads
2010-06-17 15:36:44.991 MythSocketThread(sock 0x1f7b8c0:9): socket is readable
2010-06-17 15:36:44.991 MythSocketThread(sock 0x1f7b8c0:9): calling m_cb->readyRead()
2010-06-17 15:36:44.991 MythSocket(1f7b8c0:9): readBlock(0x140072842169784, 8) called
2010-06-17 15:36:44.991 MythSocket(1f7b8c0:9): readBlock(0x140072842168616, 51) called
2010-06-17 15:36:44.991 MythSocket(1f7b8c0:9): read <- 9 51 BACKEND_MESSAGE[]:[]SHUTDOWN_COUNTDOWN 10[]:[]empty
2010-06-17 15:36:44.991 MythEvent: SHUTDOWN_COUNTDOWN 10
2010-06-17 15:36:44.991 MythSocketThread: Total read time: 0ms, on sockets {9,0ms}
2010-06-17 15:36:44.991 Reacquired ready read lock
2010-06-17 15:36:44.992 ProcessAddRemoveQueues
2010-06-17 15:36:44.992 Construct FD_SET
2010-06-17 15:36:44.992 Waiting on select..
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
sh: /usr/bin/nvram-wakeup: not found
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open

Broadcast message from root@mythtv-livingroom
        (unknown) at 15:36 ...

The system is going down for power off NOW!

--- snip ---

No idea why /usr/bin/nvram-wakeup is being called, it's not in my mythbackend nor in mythwelcome
configuration.

Put the multiple database not open messages are concerning, are they not?

Thanks, Oliver

Revision history for this message
Oliver Schade (oliver-schade) wrote :

Followed http://www.gossamer-threads.com/lists/mythtv/dev/317005

and added "env_keep=HOME" to the end of my Defaults line in the sudoers file.

Looks like a solution - 10 reboots so far and no issues with shutdowns.

Thomas Mashos (tgm4883)
Changed in mythbuntu:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Thomas Mashos (tgm4883) wrote :

We really do appreciate you opening this ticket to help improve Mythbuntu, but it needs to be closed for a number of reasons. The biggest one is that upstream has moved on to a new version and believes this to be fixed. Could you please verify if this issue still exists in the latest version?

Please do not let the closing of this ticket dissuade you from opening a new ticket if this (or any other) problem occurs with the newer versions.

Changed in mythbuntu:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.