After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746547 - file descriptor leak in gsd-print-notifications-manager.c
file descriptor leak in gsd-print-notifications-manager.c
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: printers
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: Marek Kašík
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-20 19:24 UTC by Ansgar Burchardt
Modified: 2015-09-22 15:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add missing httpClose() calls (632 bytes, patch)
2015-03-20 19:24 UTC, Ansgar Burchardt
committed Details | Review

Description Ansgar Burchardt 2015-03-20 19:24:51 UTC
Created attachment 299985 [details] [review]
patch to add missing httpClose() calls

There are three places in gsd-print-notifications-manager.c where httpConnectEncrypt() is called, but only in one place httpClose() is also called. However, httpClose() will close the file descriptor with the network connection as part of the cleanup.

With several network printers, this resulted in a leak of >1000 TCP connections which eventually ended in the CLOSE-WAIT state for me. Adding the missing httpClose() calls seems to have solved the problem for me; the patch against version 3.14.2 (as in Debian) is attached. From looking at Git master, the problem should still be present.

See also the bug report in Debian for a few more details.

Bug-Debian: https://bugs.debian.org/780856
Comment 1 Matthias Clasen 2015-03-20 21:20:46 UTC
looks like a good candidate for backporting to 3.14
Comment 2 Marek Kašík 2015-03-23 14:24:18 UTC
Hi Ansgar,

thank you very much for catching this. I've pushed the patch into gnome-3-14 branch for now and will push it to master/gnome-3-16 once the hard code freeze is over (probably tomorrow).
Comment 3 Matthias Clasen 2015-03-23 14:38:27 UTC
the 3.16.0 release is out, so please push it to the stable branches
Comment 4 Marek Kašík 2015-03-23 14:50:58 UTC
OK, I've pushed it to master. It will get to gnome-3-16 branch once it is created.
Comment 5 Matthias Clasen 2015-03-23 15:31:12 UTC
the branch is called gtk-3-16
Comment 6 Marek Kašík 2015-03-23 15:34:57 UTC
(In reply to Matthias Clasen from comment #5)
> the branch is called gtk-3-16

This a gnome-settings-daemon bug. I see there only gnome-*-* branches for stable releases.
Comment 7 Matthias Clasen 2015-03-23 15:35:53 UTC
oh, ignore me when I'm sputtering nonsense...