Opened 9 years ago
Closed 9 years ago
#9057 closed defect (Fixed)
RemoteFile deadlock
Reported by: | stuartm | Owned by: | stuartm |
---|---|---|---|
Priority: | critical | Milestone: | 0.24 |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I can reliably reproduce a deadlock in RemoteFile? if the connection/transfer is allowed to time out. In this case it does so because we're trying to play a recording from a drive which is in standby and is spinning up.
2010-10-05 10:54:28.920 TV: Attempting to change from None to WatchingPreRecorded 2010-10-05 10:54:28.921 SendReceiveStringList(QUERY_CHECKFILE,0...) called from UI thread 2010-10-05 10:54:35.929 MythSocket(3fa5570:61): readStringList: Error, timed out after 7000 ms. 2010-10-05 10:54:35.929 RemoteFile::openSocket(file data socket), Error: Did not get proper response from 192.168.159.2:6543 2010-10-05 10:54:35.929 RemoteFile::openSocket(file data socket), Error: Failed to open socket, error was invalid response
Backtrace attached.
N.B. There appears to be a change of behaviour wrt to timeouts that probably deserves another ticket, we used to wait for the drive in the past.
Attachments (2)
Change History (5)
Changed 9 years ago by
Attachment: | backtrace.txt added |
---|
comment:1 Changed 9 years ago by
Owner: | set to stuartm |
---|---|
Status: | new → accepted |
This one is pretty obvious, we call Close() in openSocket() if an error occurred, but Open() is still holding the lock which Close() requires.
comment:2 Changed 9 years ago by
Possible fix attached, needs to be reviewed by someone familiar with RemoteFile?.
comment:3 Changed 9 years ago by
Resolution: | → Fixed |
---|---|
Status: | accepted → closed |
(In [26656]) Fix a frontend deadlock in the RemoteFile? socket code should we fail to open a socket successfully. This could be because the backend is waiting on a drive to spin up before responding which would exceed the 7 second timeout. Signed off by Chris Pinkham since he knows this code better than I do. Fixes #9057
Backtrace