Bug 654075

Summary: avc calls leak file descriptors
Product: [Fedora] Fedora Reporter: Christopher Hailey <christopher.e.hailey>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 13CC: jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: cups-1.4.6-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 668009 (view as bug list) Environment:
Last Closed: 2011-01-18 21:33:08 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:
Bug Depends On:    
Bug Blocks: 668009, 668010    
Attachments:
Description Flags
demonstration on how to fix cups fd leak none

Description Christopher Hailey 2010-11-16 19:47:23 UTC
Description of problem: cupsd repeatedly calls avc_init, each call allocates file descriptors until resources run out.


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


How reproducible:  Run cupsd with selinux features enabled, file descriptor count will increase over time, about 5 per job queued or cups queries, etc.  We were able to prevent this by only calling avc_init the first time through the code.

  
Actual results:  Number of file descriptors grows


Expected results: Numberof file descriptors should be about the same.


Additional info:  ipp.c and job.c contain the call.s

Comment 3 Jiri Popelka 2010-11-18 14:42:08 UTC
Thanks Christopher for the report.

Can you attach the patch that prevents the issue for you ?

Comment 4 Christopher Hailey 2010-12-06 16:27:56 UTC
Created attachment 465015 [details]
demonstration on how to fix cups fd leak

This will stop the leaks in cupsd but is a sloppy way to do it - not the way to do it but should give an idea how to fix it.  The avc open call is deprecated as well.  When we applied this to cupsd to leak went away.  BTW the leak is quite severe, 4-6 fds per cups request.

Comment 5 Jiri Popelka 2010-12-13 14:19:00 UTC
Thanks.
Patch applied as it is.

Comment 6 Fedora Update System 2011-01-07 12:30:52 UTC
cups-1.4.6-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/cups-1.4.6-1.fc14

Comment 7 Fedora Update System 2011-01-07 12:31:53 UTC
cups-1.4.6-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/cups-1.4.6-1.fc13

Comment 8 Christopher Hailey 2011-01-07 16:10:46 UTC
Will this be submitted to RHEL6 as well?

Comment 9 Tim Waugh 2011-01-07 16:28:00 UTC
Thanks for reminding me.  I've filed tracking bugs for that now.

Comment 10 Fedora Update System 2011-01-07 19:57:41 UTC
cups-1.4.6-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/cups-1.4.6-1.fc13

Comment 11 Fedora Update System 2011-01-18 21:32:47 UTC
cups-1.4.6-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2011-04-17 21:25:13 UTC
cups-1.4.6-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.