[mythtv] MythSocket class

John P Poet jppoet at gmail.com
Mon May 29 03:52:48 UTC 2006


On 5/28/06, Jim Westfall <jwestfall at surrealistic.net> wrote:
> John P Poet <jppoet at gmail.com> wrote [05.28.06]:
> > On 5/28/06, Isaac Richards <ijr at case.edu> wrote:
> > >On Sunday 28 May 2006 3:31 am, John P Poet wrote:
> > >> I grabbed version 10051 and applied these patches.  I then started up
> > >> recordings on most of my tuners.
> > >>
> > >> Behavior is a little strange.  Topaz is my master backend, Cobalt is
> > >> my slave backend.  Both backends seem to startup just fine:
> > >
> > >Thanks.  Mind trying to repro with '-v socket,network' ?
> > >
> > >Isaac
> >
> > New logs attached.
> >
> > I started up enough record jobs that both backends should have gone to
> > work.  As far as I can tell, the slave backend was never used to
> > record anything, and the extra shows where marked as conflicts.
> >
> > A quick look at the logs shows the master backend (topaz) thinking
> > that the slave backend (cobalt) is bouncing up and down.
> >
> > My frontend (jade) is also running really slow in this configuration.
> >
> > Anything else I can do?  Do you want a log from the frontend?  With
> > '-v socket,network' ?
> >
> > John
>
> I think this is the issue.
>
> void MainServer::reconnectTimeout(void)
> {
> ...
>
>     masterServerSock->writeStringList(strlist);
>     masterServerSock->readStringList(strlist);
>     masterServerSock->setCallbacks(this);
>
>     masterServer >     playbackList.push_back(masterServer);
>
>     masterServerSock->Unlock();
>
>     // Handle any messages sent before the readyRead signal was connected.
>     ProcessRequest(masterServerSock);
> ...
> }
>
> There is a race going on between the mythsocket readyread thread and that
> ProcessRequest().  The readyread thread sees a readable socket, but the
> ProcessRequest gobbles up the data.  This results in the socket being
> closed, since the thread sees it as readable but 0 bytes are available for
> reading.
>
> try commenting that ProcessRequest(masterServerSock); out.  line 3699 of
> mythbackend/mainserver.cpp.
>
> jim

Commented that line out on both backends, but it did not seem to help.
 The slave backend (cobalt) is still not used.

I have attached the resulting logs.

John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: topaz-backend.log.bz2
Type: application/x-bzip2
Size: 11238 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060528/e92f80e7/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cobalt-backend.log.bz2
Type: application/x-bzip2
Size: 4227 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060528/e92f80e7/attachment-0001.bin 


More information about the mythtv-dev mailing list