[mythtv] Unknown command: UNKNOWN_COMMAND

Mark irish at irishmark.co.uk
Mon Apr 4 18:38:00 UTC 2005


Brian Foddy wrote:
> I've struggled with this fatal error for almost 2 weeks now, with CVS 
> snapshots from 3/19, 3/26, and now 4/2.  As far as I can tell, its 
> caused when the slave backend moves from Recordonly to None, 
> and its more common when the
> slave is finishing multiple recordings at the same time.  It appears to send
> the master a blank command, which the master responds with a UNKNOWN_COMMAND,
> which the slave doesn't understand so the infinite loop has started.
> Requiring both backends to be restarted.
> 
> It happens aprox 50% of the time the slave finishes a recording; probably
> 80% of the time when it finishes 2 or more recordings at the same time.
> 
> Can someone give me some guidance on where to put additional
> debugging outputs, verbose output commands, etc that would help
> pin point and correct the problem?
> 
> As a possible short-term alternative, I can see in the code how it forms
> an infinite loop when the UNKNOWN_COMMAND is again unknown and
> replies with the same.  What can it reply with that would stop the loop
> from continuing?  I'd rather find the root cause too, but right now I'd take
> anything.
> 
> This is very frustrating...

Since no-one else replied to this I'll share what little I know about it...

If you look in programs/mythbackend/mainserver.cpp you can uncomment a 
debug line that will show you all the received commands.
(Search for the first "cerr" in that file, thats the one)
You can also use -v network for info.
I've been looking at mine - I have three backends and when all three are 
connected the problem appears much more likely to happen.
I've just started looking at this so the following may be all wrong!

I altered mine so on receiving an UNKNOWN_COMMAND it does nothing, just 
returns. Theres no code I could find to deal with it, so theres no point 
sending it! It helps a little, in that the loop no longer happens, but 
it still appears to be in a unhappy state (the master backend)
I usually check this by refreshing the HTML from the 6544 page, if it 
hangs the backend is in this state.

I appear to get a QUERY_FREESPACE command being sent from the master and 
the reply not being liked/accepted, but the reply is 0:0: which I think 
should be normal?

But it appears that eventually one of the replies gets intepreted as a 
command and the backend goes "UNKNOWN_COMMAND: 0" and the fun begins...

I notice I'm getting loads of these query freespaces on changing channel 
and I suspect they might be triggered by the reshedule called when the 
EIT parser gets some new events?

Are you using DVB?

In summary, dunno, the rabbithole goes much deeper, but maybe this info 
will be some help and if I get any further I'll let u know






More information about the mythtv-dev mailing list