Bug 2264040 - file descriptor leak fixed in newer socat release
Summary: file descriptor leak fixed in newer socat release
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: socat
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Paul Wouters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-13 14:22 UTC by Sam Morris
Modified: 2024-03-08 01:18 UTC (History)
1 user (show)

Fixed In Version: socat-1.8.0.0-2.fc39
Clone Of:
Environment:
Last Closed: 2024-03-08 01:18:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-1116 0 None None None 2024-02-13 14:23:09 UTC

Description Sam Morris 2024-02-13 14:22:00 UTC
There is a bug in socat 1.7.4.4:

  The retry option with some address types (TCP) did not close() the
  sockets after failed attempts, resulting in an FD leak.

According to http://www.dest-unreach.org/socat/CHANGES this was fixed in version 1.7.4.5 but that version was never released. The fix is present in version 1.8.0.0.

Would it be possible to get socat updated to the newer version?

Reproducible: Always

Steps to Reproduce:
1. socat -ddd /dev/null TCP-CONNECT:192.168.2.1:1,forever,connect-timeout=1
Actual Results:  
You'll see the following lines amongst the output:

2024/02/13 14:17:20 socat[1137201] I socket(2, 1, 6) -> 6
2024/02/13 14:17:22 socat[1137201] I socket(2, 1, 6) -> 7
2024/02/13 14:17:24 socat[1137201] I socket(2, 1, 6) -> 8
2024/02/13 14:17:26 socat[1137201] I socket(2, 1, 6) -> 9

Eventually socat will run out of file descriptors and repeatedly output:

2024/02/13 14:11:44 socat[1134747] I socket(2, 1, 6) -> -1
2024/02/13 14:11:44 socat[1134747] I socket(2, 1, 6): Too many open files

Expected Results:  
socat should not run out of file descriptors when retrying a connection

Comment 1 Fedora Update System 2024-02-21 02:47:51 UTC
FEDORA-2024-455e8cbb93 (socat-1.8.0.0-2.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-455e8cbb93

Comment 2 Fedora Update System 2024-02-22 02:41:08 UTC
FEDORA-2024-455e8cbb93 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-455e8cbb93`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-455e8cbb93

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2024-03-08 01:18:45 UTC
FEDORA-2024-455e8cbb93 (socat-1.8.0.0-2.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.