Ticket #8519 (closed patch: fixed)
Opened 21 months ago
Last modified 20 months ago
Write FileTransfers not properly closed, prevents shutdown of backend
| Reported by: | [R] <ginsu.squirrel@…> | Owned by: | cpinkham |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.23-fixes |
| Component: | MythTV - General | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
When using the metadata grabber in MythVideo?, the FileTransfer? sockets don't get closed properly and the backend never goes into idle mode.
The frontend opens RemoteFile? connections to write the images to the storage group in the backend. This create FileTransfer? objects in the backend that don't get properly cleaned up when the transfer finishes. When a new writemode FileTransfer? object is created, the MythSocket? callbacks are disabled, which I've been told on IRC was due to the reader thread. But that thread is what properly closes the sockets and removes them from the fileTransferList in the MainServer?. When the socket isn't removed from the fileTransferList, the backend thinks it still has open sockets, and won't go into idle mode and shutdown properly. The attached patch reenables the callbacks when the backend receives the DONE command, which allows the reader thread to close the socket and remove it from the fileTransferList.
Attachments
Change History
comment:1 Changed 21 months ago by robertm
- Owner changed from ijr to cpinkham
- Status changed from new to assigned
comment:2 Changed 21 months ago by stuartm
- Priority changed from minor to critical
- Version changed from Unspecified to Trunk Head
- Milestone changed from unknown to 0.23-fixes
comment:3 Changed 20 months ago by cpinkham
(In [24994]) Disable only the ReadyRead? callbacks for FileTransfer? uploads. Previously, we disabled all callbacks which caused the upload socket to not be closed properly when the upload completed.
References #8519. This solves the issue in the ticket, in a different way than the patch attached to the ticket.
After a few days, if there are no regressions, I'll commit this to -fixes as well and close the ticket.
This bumps the binary API version since libmythdb is modified, so make clean, recompiled plugins, whatever you normally do in this case.
comment:4 Changed 20 months ago by cpinkham
- Status changed from assigned to closed
- Resolution set to fixed
(In [25127]) Backport [24994] from trunk.
Disable only the ReadyRead? callbacks for FileTransfer? uploads. Previously, we disabled all callbacks which caused the upload socket to not be closed properly when the upload completed.
Closes #8519.
This bumps the binary API version since libmythdb is modified, so make clean, recompiled plugins, whatever you normally do in this case.

