Opened 15 years ago
Closed 15 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)
by , 15 years ago
| Attachment: | backtrace.txt added |
|---|
comment:1 by , 15 years ago
| Owner: | set to |
|---|---|
| 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 by , 15 years ago
Possible fix attached, needs to be reviewed by someone familiar with RemoteFile.
comment:3 by , 15 years ago
| 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