Bug 441686 - acpid leaks fds
acpid leaks fds
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: acpid (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Zdenek Prikryl
: 306981 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2008-04-09 10:21 EDT by ritz
Modified: 2010-10-22 19:53 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 15:53:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
close fd (818 bytes, patch)
2008-04-09 10:21 EDT, ritz
no flags Details | Diff

  None (edit)
Description ritz 2008-04-09 10:21:30 EDT
Description of problem:
acpid leaks file descriptors

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. cat test.sh
for i in `seq  5`;do
	acpi_listen &

killall -qqq acpi_listen 2>&1  >/dev/null
sleep 1
/usr/sbin/lsof|grep acpi|grep socket|wc -l

2. sh test.sh
3. sh test.sh
Actual results:
acpid leaks fds

Expected results:
acpid should not leak fd

Additional info:
patch attached.

acpid uses unix sockets for ipc. It seems these sockets are not checked until
unless there is an acpi event generated.

any client which exits before an acpi event has been generated will leave around
an open fd, which will not be closed until when we try to write to it.
Comment 1 ritz 2008-04-09 10:21:30 EDT
Created attachment 301812 [details]
close fd
Comment 2 Zdenek Prikryl 2008-04-09 11:34:25 EDT
*** Bug 306981 has been marked as a duplicate of this bug. ***
Comment 3 ritz 2008-04-09 12:55:23 EDT
patch attached is based on upstream code. 

Comment 11 errata-xmlrpc 2009-01-20 15:53:51 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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