Opened 9 years ago

Closed 8 years ago

#9485 closed Bug Report - Hang/Deadlock (Fixed)

Backend deadlock in MainServer

Reported by: Mike Rice <mikerice1969@…> Owned by: danielk
Priority: blocker Milestone: 0.25
Component: MythTV - General Version: 0.24-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by Raymond Wagner)

My wife seems to have found a way to hang the backend. I wasn't there but looking at the logs it appears she tried to play a recording where the file was missing.

Am using:

From the frontend log:

2011-01-16 16:09:55.200 PlaybackBoxHelper Error: CHECK_AVAILABILITY 'myth://192.168.1.26:6543/5738_20091122115900.mpg' file not found
2011-01-16 16:09:55.200 MythSocket(ffffffffb1f9c478:43): write -> 43 123     MESSAGE[]:[]SYSTEM_EVENT PLAY_STARTED HOSTNAME mythfrontend2 CHANID 5738 STARTTIME 2009-11-22T11:59:00 SENDER mythfrontend2
2011-01-16 16:09:55.326 MythSocket(ffffffffb1f9c478:43): read  <- 43 2       OK
2011-01-16 16:09:55.379 MythSocket(ffffffffb1f9c478:43): write -> 43 60      MESSAGE[]:[]MASTER_UPDATE_PROG_INFO 5738 2009-11-22T11:59:00
2011-01-16 16:09:55.569 MythSocket(ffffffffb1f9c478:43): read  <- 43 2       OK

After a bit it gives up but it cannot re-connect to the backend:

2011-01-16 16:10:27.634 MythSocket(b5ecad0:56): readStringList: Error, timed out after 7000 ms.
2011-01-16 16:10:27.634 Remote file timeout.
2011-01-16 16:10:28.276 MythSocket(ffffffffb1f9c478:43): read  <- 43 6       0[]:[]
2011-01-16 16:10:28.277 PlaybackBoxHelper Error: CHECK_AVAILABILITY 'myth://192.168.1.26:6543/5738_20091122115900.mpg' file not found
2011-01-16 16:10:28.277 MythSocket(ffffffffb1f9c478:43): write -> 43 123     MESSAGE[]:[]SYSTEM_EVENT PLAY_STOPPED HOSTNAME mythfrontend2 CHANID 5738 STARTTIME 2009-11-22T11:59:00 SENDER mythfrontend2
2011-01-16 16:10:58.281 MythSocket(ffffffffb1f9c478:43): readStringList: Error, timed out after 30000 ms.
2011-01-16 16:10:58.281 Connection to backend server lost
2011-01-16 16:10:58.281 MythSocket(ad035c0:39): write -> 39 30      MYTH_PROTO_VERSION 63 3875641D
2011-01-16 16:11:05.285 MythSocket(ad035c0:39): readStringList: Error, timed out after 7000 ms.
2011-01-16 16:11:05.285 Protocol version check failure.
2011-01-16 16:11:05.285 Reconnection to backend server failed

I will attach the frontend and backend logs along with the stack trace for the backend when it was in this state.

If this only happens when trying to play a missing recording it is probably not a big deal since that is probably an anomaly. But I don't know if that's the case.

Attachments (4)

felog.txt.gz (12.7 KB) - added by Mike Rice <mikerice1969@…> 9 years ago.
Frontend log
belog.txt.gz (24.1 KB) - added by Mike Rice <mikerice1969@…> 9 years ago.
Backend log
gdb.txt.gz (11.4 KB) - added by Mike Rice <mikerice1969@…> 9 years ago.
Stack trace
version_info (649 bytes) - added by Raymond Wagner 9 years ago.

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by Mike Rice <mikerice1969@…>

Attachment: felog.txt.gz added

Frontend log

Changed 9 years ago by Mike Rice <mikerice1969@…>

Attachment: belog.txt.gz added

Backend log

Changed 9 years ago by Mike Rice <mikerice1969@…>

Attachment: gdb.txt.gz added

Stack trace

comment:1 Changed 9 years ago by Raymond Wagner

Description: modified (diff)

Changed 9 years ago by Raymond Wagner

Attachment: version_info added

comment:2 Changed 8 years ago by stuartm

Milestone: unknown0.25
Owner: set to danielk
Priority: minorblocker
Status: newassigned
Summary: frontend cannot connect after trying to play a missing recordingBackend deadlock in MainServer
Type: Bug ReportBug Report - Hang/Deadlock

comment:3 Changed 8 years ago by danielk

Resolution: Fixed
Status: assignedclosed

This was fixed some time ago in fixes/0.24 and master.

The problem was that at the time the sockListLock.unlock() call was after the first SendResponse?() in MainServer::HandleFileTransferQuery?() when it should have been after. This was fixed around August last year.

Note: See TracTickets for help on using tickets.