---------- Forwarded message ----------
From: Brad Benson <[EMAIL PROTECTED]>
Date: Sat, 12 Feb 2005 20:49:37 -0500
Subject: Re: [mythtv-users] 0.17 upgrade -> backend crashes
To: Chris Pinkham <[EMAIL PROTECTED]>


On Sat, 12 Feb 2005 20:03:46 -0500 (EST), Chris Pinkham
<[EMAIL PROTECTED]> wrote:
> > I upgraded from 0.16 to 0.17 late Thursday night/early Friday morning.
> >  Ever since then I've been seeing some strange behavior from the box.
> What's in your jobqueue table?  You can also limit the number of jobs
> that myth will run at one time, the default is 1 I believe, so I'm
> not sure why it's running multiple jobs unless you bumped up the
> JobQueueMaxSimultaneousJobs setting.
>

When I run setup it tells me that I already have the backend limited
to 1 simultaneous job, CPU usage is set to Medium, Job Queue check
frequency is set to 60 seconds, Run Jobs only on original recording
host is unchecked, and I have allowed this backend to run any jobs in
the queue (commflag, user 1, user 2, user 3 and user 4).

> Can you do a "select * from jobqueue order by id;" and post the
> output?  This should indicate if there are multiple entries in the
> table for a single show.  The code should prevent that though.
>

Here's the output from "select * from jobqueue order by id;":
+----+--------+---------------------+---------------------+------+------+-------+--------+---------------------+------------+------+-----------------------------+
| id | chanid | starttime           | inserttime          | type |
cmds | flags | status | statustime          | hostname   | args |
comment                     |
+----+--------+---------------------+---------------------+------+------+-------+--------+---------------------+------------+------+-----------------------------+
|  1 |   1030 | 2005-02-11 15:59:00 | 2005-02-11 17:03:00 |    2 |
0 |     0 |    272 | 2005-02-11 18:43:47 | bivomaster |      |
Finished, 0 break(s) found. |
|  3 |   1052 | 2005-02-11 22:58:00 | 2005-02-11 23:32:00 |    2 |
0 |     0 |      1 | 2005-02-12 20:23:05 | bivomaster |      |
                    |
|  4 |   1009 | 2005-02-11 20:53:00 | 2005-02-12 16:04:35 |    2 |
4 |     0 |    272 | 2005-02-12 16:07:42 | bivomaster |      |
Finished, 0 break(s) found. |
|  5 |   1024 | 2005-02-11 18:28:00 | 2005-02-12 16:06:16 |    2 |
0 |     0 |    272 | 2005-02-12 20:40:23 | bivomaster |      | 60%
Completed @ 60 fps.
 |
|  6 |   1031 | 2005-02-11 19:30:00 | 2005-02-12 16:06:21 |    2 |
0 |     0 |      4 | 2005-02-12 20:40:22 | bivomaster |      | 80%
Completed @ 60 fps.     |
+----+--------+---------------------+---------------------+------+------+-------+--------+---------------------+------------+------+-----------------------------+
5 rows in set (0.00 sec)

Interestingly, here's a snippet from mythbackend.log from immediately
after the above select statement was run:
2005-02-12 20:34:52.770 Starting Commercial Flagging for "Everybody
Loves Raymond" recorded from channel 1031 at Fri Feb 11 19:30:00 2005.
2005-02-12 20:34:52.910 commflag: Commercial Flagging Starting
QTime::setHMS Invalid time 28:12:01.000
QDate::setYMD: Invalid date 2935-93-02
2005-02-12 20:37:49.989 MainServer::HandleAnnounce Playback
2005-02-12 20:37:50.055 adding: bivomaster as a client (events: 0)
2005-02-12 20:37:50.249 Reloading backend settings
2005-02-12 20:37:50.370 MainServer::HandleAnnounce Playback
2005-02-12 20:37:50.380 adding: bivomaster as a client (events: 1)
QTime::setHMS Invalid time 28:12:02.000
QDate::setYMD: Invalid date 2935-93-02
2005-02-12 20:38:53.065 Starting Commercial Flagging for "Everybody
Loves Raymond" recorded from channel 1031 at Fri Feb 11 19:30:00 2005.
QTime::setHMS Invalid time 28:12:02.000
QDate::setYMD: Invalid date 2935-93-02
2005-02-12 20:42:12.339 Waited 2 seconds for data to become available,
waiting again...
2005-02-12 20:42:16.380 commflag: Last message repeated 1 times
2005-02-12 20:42:16.458 commflag: Commercial Flagging Finished
2005-02-12 20:42:16.631 Finished, 1 break(s) found.

There is definitely only a single jobqueue entry for the show with a
start time of 02/11/2004:19:30:00, but the log clearly shows two
separate instances of commercial flagging being run for that show.
Here's another sample taken from the same log file:

2005-02-12 20:42:53.525 Starting Commercial Flagging for "Best Week
Ever" recorded from channel 1052 at Fri Feb 11 22:58:00 2005.
2005-02-12 20:42:53.596 commflag: Commercial Flagging Starting
QTime::setHMS Invalid time 28:12:01.000
QDate::setYMD: Invalid date 2935-93-02
QTime::setHMS Invalid time 28:12:02.000
QDate::setYMD: Invalid date 2935-93-02
2005-02-12 20:43:53.735 Starting Commercial Flagging for "Best Week
Ever" recorded from channel 1052 at Fri Feb 11 22:58:00 2005.
QTime::setHMS Invalid time 28:12:02.000
QDate::setYMD: Invalid date 2935-93-02

Again, you can see that there's only a single entry in the job queue,
but two instances of mythcommflag being run.


> > This message is repeated several times in the log and the backend is
> > dead.  When I try to restart the backend from the command line it
> > returns me to a prompt with no output to the console or the log file
> > and the backend never starts.  I have to do a hard reboot of the box
> > in order to get the backend started again.
>
> Not sure about this, what is the result code?  Type "echo $?" without
> the quotes after you try to run the backend, that will let you know if
> it is exiting with a certain error status but not printing anything
> verbose.  You can also try running "mythbackend -v all" which will
> turn on all debugging output and might give a clue as to why it's
> dying.

Well, I figured this part out.  When the backend dies it's leaving
behind /var/lock/subsys/mythbackend.  The startup file checks for this
and silently returns if the file already exists.  Once I delete
/var/lock/subsys/mythbackend I can then restart the backend normally.
>
> > 0.17.  I did set -march=athlon for mythtv and all modules when I
> > compiled since I'm running an Athlon 1600+ and I thought I could
> > squeeze a little extra speed out of the code.  I'm going to try
> > recompiling with the default -march=pentiumpro just to see what
> > happens, but I doubt that's going to fix the problem.
>
> Anything but the default compile options are usually untested by
> the developers I believe, so you're best bet is to try pentiumpro and
> see if the problems are still occuring.  Make sure you do a
> "make distclean".
>

I haven't yet recompiled everything, but I think I'm going to leave
-march=athlon and turn on debugging first.  That way I can run the
backend under gdb and see if we get any interesting data the next time
it crashes.

Thanks for your help so far.  I'll post back after recompiling and
running under gdb.

Accidentally replied off-list so I'm forwarding this message to the
list this time.

I've now recompiled with debug support and am running mythbackend
under gdb.  It hasn't crashed yet, but I've currently got 14 instances
of mythcommflag running and the load average on the box is just under
20!



Brad
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to