Modify

Ticket #8519 (closed patch: fixed)

You must read the TicketHowTo before creating a new ticket or commenting on an existing ticket.

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

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

Change History

Changed 21 months ago by [R] <ginsu.squirrel@…>

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.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.