Missing close() after shutdown() in EGCatloader/Record.pm FD Leak
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.7 |
Fix Released
|
Medium
|
Unassigned | ||
2.8 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Running EG 2.8.2, OpenSRF 2.4.1, Debian Jessie, OpenVZ Container on a Proxmox VE 3.4 host.
See OpenILS-General list posts about this issue as I worked through trying to figure out what the issue was.
http://
The Summary is that in the EGCatLoader/
I noticed this because OpenVZ has various resource limits, one of them counts/limits TCP sockets, which I kept hitting for no apparent reason. On a non virtualized host, or a host that doesn't have that sort of limit the problem isn't really a problem if the FD limits are set fairly high. I was seeing about 5 orphaned sockets per request of a record detail page.
The orphaned sockets show up when 'lsof" is run, as type "sock" with a message of " can't identify protocol"
To confirm this problem, run "lsof | grep " sock " | wc -l" A fixed system will have 2 x <Num Apache Processes> + ~7 of these orphaned sockets. Each apache process has 2 from startup, when a socket call is made without a connect, probably for IPV4/IPV6 setup reasons.
My system would show several hundred to several thousand of the orphaned sockets after a day of running. After restarting apache the number would go back down. And then after loading a record detail page (http://
The fix is really simple, just call close after the shutdown. Patch on the way.
Josh
tags: | added: pullrequest |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Branch at lp1478123_ socket_ fd_leak_ added_content
/user/stompro/
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ stompro/ lp1478123_ socket_ fd_leak_ added_content