<!DOCTYPE html><html><head>
<style type="text/css">body { font-family:'DejaVu Sans'; font-size:13px}</style>
</head>
<body><div>On Aug 13th 2013 Mark Perkins wrote: </div><div><br>> I have been experiencing something that I would term (probably incorrectly) <br>> FE disconnects from BE (happens to both remote FE and BE/FE machine). It <br>> seemed to only occur rarely, perhaps about once every 3 days or so (but more <br>> often on the remote FE) and it seems to fix itself after about 5-15min <br>> without any intervention. During this time Live TV does not work and <br>> Recording Playback does not work. <br><br>> I am getting 1,000's (10,000's) of the following errors in the mythbackend <br>> log file: <br><br>> Aug 19 18:25:29 mark-P5K-Deluxe mythlogserver: mythbackend[500]: E <br>> CoreContext mythsocket.cpp:375 (writeStringList) MythSocket(9d89210:159): <br>> writeStringList: Error, No data written on writeBlock (622 <br>> errors)#012#011#011#011starts with: 122406 <br>> BACKEND_MESSAGE[]:[]GENERATED_PIXMAP[]:[]OK[]:[]1009... <br>> Aug 19 18:25:30 mark-P5K-Deluxe mythlogserver: mythbackend[500]: E <br>> CoreContext mythsocket.cpp:375 (writeStringList) MythSocket(9f10f80:157): <br>> writeStringList: Error, No data written on writeBlock (603 <br>> errors)#012#011#011#011starts with: 122406 <br>> BACKEND_MESSAGE[]:[]GENERATED_PIXMAP[]:[]OK[]:[]1009... </div><div><br></div><div>Mark,</div><div><br></div><div>Sorry for starting a new thread - I had to retrieve this from the archives. And apologies for not responding sooner - until tonight I hadn't read that it was causing you grief.</div><div><br></div><div>I too have noticed these errors for a while on 0.26/fixes but they have no adverse effect on my system so I have never got around to investigating. However I've always had a worry/feeling that they are related to the silence commflagging script. </div><div><br></div><div>Tonight we watched a recording whilst it was in progress (something we rarely do) and I was irritated to see that the adverts weren't being skipped. Some cursory debugging showed that these errors were the the cause. I had a brief chance to log the network (mythbackend --setverbose network) and ominously saw;</div><div><br></div><div>Sep 8 20:13:16 htpc mythlogserver: mythbackend[1959]: I Socket mythcorecontext.cpp:1203 (dispatch) MythEvent: SYSTEM_EVENT CLIENT_DISCONNECTED HOSTNAME htpc SENDER htpc<br>Sep 8 20:13:16 htpc mythlogserver: mythbackend[1959]: I Socket mythcorecontext.cpp:1203 (dispatch) MythEvent: LOCAL_SLAVE_BACKEND_ENCODERS_OFFLINE<br>Sep 8 20:13:16 htpc mythlogserver: mythbackend[1959]: I Socket mythcorecontext.cpp:1203 (dispatch) MythEvent: SYSTEM_EVENT CLIENT_DISCONNECTED HOSTNAME htpc SENDER htpc<br>Sep 8 20:13:16 htpc mythlogserver: mythbackend[1959]: I Socket mythcorecontext.cpp:1203 (dispatch) MythEvent: LOCAL_SLAVE_BACKEND_ENCODERS_OFFLINE<br>Sep 8 20:13:16 htpc mythlogserver: mythbackend[1959]: E CoreContext mythsocket.cpp:375 (writeStringList) MythSocket(11d1750:209): writeStringList: Error, No data written on writeB<br>lock (812 errors)<br> starts with: 660 BACKEND_MESSAGE[]:[]RECORDING_LIST_CHANGE UPDATE[]:[...<br></div><div><br></div><div>I believe these events relate to slave backends but I have none.</div><div><br></div><div>Your dropbox link no longer works but I also see lots of;</div><div><br></div><div>Sep 8 19:26:07 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1395 (HandleAnnounce) MainServer::ANN Playback<br>Sep 8 19:26:07 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1397 (HandleAnnounce) adding: htpc as a client (events: 0)<br>Sep 8 19:26:07 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1395 (HandleAnnounce) MainServer::ANN Monitor<br>Sep 8 19:26:07 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1397 (HandleAnnounce) adding: htpc as a client (events: 1)<br>Sep 8 19:26:10 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1395 (HandleAnnounce) MainServer::ANN Playback<br>Sep 8 19:26:10 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1397 (HandleAnnounce) adding: htpc as a client (events: 0)<br>Sep 8 19:26:10 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1395 (HandleAnnounce) MainServer::ANN Monitor<br>Sep 8 19:26:10 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1397 (HandleAnnounce) adding: htpc as a client (events: 1)<br>Sep 8 19:26:19 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1395 (HandleAnnounce) MainServer::ANN Playback<br>Sep 8 19:26:19 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1397 (HandleAnnounce) adding: htpc as a client (events: 0)<br>Sep 8 19:26:19 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1395 (HandleAnnounce) MainServer::ANN Monitor<br>Sep 8 19:26:19 htpc mythlogserver: mythbackend[1959]: I ProcessRequest mainserver.cpp:1397 (HandleAnnounce) adding: htpc as a client (events: 1)<br>Sep 8 19:26:24 htpc mythlogserver: mythbackend[1959]: E CoreContext mythsocket.cpp:375 (writeStringList) MythSocket(1128f00:207): writeStringList: Error, No data written on writeBlock (815 errors)<br> starts with: 100816 BACKEND_MESSAGE[]:[]GENERATED_PIXMAP[]:[]OK[]:[]1005...<br><br>which do seem closely related to the start of commflagging.<br></div><div><br></div><div>The errors all stopped when some recordings finish. I had 3 concurrent recordings at the time so I wonder if multiple commflagging jobs are a factor in it.</div><div><br></div><div>My initial hypothesis is that the commflagging messages are being interpreted as a slave backend repeatedly connecting/disconnecting, which is overloading Myth's sockets somehow. I haven't seen any of your "socket unconnected" errors, but they arise from the same area.</div><div><br></div><div>I don't have time/opportunity to investigate further at the moment but, if it's screwing your system, I'd suggest you simply disable the commflag messages and see if the errors re-occur. Just comment out the line containing "be.backendCommand" (and the following "if") in silence.py. Your programmes will still be commflagged but, if you watch in-progress recordings, you'll have to stop and restart playback to pick up the skiplist.</div><div><br></div><div>And if Mr Wagner is watching, can he offer any advice on how to send occasional messages from a python script to the backend ? The full script is at <a href="http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD#silence.py">http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD#silence.py</a> but the relevant code is;</div><div><br></div><div> db = MythTV.MythDB()<br>be = MythTV.BECache(None, False, db)</div><div><br></div><div> # send advert skiplist to MythPlayers<br> tuplelist = [(str(x) + ':' + str(rec.markup.MARK_COMM_START), str(y) + ':' + str(rec.markup.MARK_COMM_END)) for x, y in rec.markup.getskiplist()]<br>mesg = 'COMMFLAG_UPDATE ' + progId + ' ' + ','.join([x for tuple in tuplelist for x in tuple])</div><div>result = be.backendCommand("MESSAGE[]:[]" + mesg)<br></div><div><br></div><div>Not great code but it was my first attempt at Python and I couldn't find any examples to copy...</div><div><br></div><div>I did notice <a href="http://www.gossamer-threads.com/lists/mythtv/dev/548233">http://www.gossamer-threads.com/lists/mythtv/dev/548233</a> but it's probably the way I'm using the bindings.</div></body></html>