mythshutdown --unlock does not function anymore

Bug #1080366 reported by Stefan Pappalardo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Description: Ubuntu 12.04.1 LTS
Release: 12.04
mythtv-common:
  Installiert: 2:0.25.2+fixes.20120802.46cab93-0ubuntu1
  Kandidat: 2:0.25.2+fixes.20120802.46cab93-0ubuntu1
  Versionstabelle:
 *** 2:0.25.2+fixes.20120802.46cab93-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise-updates/multiverse amd64 Packages
        100 /var/lib/dpkg/status
     2:0.25.0+fixes.20120410.1f5962a-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/multiverse amd64 Packages

 ***

"mythshutdown --unlock" does not unlock anymore.

 ***

$ mythshutdown --unlock --verbose all
2012-11-18 15:59:39.419946 C mythshutdown version: fixes/0.25 [v0.25.2-15-g46cab93] www.mythtv.org
2012-11-18 15:59:39.419966 C Qt version: compile: 4.8.1, runtime: 4.8.1
2012-11-18 15:59:39.419972 N Enabled verbose msgs: all
2012-11-18 15:59:39.419991 N Setting Log Level to LOG_INFO
2012-11-18 15:59:39.420035 I Added logging to the console
2012-11-18 15:59:39.420043 I Added database logging to table logging
2012-11-18 15:59:39.420140 N Setting up SIGHUP handler
2012-11-18 15:59:39.420195 N Using runtime prefix = /usr
2012-11-18 15:59:39.420210 N Using configuration directory = /home/sjuk/.mythtv
2012-11-18 15:59:39.420296 E (old)Settings::ReadSettings(settings.txt) - No such file settings.txt
2012-11-18 15:59:39.420362 I Assumed character encoding: de_DE.UTF-8
2012-11-18 15:59:39.421398 E (old)Settings::ReadSettings(settings.txt) - No such file settings.txt
2012-11-18 15:59:39.421455 E (old)Settings::ReadSettings(/usr/share/mythtv/mysql.txt) - No such file /usr/share/mythtv/mysql.txt
2012-11-18 15:59:39.421489 E (old)Settings::ReadSettings(/usr/etc/mythtv/mysql.txt) - No such file /usr/etc/mythtv/mysql.txt
2012-11-18 15:59:39.421751 E (old)Settings::ReadSettings(./mysql.txt) - No such file ./mysql.txt
2012-11-18 15:59:39.421833 N Empty LocalHostName.
2012-11-18 15:59:39.421852 I Using localhost value of obelix
2012-11-18 15:59:39.421875 I Clearing Settings Cache.
2012-11-18 15:59:39.422194 I DefaultUPnP() - No default UPnP backend
2012-11-18 15:59:39.422221 I Testing network connectivity to '192.168.0.3'
2012-11-18 15:59:39.422879 I Starting process manager
2012-11-18 15:59:39.422972 I Starting process signal handler
2012-11-18 15:59:39.424820 I Managed child (PID: 4920) has started! * command=ping -t 3 -c 1 192.168.0.3 >/dev/null 2>&1, timeout=0
2012-11-18 15:59:39.425393 I Starting IO manager (read)
2012-11-18 15:59:39.425568 I Starting IO manager (write)
2012-11-18 15:59:39.523237 I Managed child (PID: 4920) has exited! command=ping -t 3 -c 1 192.168.0.3 >/dev/null 2>&1, status=0, result=0
2012-11-18 15:59:39.523598 I Clearing Settings Cache.
2012-11-18 15:59:39.544013 I Database connection created: DBManager0
2012-11-18 15:59:39.544098 I New DB connection, total: 1
2012-11-18 15:59:39.552598 I Connected to database 'mythconverg' at host: 192.168.0.3
2012-11-18 15:59:39.561461 I Closing DB connection named 'DBManager0'
2012-11-18 15:59:39.561680 I Clearing Settings Cache.
2012-11-18 15:59:39.561773 I Database connection created: DBManager1
2012-11-18 15:59:39.561813 I New DB connection, total: 1
2012-11-18 15:59:39.563579 I Connected to database 'mythconverg' at host: 192.168.0.3
2012-11-18 15:59:39.567230 N Setting QT default locale to de_DE
2012-11-18 15:59:39.567427 I Current locale de_DE
2012-11-18 15:59:39.567558 N Reading locale defaults from /usr/share/mythtv//locales/de_de.xml
2012-11-18 15:59:39.588657 I Enabling Settings Cache.
2012-11-18 15:59:39.588672 I Clearing Settings Cache.
2012-11-18 15:59:39.588710 I Mythshutdown: --unlock
2012-11-18 15:59:39.603945 I MythCoreContext: Connecting to backend server: 192.168.0.3:6543 (try 1 of 1)
2012-11-18 15:59:39.604836 I MythSocket(1d38180:13): IP is local, using loopback address instead
2012-11-18 15:59:39.604864 I MythSocket(1d38180:13): attempting connect() to (127.0.0.1:6543)
2012-11-18 15:59:39.604901 I MSocketDevice::connect: setting Protocol to IPv4
2012-11-18 15:59:39.604908 I MSocketDevice::connect: attempting to create new socket
2012-11-18 15:59:39.605120 I MythSocket(1d38180:13): write -> 13 30 MYTH_PROTO_VERSION 72 D78EFD6F
2012-11-18 15:59:39.605894 I MythSocket(1d38180:13): read <- 13 13 ACCEPT[]:[]72
2012-11-18 15:59:39.605923 I Using protocol version 72
2012-11-18 15:59:39.605958 I MythSocket(1d38180:13): write -> 13 21 ANN Playback obelix 0
2012-11-18 15:59:39.606595 I MythSocket(1d38180:13): read <- 13 2 OK
2012-11-18 15:59:39.606724 I MythSocket(1d36a20:14): IP is local, using loopback address instead
2012-11-18 15:59:39.606749 I MythSocket(1d36a20:14): attempting connect() to (127.0.0.1:6543)
2012-11-18 15:59:39.606771 I MSocketDevice::connect: setting Protocol to IPv4
2012-11-18 15:59:39.606778 I MSocketDevice::connect: attempting to create new socket
2012-11-18 15:59:39.606957 I MythSocket(1d36a20:14): write -> 14 20 ANN Monitor obelix 1
2012-11-18 15:59:39.607518 I MythSocket(1d36a20:14): read <- 14 2 OK
2012-11-18 15:59:39.608091 I MythSocket(1d38180:13): write -> 13 26 MESSAGE[]:[]RESET_IDLETIME
2012-11-18 15:59:39.609089 I MythSocket(1d36a20:14): read <- 14 44 BACKEND_MESSAGE[]:[]RESET_IDLETIME[]:[]empty
2012-11-18 15:59:39.609135 I MythEvent: RESET_IDLETIME
2012-11-18 15:59:39.609147 I MythSocket(1d38180:13): read <- 13 2 OK
2012-11-18 15:59:39.624487 I Closing DB connection named 'DBManager1'
2012-11-18 15:59:39.624907 I Destroying MythDBPrivate

***

mythshutdown --check --verbose all
2012-11-18 16:00:18.357244 C mythshutdown version: fixes/0.25 [v0.25.2-15-g46cab93] www.mythtv.org
2012-11-18 16:00:18.357267 C Qt version: compile: 4.8.1, runtime: 4.8.1
2012-11-18 16:00:18.357273 N Enabled verbose msgs: all
2012-11-18 16:00:18.357293 N Setting Log Level to LOG_INFO
2012-11-18 16:00:18.357338 I Added logging to the console
2012-11-18 16:00:18.357346 I Added database logging to table logging
2012-11-18 16:00:18.357452 N Setting up SIGHUP handler
2012-11-18 16:00:18.357503 N Using runtime prefix = /usr
2012-11-18 16:00:18.357516 N Using configuration directory = /home/sjuk/.mythtv
2012-11-18 16:00:18.357597 E (old)Settings::ReadSettings(settings.txt) - No such file settings.txt
2012-11-18 16:00:18.357661 I Assumed character encoding: de_DE.UTF-8
2012-11-18 16:00:18.357970 E (old)Settings::ReadSettings(settings.txt) - No such file settings.txt
2012-11-18 16:00:18.357988 E (old)Settings::ReadSettings(/usr/share/mythtv/mysql.txt) - No such file /usr/share/mythtv/mysql.txt
2012-11-18 16:00:18.357998 E (old)Settings::ReadSettings(/usr/etc/mythtv/mysql.txt) - No such file /usr/etc/mythtv/mysql.txt
2012-11-18 16:00:18.358101 E (old)Settings::ReadSettings(./mysql.txt) - No such file ./mysql.txt
2012-11-18 16:00:18.358133 N Empty LocalHostName.
2012-11-18 16:00:18.358138 I Using localhost value of obelix
2012-11-18 16:00:18.358147 I Clearing Settings Cache.
2012-11-18 16:00:18.358263 I DefaultUPnP() - No default UPnP backend
2012-11-18 16:00:18.358272 I Testing network connectivity to '192.168.0.3'
2012-11-18 16:00:18.359526 I Managed child (PID: 4981) has started! * command=ping -t 3 -c 1 192.168.0.3 >/dev/null 2>&1, timeout=0
2012-11-18 16:00:18.360251 I Starting process manager
2012-11-18 16:00:18.360397 I Starting process signal handler
2012-11-18 16:00:18.362081 I Starting IO manager (write)
2012-11-18 16:00:18.362142 I Starting IO manager (read)
2012-11-18 16:00:18.460468 I Managed child (PID: 4981) has exited! command=ping -t 3 -c 1 192.168.0.3 >/dev/null 2>&1, status=0, result=0
2012-11-18 16:00:18.460835 I Clearing Settings Cache.
2012-11-18 16:00:18.491340 I Database connection created: DBManager0
2012-11-18 16:00:18.491376 I New DB connection, total: 1
2012-11-18 16:00:18.493712 I Connected to database 'mythconverg' at host: 192.168.0.3
2012-11-18 16:00:18.497969 I Closing DB connection named 'DBManager0'
2012-11-18 16:00:18.498196 I Clearing Settings Cache.
2012-11-18 16:00:18.498251 I Database connection created: DBManager1
2012-11-18 16:00:18.498269 I New DB connection, total: 1
2012-11-18 16:00:18.498696 I Connected to database 'mythconverg' at host: 192.168.0.3
2012-11-18 16:00:18.499542 N Setting QT default locale to de_DE
2012-11-18 16:00:18.499619 I Current locale de_DE
2012-11-18 16:00:18.499664 N Reading locale defaults from /usr/share/mythtv//locales/de_de.xml
2012-11-18 16:00:18.502947 I Enabling Settings Cache.
2012-11-18 16:00:18.502953 I Clearing Settings Cache.
2012-11-18 16:00:18.502972 I Mythshutdown: --check
2012-11-18 16:00:18.502980 I Mythshutdown: --status
2012-11-18 16:00:18.503991 I Managed child (PID: 4984) has started! * command=ps ch -C mythtranscode -o pid > /dev/null, timeout=0
2012-11-18 16:00:18.560689 I Managed child (PID: 4984) has exited! command=ps ch -C mythtranscode -o pid > /dev/null, status=256, result=1
2012-11-18 16:00:18.560782 I Database connection created: DBManager2
2012-11-18 16:00:18.560802 I New DB connection, total: 2
2012-11-18 16:00:18.563246 I Managed child (PID: 4986) has started! * command=ps ch -C mythcommflag -o pid > /dev/null, timeout=0
2012-11-18 16:00:18.564220 I Connected to database 'mythconverg' at host: 192.168.0.3
2012-11-18 16:00:18.660940 I Managed child (PID: 4986) has exited! command=ps ch -C mythcommflag -o pid > /dev/null, status=256, result=1
2012-11-18 16:00:18.663370 I Managed child (PID: 4988) has started! * command=ps ch -C mythfilldatabase -o pid > /dev/null, timeout=0
2012-11-18 16:00:18.761164 I Managed child (PID: 4988) has exited! command=ps ch -C mythfilldatabase -o pid > /dev/null, status=256, result=1
2012-11-18 16:00:18.761893 N isRecording: Attempting to connect to master server...
2012-11-18 16:00:18.771241 I MythCoreContext: Connecting to backend server: 192.168.0.3:6543 (try 1 of 1)
2012-11-18 16:00:18.772157 I MythSocket(100c2d0:14): IP is local, using loopback address instead
2012-11-18 16:00:18.772183 I MythSocket(100c2d0:14): attempting connect() to (127.0.0.1:6543)
2012-11-18 16:00:18.772220 I MSocketDevice::connect: setting Protocol to IPv4
2012-11-18 16:00:18.772232 I MSocketDevice::connect: attempting to create new socket
2012-11-18 16:00:18.772902 I MythSocket(100c2d0:14): write -> 14 30 MYTH_PROTO_VERSION 72 D78EFD6F
2012-11-18 16:00:18.773452 I MythSocket(100c2d0:14): read <- 14 13 ACCEPT[]:[]72
2012-11-18 16:00:18.773476 I Using protocol version 72
2012-11-18 16:00:18.773499 I MythSocket(100c2d0:14): write -> 14 20 ANN Monitor obelix 0
2012-11-18 16:00:18.773875 I MythSocket(100c2d0:14): read <- 14 2 OK
2012-11-18 16:00:18.773969 I MythSocket(10088b0:15): IP is local, using loopback address instead
2012-11-18 16:00:18.773992 I MythSocket(10088b0:15): attempting connect() to (127.0.0.1:6543)
2012-11-18 16:00:18.774010 I MSocketDevice::connect: setting Protocol to IPv4
2012-11-18 16:00:18.774017 I MSocketDevice::connect: attempting to create new socket
2012-11-18 16:00:18.774261 I MythSocket(10088b0:15): write -> 15 20 ANN Monitor obelix 1
2012-11-18 16:00:18.774796 I MythSocket(10088b0:15): read <- 15 2 OK
2012-11-18 16:00:18.777137 I MythSocket(100c2d0:14): write -> 14 35 QUERY_REMOTEENCODER 1[]:[]GET_STATE
2012-11-18 16:00:18.777545 I MythSocket(100c2d0:14): read <- 14 1 0
2012-11-18 16:00:18.777604 I MythSocket(100c2d0:14): write -> 14 35 QUERY_REMOTEENCODER 2[]:[]GET_STATE
2012-11-18 16:00:18.778168 I MythSocket(100c2d0:14): read <- 14 1 0
2012-11-18 16:00:18.778209 I MythSocket(100c2d0:14): write -> 14 35 QUERY_REMOTEENCODER 3[]:[]GET_STATE
2012-11-18 16:00:18.778545 I MythSocket(100c2d0:14): read <- 14 1 0
2012-11-18 16:00:18.778586 I MythSocket(100c2d0:14): write -> 14 35 QUERY_REMOTEENCODER 4[]:[]GET_STATE
2012-11-18 16:00:18.778955 I MythSocket(100c2d0:14): read <- 14 1 0
2012-11-18 16:00:18.783079 N Shutdown is locked
2012-11-18 16:00:18.784484 I JobQueue: Currently set to run new jobs from 00:00 to 23:59
2012-11-18 16:00:18.784554 I JobQueue: HasRunningOrPendingJobs: checking for jobs starting before: So. Nov 18 16:15:18 2012
2012-11-18 16:00:18.786352 I JobQueue: GetJobsInQueue: findJobs search bitmask 4, found 2 total jobs
2012-11-18 16:00:18.786628 I JobQueue: GetJobsInQueue: Ignore 'Look up Metadata' Job for chanid 12130 @ 20121118143237 in Finished state.
2012-11-18 16:00:18.786765 I JobQueue: GetJobsInQueue: Ignore 'Look up Metadata' Job for chanid 12130 @ 20121118144347 in Finished state.
2012-11-18 16:00:18.791239 I Managed child (PID: 4991) has started! * command=ps ch -C mythtv-setup -o pid > /dev/null, timeout=0
2012-11-18 16:00:18.861422 I Managed child (PID: 4991) has exited! command=ps ch -C mythtv-setup -o pid > /dev/null, status=256, result=1
2012-11-18 16:00:18.862285 I Mythshutdown: --status returned: 16
2012-11-18 16:00:18.862307 N Not OK to shutdown
2012-11-18 16:00:18.862315 I Mythshutdown: --check returned: 1
2012-11-18 16:00:18.908606 I Closing DB connection named 'DBManager2'
2012-11-18 16:00:18.962273 I Closing DB connection named 'DBManager1'
2012-11-18 16:00:18.962500 I Destroying MythDBPrivate

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mythtv-common 2:0.25.2+fixes.20120802.46cab93-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-33.52-generic 3.2.31
Uname: Linux 3.2.0-33-generic x86_64
.var.log.mythtv.mythavtest.log:

.var.log.mythtv.mythccextractor.log:

.var.log.mythtv.mythcommflag.log:

.var.log.mythtv.mythjobqueue.log:

.var.log.mythtv.mythlcdserver.log:

.var.log.mythtv.mythmediaserver.log:

.var.log.mythtv.mythutil.log:

ApportVersion: 2.0.1-0ubuntu15
Architecture: amd64
Date: Sun Nov 18 15:48:45 2012
Installed_mythtv_dbg: 0.0
MarkForUpload: True
SourcePackage: mythtv
UpgradeStatus: Upgraded to precise on 2012-05-17 (185 days ago)

Revision history for this message
Stefan Pappalardo (sjuk) wrote :
Revision history for this message
Karl Egly (dekarl) wrote :

I just tested it on master and (un-)locking works as expected.

This may be a stale lock so you need to unlock multiple times.
Can you verify if mythshutdown --(un)lock changes the lock setting? Exactly 0 is unlocked, greater then 0 is locked.

SELECT * FROM settings WHERE value = 'MythShutdownLock' AND hostname IS NULL;

Changed in mythtv (Ubuntu):
status: New → Incomplete
Revision history for this message
Stefan Pappalardo (sjuk) wrote :

I fixed it with this script. I don't remember exactly where I found it. But I think it was on the mythtv users mailing list.

#!/bin/bash

mask=16
mythshutdown --status
status=$?

while (($status & $mask))
do
        mythshutdown --unlock
        mythshutdown --status
        status=$?
done

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mythtv (Ubuntu) because there has been no activity for 60 days.]

Changed in mythtv (Ubuntu):
status: Incomplete → 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.