/srv/irclogs.ubuntu.com/2013/10/30/#ubuntu-mythtv.txt

=== dahlSTROM is now known as dahlSTROM|sleep
biffheroI feel like an idiot with upstart.02:09
biffherostatus mythtv-backend ----> mythtv-backend stop/stopping02:11
biffheroHow do I make that finish the job.02:11
biffheroI have no myth* processes running, there are no files in /var/run/mythtv/ , and I can't get it to restart.02:14
biffheroIf I run the script in /etc/init/mythtv-backend.conf directly, I am OK.  But I suspect there's a problem with PID tracking.02:14
=== dahlSTROM|sleep is now known as dahlSTROM
tgm4883biffhero, if you do a 'sudo service mythtv-backend start' it should list the PID it's tracking15:27
biffherotgm4883: thanks, it wasn't showing that, but I'll 2xcheck next time I have a chance to shut down the backend.15:42
biffheroAs a matter of fact, let me go try that right now.15:42
tgm4883biffhero, when you do...15:42
tgm4883also check what PID mythbackend is actually using 'ps aux | grep myth'15:42
biffheroThat's my problem.  There's no mythtv-backend running at all.15:43
biffheroIs there a way to see if anyone is watching anything on the frontend machine?15:43
tgm4883biffhero, is the backend currently started?15:44
biffheroYeah, I faked it with running the script from /etc/init/mythtv-backend.conf by hand.15:44
tgm4883ah15:44
biffhero"exec /usr/bin/mythbackend --syslog local7 --user mythtv --daemon"15:44
biffheroBecause if I hadn't done that, no TV.  No TV, no happy wife.15:45
tgm4883I don't know of a way from the backend to do it, but you could use the services API to check I think, sec15:45
tgm4883biffhero, this would work 'http://frontendip:6547/Frontend/GetStatus'15:45
biffhero[514]rob@freezer:/mnt/local/sde1/rsnapshot$ sudo service mythtv-backend status15:47
biffheromythtv-backend start/stopping15:47
tgm4883biffhero, no, 'sudo service mythtv-backend start'15:47
tgm4883biffhero, so you start it with that, it should list the PID15:47
biffhero[514]rob@freezer:/mnt/local/sde1/rsnapshot$ sudo service mythtv-backend start15:47
biffherostart: Job is already running: mythtv-backend15:47
tgm4883hmm15:47
biffhero[515]rob@freezer:/mnt/local/sde1/rsnapshot$ !ps15:48
biffherops auxw | grep -i myth15:48
biffherorob       6656  0.0  0.0   4428   836 pts/12   S+   08:47   0:00 grep -i myth15:48
biffheroroot     12361  0.0  0.3  55364  3136 pts/5    S+   Oct12   0:09 emacs -nw ./mythremctl.py15:48
biffheroroot     14350  0.0  0.0   4288   128 pts/21   S+   Oct07   0:01 tail -f mythbackend.log15:48
tgm4883what happens if you stop it?15:48
biffheroHangs, I'll try it right now.15:48
biffheroJust sitting there.15:48
tgm4883I seem to recall this when I was debugging the startup script. Can you pastebin the conf file?15:48
biffheroSee the output of the "status" command.  It believes that the backend has received a "start" command, and that it is in the "stopping" phase.15:49
biffherosure.15:49
biffheroNow, I want to give you a heads up on the /etc/init/mythtv-backend.conf15:49
biffheroI thought that might be my problem, and I saw a bug in ubuntu about it.15:50
biffheroSoi I grabbed the new one.  It's not much different, but I am definitely running the one from most recent, while my mythtv-backend wasn't upgraded.15:50
tgm4883ok15:50
biffheroI used RCS to preserve the old version, so I can choose either one of them.15:50
biffheroWhich one would you like me to pastebin?  (both had the same symptoms)15:51
tgm4883the new one, as it should in theory be correct15:51
biffherook15:51
biffherohttp://paste.ubuntu.com/6330651/15:51
tgm4883hmm ok, that looks good15:52
biffheroI think the problem is that upstart doesn't have the equivalent of "/bin/bash -x /etc/init.d/mythtv-backend stop"  where I can see exactly where it is hanging, go grab the .pid file, and move forward....15:52
tgm4883are you using packages or building from source?15:52
biffheropackages.15:52
biffherohttp://paste.ubuntu.com/6330654/15:53
tgm4883Take a look in /var/log/upstart/mythtv-backend.log and see if it looks like anything is important15:53
biffheroYep, I've been there.  There is not an /var/log/upstart/mythtv-backend.log file.15:53
biffheroThere are .1.gz, etc.  It's like the logrotate killed it.15:53
tgm4883ok15:54
biffheroThere's a segfault at the end of the .1.gz file.15:54
biffherozcat .1.gz | pastebinit ... http://paste.ubuntu.com/6330654/15:55
biffheroI think we are safe to ignore all of the duplicate entry things, and move on down to the very end for the segfault.15:55
tgm4883that is the same pastebin you gave me before15:55
biffheroOh, my bad.15:55
biffherohttp://paste.ubuntu.com/6330668/15:55
biffheroyeah, that's it.15:55
tgm4883I'm not going to worry too much about the segfault for now, that would be an upstream thing anyway15:57
biffheroSure.15:57
tgm4883so we'd want to open a bug with them15:57
tgm4883ok, do this15:57
tgm4883'sudo service mythtv-backend stop'... then ctrl-c when it hangs15:58
biffheroI'm ok leaving that one alone until I can reproduce it when I have more than 22G free on my recording filesystem.  Is there a way to change "keep this much free space" without re-running mythtv-setup ?  I set it to 10G, but maybe that's not enough.15:58
tgm4883edit the conf file15:58
biffherook.15:58
tgm4883in the conf file, comment out line 18 "expect fork"15:58
tgm4883save the conf file, then do15:58
biffheroHeh.  that one "... stop" that I did before that was hanging, I just now hit Ctrl-c, and ...15:58
biffhero^C[513]rob@freezer:/mnt/local/sde1/rsnapshot$ sudo service mythtv-backend stop15:58
biffherostop: Job has already been stopped: mythtv-backend15:58
tgm4883'sudo service mythtv-backend start'15:59
tgm4883ok15:59
biffheroso it worked, I just needed to wait longer?15:59
tgm4883yea, lets make that conf file change and start it again15:59
biffherook.15:59
tgm4883biffhero, no, it sounds like it's tracking the wrong PID15:59
biffheroI couldn't figure out how to get it to spit out what PID it was tracking.15:59
biffheroYeah, I saw that in a bug report, and that's there the "eval" came from, right?16:00
tgm4883did you start it again after changing the conf file?16:00
biffheroI did last night, but not yet.  I'm doing that right now.16:00
tgm4883ok, yea lets remove the expect fork and see what happens16:01
biffherojust did it.16:01
biffherothe service is taking a long time to start16:01
tgm4883but it's not complaining of being already started?16:01
biffherothat is correct.  The ctrl-c of a few minutes ago was the first time that a stop seemed to report success.16:02
tgm4883are you able to open another terminal and see if mythbackend is running?16:02
biffheroyeah, I'm tailing /var/log/mythtv/mythbackend.log in a different screen.  "tail -F /var/log/mythtv/mythbackend.log"16:02
biffheroNothing is happening there.16:02
tgm4883ok16:02
biffheromythbackend is not starting, according to "ps"16:03
biffherohttp://paste.ubuntu.com/6330704/16:03
tgm4883what about in the upstart log for the job?16:03
biffherowait, that's bad.16:03
biffherohttp://paste.ubuntu.com/6330705/ there you go.16:04
biffheronothing in /var/log/upstart16:04
tgm4883 /var/log/upstart/mythtv-backend.log ?16:04
biffheroYes, that is correct.  http://paste.ubuntu.com/6330712/16:05
tgm4883geez, wtf upstart16:05
biffheroyeah, it's better!  (unless it isn't)  Why isn't there an "-vvvv" option?16:05
tgm4883superm1, ping16:05
biffherothe "sudo service mythtv-backend start" is still sitting.16:07
tgm4883biffhero, go and and ctrl+c that16:07
tgm4883as far as I can tell, upstart isn't even trying to start that job16:07
biffherook, done16:07
biffheroyes, I wouldn't be surprised if the mythtv ping isn't working, but how to tell?16:07
tgm4883well that is checking mysql is running16:08
biffheroYes, and when I run them, it is all good.16:08
tgm4883humor me for a second, can you logout of root and go back to your regular user and starting it?16:08
biffheroroot@freezer:/mnt/local/sdb1/shares/mythtv/recordings# /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping >/dev/null16:08
biffheroroot@freezer:/mnt/local/sdb1/shares/mythtv/recordings# echo $?16:08
biffhero016:08
tgm4883you might have to issue the stop command first16:08
biffheroI thought I _was_ using my regular user to do the sudo.  Wasn't I?  Hang on.16:09
biffheroyep, I was.16:09
tgm4883hmm ok16:09
tgm4883so the above is from a different terminal where you are logged in as root?16:10
biffherothe mysqladmin was from root.  I'll try that as a user, but I have been doing "sudo", so .... ?16:10
tgm4883yea IDK, this just isn't making any sense. I would expect something to show up in the log files16:11
biffhero[513]rob@freezer:/mnt/local/sde1/rsnapshot$ sudo /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping >/dev/null16:11
biffhero[514]rob@freezer:/mnt/local/sde1/rsnapshot$ echo $?16:11
biffhero016:11
biffheroMe too.16:11
biffheroI'll comment out that pre-start check, and see where that goes.16:11
biffheroI put the "expect fork" back in, removed the "pre-start script"16:12
biffhero[516]rob@freezer:/mnt/local/sde1/rsnapshot$ time sudo service mythtv-backend start16:12
biffherohanging.16:12
biffherocommenting out the "expect fork", so both of them are out.16:13
tgm4883ok16:13
tgm4883biffhero, also remove the --daemon from the command to start mythbackend16:13
biffherook, you think that the --daemon is a problem?  I'm getting hanging, moving on to the "remove --daemon" test now.16:14
biffherowait, do we want "expect fork" in there or not?16:15
tgm4883biffhero, no, it will put mythtv logs also in the upstart log too16:15
tgm4883so hopefully we'll see *something* happen16:15
biffherook, no exec, no pre-start, no --daemon16:16
tgm4883the --daemon also causes mythbackend to fork (which is why we have expect fork), so the way we've got it now in yours is that mythbackend isn't forking, upstart isn't expecting a fork16:16
biffherohere's an interesting one.16:16
biffherobefore I re-run the start, I do a "time sudo service mythtv-backend stop" first, just for safety.  The first one (right now) hangs.16:17
biffheroCtrl-c, 38 second wait.16:17
biffherorun it again, it immediately says, "already been stopped"16:17
tgm4883yes, always do the stop16:17
biffherorunning start now.16:17
biffherohanging, nothing showing up in /var/log/upstart16:18
biffheronothing showing up in /var/log/mythtv/16:18
biffherohttp://paste.ubuntu.com/6330795/ it isn't starting16:21
biffheroWaited 6m30s, not started, ctrl-c, starting it by hand, in case there's anyone at home who is watching.16:24
biffheroLet me know if you find the -vvvv option to /sbin/initctl16:25
superm1tgm4883: yeah?16:46
superm1biffhero: just to double check.  what version of ubuntu are you running and what version of mythtv?17:02
tgm4883superm1, it's really odd, it's like upstart isn't even attempting to start the job17:03
superm1and is this upstart behavior a "new" problem, or this has been from the get go a problem17:03
tgm4883I'm not sure if there is a way to debug upstart easily17:03
superm1it's possible to debug upstart  - /var/log/upstart logs stuff17:03
superm1jobs output will end up there17:03
tgm4883superm1, yea, but there is nothing for the mythtv job17:04
superm1at least on my 12.04 based ubuntu box I see tons of logs there17:04
tgm4883so then where do you go17:04
tgm4883superm1, that is the correct place for job logs17:04
superm1 /var/log/upstart/$job.log17:04
tgm4883but his doesn't have any new stuff, only old stuff17:04
superm1does mythtv-backend.log show anything?17:04
superm1oh.  ok17:04
tgm4883nope17:04
biffherono.17:04
biffherogetting versions.17:04
biffhero13.04, 2:0.26.0+fixes.20121118.340b5d4-0ubuntu117:05
biffheronothing shows up in /var/log/upstart/17:05
biffheroI'm going to restart something else, see if it goes in there.17:05
superm1oh, ok so quite newer17:06
superm1has this ever worked?17:06
superm1the fixes for --daemon and forking and such weren't commited until about 6 months ago.  https://github.com/MythTV/packaging/commit/7e395a139566134b82a05f32382a18f38799c9fe17:07
biffheroYes, it has been working for quite a while.17:07
biffheroYesterday morning, it decided to die.  I'm not sure why, but there's a segfault in a job at 6am, feels like a logrotate timer.17:08
superm1just to make sure / isn't full right?17:08
biffhero87G free.17:09
superm1and does this same behavior happen on a fresh boot?17:09
biffheroThere's _nothing_ in /var/log/upstart/ that's not a .x.gz file...17:09
biffherono, that's where it works OK.17:09
biffheroI haven't been able to reboot this time.17:10
superm1so it's only upon trying to stop and restart the job it's happening17:11
superm1you "can't" reboot?  as in /sbin/reboot isn't working?17:15
biffheroAs in right now it is busy doing other things.17:17
biffheroso I'm confused as to why the upstart isn't doing the job, and trying to debug it.17:18
superm1oh ok17:18
superm1well we debugged this ages back when we saw similar problems with it not tracking pids properly and reboots taking a long time17:18
superm1that link above on github is what we came up with that should properly execute and track the pid and what we keep in 0.26, 0.27, and 0.28 branches now17:19
biffheroI _can_ run it ok if I just pull the script out of the command, but I don't know how to make upstart tell me what it is doing.  It seems like such a black box move away from "/bin/bash -x"17:19
biffheroyeah, I have those files, have moved through a few iterations of them.  I think these are all upstart problems.17:19
superm1http://upstart.ubuntu.com/wiki/Debugging you can turn on verbosity of upstart logging17:19
superm1just add --verbose to your kernel command line and reboot when you can17:20
biffheroit requires a reboot!  bah.  what a piece of work.17:20
biffheroSo can you go from --verbose to non-verbose without a reboot?17:21
superm1upstart manages pid 1 (/sbin/init)17:22
superm1that's what it increases verbosity of17:22
superm1so you can't restart /sbin/init without rebooting17:22
biffheroand it won't take a signal to re-read the config file?17:22
biffheroI thought that's what "kill -HUP" was for.17:23
superm1if you want to add more logging for the job like they show on that debugging examples there you can do that17:23
superm1and it rereads jobs17:23
superm1but the managing daemon itself i don't believe will17:23
superm1In newer versions of Upstart, "initctl log-priority <priority>" will set the level of logging. See the initctl manpage for valid priority levels. The debug and message priority levels can be useful for debugging job definitions.17:23
superm1not sure whether the 13.04 version has that feature or that came in 13.1017:24
biffheronice page.  initctl list | less shows a lot of stuff in "stop/waiting"17:26
biffherobut the one that I just shut down on my own shows "stop/killed, process xxxx"17:27
superm1some jobs are only intended to run and then stop immediately17:28
superm1i think upstart calls them "tasks"17:28
biffheroThe /waiting makes me think that they aren't finished yet.17:28
superm1i believe the stop/ means they are presenting stopped.  the /waiting means they are waiting for a signal to start17:30
superm1similar that a bunch that say start/ are presently in the started state17:30
biffheroSure.17:31
biffheroBut by that logic, wouldn't start/waiting mean the same as stop/waiting ?17:31
biffherostart/started == stop/stopped17:32
superm1oh the manual says "<goal>/<status>" http://upstart.ubuntu.com/cookbook/#stopped-job17:34
superm110.1.6.18.117:34
biffherook17:42

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!