Opened 10 years ago

Closed 10 years ago

#7402 closed patch (fixed)

Socket leak + select overflow in HDHomeRun support

Reported by: jafa@… Owned by: Isaac Richards
Priority: minor Milestone: 0.23
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Socket leak + select overflow in HDHomeRun support.

Socket leak is due to a missing close() in hdhomerun_discover.c detecting local IP addresses.

Select overflow occurs when the system has allocated over 1024 sockets to mythtv.

Problem is noticeable when EIT support is enabled - mythbackend can crash or stop recording within a few days.

The attached patch makes the following changes:

hdhomerun_control: remove select code and tweak timeout setting.

hdhomerun_discover: remove select code and configure sockets to be non-blocking. add missing close call to fix socket leak.

Nick - Silicondust (HDHomeRun)

Attachments (1)

hdhomerun_mythtv_ticket7402.patch (3.8 KB) - added by jafa@… 10 years ago.
patch as per ticket description

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by jafa@…

patch as per ticket description

comment:1 Changed 10 years ago by cpinkham

(In [22641]) Fix a leaking socket file descriptor in the HDHomeRun discover code.

Refs #7402. The rest of the patch in this ticket will be put into trunk separately and possibly merged into 0.22-fixes after the release of 0.22.

comment:2 Changed 10 years ago by Doug Goldstein <cardoe@…>

Will we see this backported to 0.22-fixes?

comment:3 Changed 10 years ago by Stuart Auchterlonie

Milestone: unknown0.23
Resolution: fixed
Status: newclosed
Version: unknownhead

[22641] fixed in head for 0.23. [22642] merged [22641] back to 0.22-fixes

Note: See TracTickets for help on using tickets.