[mythtv-firehose] mythtv branch master updated by jyavenard. v0.28-pre-1113-gc9395d7

Git Repo Owner noreply at mythtv.org
Thu May 1 00:13:44 UTC 2014

The branch, master has been updated on the
mythtv repository by gitolite user jyavenard.
       via  c9395d7c96c06cc6f508b5cbbf87979ea2c5de0b (commit)
      from  8d11d72f570aa52d7cd8a102e7ac4fa90c77ab16 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c9395d7c96c06cc6f508b5cbbf87979ea2c5de0b
Author:    Bradley Baetz <bbaetz at gmail.com> at Thu, 1 May 2014 09:43:24 +1000
Committer: Jean-Yves Avenard <jyavenard at mythtv.org> at Thu, 1 May 2014 10:13:39 +1000
URL:       http://code.mythtv.org/cgit/mythtv/commit/?id=c9395d7c96c06cc6f508b5cbbf87979ea2c5de0b

Fix random SBE PlaybackSock timeout in MBE.
SBE PlaybackSocks in the master suffer from random disconnection, occuring
after a 7000 ms timeout. It often happens when a frontend ask for the
thumbnail of a program currently being recorded on a slave backend.

I could identify two problems causing this:

First, there is a race between MainServer::ProcessRequestWork and
PlaybackSock::SendReceiveStringList. Even if callbacks are disabled during
SendReceiveStringList execution, a ProcessRequestWork may already be running
and can swallow the reply, leading to the timeout in SendReceiveStringList.

The second problem is that an invocation of ProcessRequestWork is fired for
each block of data arriving in the socket (for example when a reply is long
enough to be fragmented, ie. GENERATED_PIXMAP) but this data is consumed all at
once by one worker, leaving the other workers without food. This also leads to
the timeout in ReadStringList.

This patch fixes the first problem by assuring that no worker reads from the
socket while a SendReceiveStringList is running and the second one by aborting
a worker if there is no more data to read, but only once the lock has been

Signed-off-by: Jean-Yves Avenard <jyavenard at mythtv.org>


Summary of changes:
 mythtv/programs/mythbackend/mainserver.cpp   |   20 ++++++++++++++++++--
 mythtv/programs/mythbackend/playbacksock.cpp |   15 +++++++++++++++
 mythtv/programs/mythbackend/playbacksock.h   |    2 ++
 3 files changed, 35 insertions(+), 2 deletions(-)


More information about the mythtv-firehose mailing list