After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606155 - gnome-appearance-properties leaks file descriptors for each examined gtkrc
gnome-appearance-properties leaks file descriptors for each examined gtkrc
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Appearance
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-05 21:51 UTC by Ray Strode [halfline]
Modified: 2010-01-06 20:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
close fd leak (442 bytes, patch)
2010-01-05 21:51 UTC, Ray Strode [halfline]
none Details | Review

Description Ray Strode [halfline] 2010-01-05 21:51:44 UTC
Created attachment 150862 [details] [review]
close fd leak

(from https://bugzilla.redhat.com/show_bug.cgi?id=522195)

Description From Alex Villacís Lasso (a_villacis@palosanto.com):

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 Ray Strode [halfline] 2010-01-05 21:52:35 UTC
(patch is from Alex the reporter)
Comment 2 Jens Granseuer 2010-01-06 20:45:47 UTC
Thanks for the report. The patch was incomplete, however.