Bug 441686

Summary: acpid leaks fds
Product: Red Hat Enterprise Linux 5 Reporter: ritz <rkhadgar>
Component: acpidAssignee: Zdenek Prikryl <zprikryl>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: psklenar, tao, zprikryl
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:53:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
close fd none

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