Bug 441686 - acpid leaks fds
Summary: acpid leaks fds
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: acpid
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Prikryl
QA Contact:
URL:
Whiteboard:
: 306981 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-09 14:21 UTC by ritz
Modified: 2018-10-19 20:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 20:53:51 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0091 0 normal SHIPPED_LIVE acpid bug fix update 2009-01-20 16:04:28 UTC

Description ritz 2008-04-09 14:21:30 UTC
Description of problem:
acpid leaks file descriptors

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

How reproducible:
always

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

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 14:21:30 UTC
Created attachment 301812 [details]
close fd

Comment 2 Zdenek Prikryl 2008-04-09 15:34:25 UTC
*** Bug 306981 has been marked as a duplicate of this bug. ***

Comment 3 ritz 2008-04-09 16:55:23 UTC
patch attached is based on upstream code. 



Comment 11 errata-xmlrpc 2009-01-20 20:53:51 UTC
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.

http://rhn.redhat.com/errata/RHBA-2009-0091.html


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