Bug 9436 - Winbind is leaking unbound sockets faster than a machine gun
Winbind is leaking unbound sockets faster than a machine gun
Status: RESOLVED FIXED
Product: Samba 3.6
Classification: Unclassified
Component: Winbind
3.6.9
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-28 13:17 UTC by Andreas Schneider
Modified: 2012-11-29 10:13 UTC (History)
1 user (show)

See Also:


Attachments
Patch for master (1.03 KB, patch)
2012-11-28 13:19 UTC, Andreas Schneider
no flags Details
Patch for master (1.03 KB, patch)
2012-11-28 13:30 UTC, Andreas Schneider
jmcd: review+
vl: review+
Details
v3-6-test patch (1.19 KB, patch)
2012-11-28 17:28 UTC, Andreas Schneider
jmcd: review+
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2012-11-28 13:17:28 UTC
If you have network issues and you're not able to connect to the DC, Winbind is leaking sockets in a burst which each try to open a SMB connection to the DC. So this pile up really fast and we leak sockets faster than a machine gun. The result is most of the time winbind ending up in an accept loop with accept() failing with EMFILE.

Thanks to Jim who was able to reproduce it on his machine we found the error after spending several hours debugging and reading the code.
Comment 1 Andreas Schneider 2012-11-28 13:19:35 UTC
Created attachment 8235 [details]
Patch for master
Comment 2 Volker Lendecke 2012-11-28 13:28:19 UTC
Wow, an 8 year old bug that I have to claim as mine :-(

Thanks!
Comment 3 Andreas Schneider 2012-11-28 13:30:31 UTC
Created attachment 8236 [details]
Patch for master
Comment 4 Volker Lendecke 2012-11-28 13:32:53 UTC
Comment on attachment 8236 [details]
Patch for master

Just obviously right. Sorry for giving you the pain...
Comment 5 Andreas Schneider 2012-11-28 17:28:14 UTC
Created attachment 8237 [details]
v3-6-test patch

This patch also applies to v4-0-test.
Comment 6 Andreas Schneider 2012-11-28 18:31:18 UTC
Karolin, please add the patch to v3-6-test and v4-0-test. Thanks!
Comment 7 Karolin Seeger 2012-11-29 08:05:14 UTC
Pushed to v3-6-test and autobuild-v4-0-test.
Comment 8 Karolin Seeger 2012-11-29 10:13:29 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!