Bug 521682 - setfiles leaks descriptors
Summary: setfiles leaks descriptors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-07 17:11 UTC by Steve Grubb
Modified: 2009-10-19 15:43 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-10-19 15:43:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch fixing problems described herein (474 bytes, patch)
2009-09-07 17:11 UTC, Steve Grubb
no flags Details | Diff

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!


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