Bug 522195 - gnome-appearance-properties leaks file descriptors for each examined gtkrc
Summary: gnome-appearance-properties leaks file descriptors for each examined gtkrc
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: control-center
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Control Center Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-09 18:19 UTC by Alex Villacís Lasso
Modified: 2010-02-05 17:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 552713 (view as bug list)
Environment:
Last Closed: 2010-02-05 17:56:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Add close() calls for each unbalanced g_open() call (583 bytes, patch)
2009-09-09 18:46 UTC, Alex Villacís Lasso
no flags Details | Diff
Add close() call for unbalanced g_open() call (442 bytes, patch)
2009-12-09 22:08 UTC, Alex Villacís Lasso
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 606155 0 None None None Never

Description Alex Villacís Lasso 2009-09-09 18:19:20 UTC
Description of problem:
On a system with a few hundred different themes and a total of 335 distinct gtkrc files, gnome-appearance-properties will exhaust its share of allowed file descriptors. This can be seen from the following:

[root@srv64 RPMS]# ps aux | grep gnome-appearance
alex      5213 29.2  1.5  33500 15444 ?        R    12:29   0:02 gnome-appearance-properties
alex      5214  0.7  0.5  27604  5516 ?        S    12:29   0:00 gnome-appearance-properties
root      5219  0.0  0.0   4244   768 pts/4    S+   12:29   0:00 grep gnome-appearance
[root@srv64 RPMS]# ls -l /proc/5213/fd 
total 0
lr-x------ 1 alex alex 64 sep  9 13:12 0 -> /dev/null
lrwx------ 1 alex alex 64 sep  9 13:12 1 -> /home/alex/.xsession-errors
l-wx------ 1 alex alex 64 sep  9 13:12 10 -> pipe:[1567286]
lr-x------ 1 alex alex 64 sep  9 13:12 100 -> /home/alex/.themes/Clearlooks Wine Dark/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 1000 -> /usr/share/themes/Bluecurve-Gnome/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 1001 -> /home/alex/.themes/Murrina-SandBlue/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 1002 -> /usr/share/themes/HighContrast/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 1003 -> /home/alex/.themes/Orbital/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 1004 -> /home/alex/.themes/Kallisti/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 1005 -> /usr/share/themes/Nodoka-Midnight/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 1006 -> /usr/share/themes/MurrinaGilouche/gtk-2.0/gtkrc
...
lr-x------ 1 alex alex 64 sep  9 13:12 995 -> /usr/share/themes/Clearlooks_Cairo-Lila/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 996 -> /home/alex/.themes/eXperience/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 997 -> /home/alex/.themes/Neutronium-Gtk2/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 998 -> /home/alex/.themes/Clearlooks-Vista/gtk-2.0/gtkrc
lr-x------ 1 alex alex 64 sep  9 13:12 999 -> /home/alex/.themes/MurrinaAngustifolium/gtk-2.0/gtkrc

After exhausting the file descriptor quota, the program reverts to the default gtk theme when clicking a different theme, instead of switching to the desired theme. All the other running applications switch to the requested theme. At the same time the following appears in the error log:

(gnome-appearance-properties:5213): capplet-common-WARNING **: Could not open file "/home/alex/.themes/Ubuntulooks-Blue/gtk-2.0/gtkrc"

(gnome-appearance-properties:5213): capplet-common-WARNING **: Could not open file "/home/alex/.themes/Ubuntulooks-Blue/gtk-2.0/gtkrc"

(gnome-appearance-properties:5213): capplet-common-WARNING **: Could not open file "/home/alex/.themes/Ubuntulooks-Blue/gtk-2.0/gtkrc"


Version-Release number of selected component (if applicable):
control-center-2.24.0.1-13.fc10.i386

How reproducible:
Always

Steps to Reproduce:
1. Collect a large number of gnome themes (a few hundred)
2. Run gnome-appearance-properties
3. Switch to a different theme
  
Actual results:
program reverts to default theme

Expected results:
program should use requested theme

Comment 1 Alex Villacís Lasso 2009-09-09 18:46:26 UTC
Created attachment 360319 [details]
Add close() calls for each unbalanced g_open() call

With this patch, gnome-appearance-properties no longer leaks file descriptors, and works properly even with hundreds of themes.

Comment 2 Bug Zapper 2009-11-18 12:14:19 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Alex Villacís Lasso 2009-11-18 23:32:34 UTC
Still present with 
control-center-2.28.1-4.fc12.i686
on just-released Fedora 12 LiveCD for i686.

However, since the supplied patch was made against 2.24.0.1-13, I am not sure whether it will apply cleanly.

Comment 4 Alex Villacís Lasso 2009-12-09 21:27:02 UTC
Still present with
control-center-2.28.1-8.fc12.x86_64
on installed x86_64 system.

Comment 5 Alex Villacís Lasso 2009-12-09 22:08:54 UTC
Created attachment 377312 [details]
Add close() call for unbalanced g_open() call

Updated patch for control-center-2.28.1-8 . The Fedora 12 version fixes one of the leaks, but not the other. This patch fixes the second leak.

Comment 6 Alex Villacís Lasso 2010-01-04 20:48:21 UTC
control-center-2.28.1-12 has been released, and it still contains the file descriptor leak. Why is this bug not acknowledged? This bug report even has a patch for the problem that works correctly.

Comment 7 Ray Strode [halfline] 2010-01-05 21:42:47 UTC
Hey Alex, thanks for the patch.  Let me post it upstream for you, and I can push a f12 update too.

Comment 8 Ray Strode [halfline] 2010-01-05 21:43:26 UTC
Component is misset to 0xFFFF, moving to control-center.

Comment 9 Fedora Update System 2010-01-05 22:20:03 UTC
control-center-2.28.1-13.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/control-center-2.28.1-13.fc12

Comment 10 Fedora Update System 2010-01-07 00:54:56 UTC
control-center-2.28.1-13.fc12 has been pushed to the Fedora 12 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 control-center'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0214

Comment 11 Alex Villacís Lasso 2010-02-05 17:56:48 UTC
With control-center-2.28.1-15 the bug no longer appears. Marking as fixed.


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