GNOME Bugzilla – Bug 606155
gnome-appearance-properties leaks file descriptors for each examined gtkrc
Last modified: 2010-01-06 20:45:47 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
(patch is from Alex the reporter)
Thanks for the report. The patch was incomplete, however.