Opened 14 years ago

Closed 14 years ago

#8519 closed patch (fixed)

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 (1)

close_write_filetransfer.patch (1.0 KB) - added by [R] <ginsu.squirrel@…> 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by [R] <ginsu.squirrel@…>

comment:1 Changed 14 years ago by robertm

Owner: changed from Isaac Richards to cpinkham
Status: newassigned

comment:2 Changed 14 years ago by stuartm

Milestone: unknown0.23-fixes
Priority: minorcritical
Version: UnspecifiedTrunk Head

comment:3 Changed 14 years 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 14 years ago by cpinkham

Resolution: fixed
Status: assignedclosed

(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.

Note: See TracTickets for help on using tickets.