Bug 521682

Summary: setfiles leaks descriptors
Product: [Fedora] Fedora Reporter: Steve Grubb <sgrubb>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-19 15:43:52 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
patch fixing problems described herein none

Description Steve Grubb 2009-09-07 17:11:46 UTC
Created attachment 360008 [details]
patch fixing problems described herein

Description of problem:
If you use the -R option and have a very large list if files to check, setfiles forks many child processes and in the process forgets to close the parents descriptor after its done with it. This leads to the following errors:

/sbin/restorecon:  pipe error on /usr/src/kernels/2.6.30.5-43.fc11.x86_64/sound/usb:  Too many open files
/sbin/restorecon:  pipe error on /usr/src/kernels/2.6.30.5-43.fc11.x86_64/sound/usb/caiaq:  Too many open files
/sbin/restorecon:  pipe error on /usr/src/kernels/2.6.30.5-43.fc11.x86_64/sound/usb/usx2y:  Too many open files
/sbin/restorecon:  pipe error on /usr/src/kernels/2.6.30.5-43.fc11.x86_64/usr:  Too many open files

Comment 1 Daniel Walsh 2009-09-08 23:14:50 UTC
setfiles has had a rewrite in F12, can we put off the fix until then.

Comment 2 Steve Grubb 2009-09-09 00:25:57 UTC
F-11 should be supported another 7 months. :)  I would patch this and push it out. Right now anyone using a big list of files will hit the limit after about 1024 and then it quits working.

Comment 3 Daniel Walsh 2009-09-09 13:33:47 UTC
Miroslav, go for it.

Comment 4 Miroslav Grepl 2009-09-23 13:43:08 UTC
Fixed in policycoreutils-2.0.62-12.13.fc11

Comment 5 Steve Grubb 2009-10-19 15:43:52 UTC
Problem seems fixed, closing. Thanks!