Leaks file descriptors and eventually runs out
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpid (ALT Linux) |
Unknown
|
Unknown
|
|||
acpid (Suse) |
Fix Released
|
Critical
|
|||
acpid (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Hardy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: acpid
I was performing a stress test which simulated part of system startup (including starting and stopping (SIGTERM) the X server) in a tight loop. After 1000 or so iterations, the X server blocked during startup in connect(), trying to connect to /var/run/
The acpid log file was 2147483647 bytes and looked like this:
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
[Sun Sep 14 19:43:54 2008] ERR: can't accept client: Too many open files
<repeated millions of times>
[Sun Sep 14 19:43:54 2008] E
netstat and /proc/pid/fd showed that it had reached the ulimit for open file descriptors. At that point, it must have started spewing to the log, and filled it up, at which point it didn't seem to even attempt accept(2) anymore.
I could reproduce the fd leak using this simple python program:
Python 2.5.2 (r252:60911, Apr 21 2008, 11:08:23)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> help(socket)
>>> s = socket.
>>> s.connect(
>>> s.close()
Each time I run this test, acpid gains another fd which never goes away.
Changed in acpid: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in acpid: | |
status: | Unknown → Fix Released |
Changed in acpid: | |
status: | Fix Committed → Triaged |
Changed in acpid: | |
assignee: | tjaalton → nobody |
security vulnerability: | no → yes |
visibility: | public → private |
Changed in acpid (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in acpid (Suse): | |
importance: | Unknown → Critical |
There seems to be a similar report and patch at https:/ /bugzilla. altlinux. org/show_ bug.cgi? id=8303