[mythtv-commits] Ticket #11316: Slave backend sending events to master
MythTV
noreply at mythtv.org
Sun Dec 30 08:13:05 UTC 2012
#11316: Slave backend sending events to master
---------------------------------+--------------------------------------
Reporter: gregorio.gervasio@… | Type: Bug Report - General
Status: new | Priority: minor
Milestone: unknown | Component: MythTV - General
Version: Unspecified | Severity: medium
Keywords: | Ticket locked: 0
---------------------------------+--------------------------------------
After the recent socket merge, I started having communication problems
between slave and master backends. It seems the slave is sending events
to the master, which can cause the master to receive the wrong response to
a request.
Here's an example where the master is asking the slave to start recording
a show. The logs are "-v socket,network --loglevel debug". On the
master:
{{{
2012-12-28 19:43:28.590069 I [25772/25852] MythSocketThread(91)
mythsocket.cpp:697 (WriteStringListReal) - MythSocket(b247f0:91): write ->
91 564 QUERY_REMOTEENCODER 5[]:[]START_RECORDING[]:[]Access
Hollywood[]:[][]:[]Top stories of 2012; celebrity scandals; ''The Promised
Land''
cast.[]:[]0[]:[]0[]:[]4255[]:[]Talk[]:[]2703[]:[]703[]:[]KNTVDT[]:[]KNTVDT
(KNTV-
DT)[]:[]/home/mythtv/store.w2[]:[]0[]:[]1356751800[]:[]1356753600[]:[]0[]:[]slave1.home[]:[]2[]:[]5[]:[]5[]:[]3[]:[]-1[]:[]10549[]:[]1[]:[]15[]:[]6[]:[]1356752580[]:[]1356753600[]:[]0[]:[]Default[]:[][]:[]EP00188707[]:[]EP001887074533[]:[][]:[]1356752607[]:[]0[]:[]2012-12-28[]:[]Default[]:[]0[]:[]0[]:[]Default[]:[]1[]:[]33[]:[]0[]:[]0[]:[]0[]:[]0
2012-12-28 19:43:28.636219 I [25772/25852] MythSocketThread(91)
mythsocket.cpp:898 (ReadStringListReal) - MythSocket(b247f0:91): read <-
91 138 BACKEND_MESSAGE[]:[]SYSTEM_EVENT REC_STARTED CARDID 5 CHANID
2703 STARTTIME 2012-12-29T03:43:00Z RECSTATUS -1 SENDER
slave1.home[]:[]empty
2012-12-28 19:43:28.636276 E [25772/25808] Scheduler mythsocket.cpp:351
(SendReceiveStringList) - MythSocket(b247f0:91): Got MythEvent on non-
event socket
2012-12-28 19:43:28.636285 E [25772/25808] Scheduler playbacksock.cpp:94
(SendReceiveStringList) - PlaybackSock::SendReceiveStringList(): No
response.
}}}
On the slave:
{{{
2012-12-28 19:43:28.590328 I [8761/8798] MythSocketThread(-1)
mythsocket.cpp:898 (ReadStringListReal) - MythSocket(ee0390:70): read <-
70 564 QUERY_REMOTEENCODER 5[]:[]START_RECORDING[]:[]Access
Hollywood[]:[][]:[]Top stories of 2012; celebrity scandals; ''The Promised
Land''
cast.[]:[]0[]:[]0[]:[]4255[]:[]Talk[]:[]2703[]:[]703[]:[]KNTVDT[]:[]KNTVDT
(KNTV-
DT)[]:[]/home/mythtv/store.w2[]:[]0[]:[]1356751800[]:[]1356753600[]:[]0[]:[]slave1.home[]:[]2[]:[]5[]:[]5[]:[]3[]:[]-1[]:[]10549[]:[]1[]:[]15[]:[]6[]:[]1356752580[]:[]1356753600[]:[]0[]:[]Default[]:[][]:[]EP00188707[]:[]EP001887074533[]:[][]:[]1356752607[]:[]0[]:[]2012-12-28[]:[]Default[]:[]0[]:[]0[]:[]Default[]:[]1[]:[]33[]:[]0[]:[]0[]:[]0[]:[]0
2012-12-28 19:43:28.590350 D [8761/8799] ProcessRequest mainserver.cpp:470
(ProcessRequestWork) - PRW: command='QUERY_REMOTEENCODER'
2012-12-28 19:43:28.635909 I [8761/8799] ProcessRequest
mythcorecontext.cpp:1211 (dispatch) - MythEvent: SYSTEM_EVENT REC_STARTED
CARDID 5 CHANID 2703 STARTTIME 2012-12-29T03:43:00Z RECSTATUS -1 SENDER
slave1.home
2012-12-28 19:43:28.636038 I [8761/8798] MythSocketThread(-1)
mythsocket.cpp:697 (WriteStringListReal) - MythSocket(ee0390:70): write ->
70 138 BACKEND_MESSAGE[]:[]SYSTEM_EVENT REC_STARTED CARDID 5 CHANID
2703 STARTTIME 2012-12-29T03:43:00Z RECSTATUS -1 SENDER
slave1.home[]:[]empty
}}}
When the slave sends the actual response:
{{{
2012-12-28 19:43:28.669287 I [8761/8798] MythSocketThread(-1)
mythsocket.cpp:697 (WriteStringListReal) - MythSocket(ee0390:70): write ->
70 3 -10
}}}
the master thinks there is an unknown command:
{{{
2012-12-28 19:43:28.669410 D [25772/25852] MythSocketThread(91)
mythsocket.cpp:284 (CallReadyReadHandler) - MythSocket(b247f0:91): calling
m_callback->readyRead()
2012-12-28 19:43:28.669447 D [25772/25848] ProcessRequest
mainserver.cpp:148 (run) - Processing request for sock 91
2012-12-28 19:43:28.669521 I [25772/25852] MythSocketThread(91)
mythsocket.cpp:898 ReadStringListReal) - MythSocket(b247f0:91): read <-
91 3 -10
2012-12-28 19:43:28.669543 D [25772/25848] ProcessRequest
mainserver.cpp:470 (ProcessRequestWork) - PRW: command='-10'
2012-12-28 19:43:28.669553 E [25772/25848] ProcessRequest
mainserver.cpp:877 (ProcessRequestWork) - Unknown command: -10
2012-12-28 19:43:28.669586 I [25772/25852] MythSocketThread(91)
mythsocket.cpp:697 (WriteStringListReal) - MythSocket(b247f0:91): write ->
91 15 UNKNOWN_COMMAND
}}}
The attached patch seems to fix the issue but I'm not sure if it will
cause other problems.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11316>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list