! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
menu-plugin does not close rc files leading to filedescriptor exhaustion
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Gergan Penkov 2007-03-27 12:30:48 CEST
I have had the panel started from terminal, and after 1-2 days the menu-plugin stopped working and the terminal was full of such logs:
** (xfce4-menu-plugin:8453): CRITICAL **: Unable to create FrapMenu from file '/etc/xdg/menus/xfce-applications.menu': Too many open files

** (xfce4-menu-plugin:8453): CRITICAL **: Unable to create FrapMenu from file '/etc/xdg/menus/xfce-applications.menu': Too many open files

** (xfce4-menu-plugin:8453): CRITICAL **: Unable to create FrapMenu from file '/etc/xdg/menus/xfce-applications.menu': Too many open files

** (xfce4-menu-plugin:8453): CRITICAL **: Unable to create FrapMenu from file '/etc/xdg/menus/xfce-applications.menu': Too many open files

** (xfce4-menu-plugin:8453): CRITICAL **: Unable to create FrapMenu from file '/etc/xdg/menus/xfce-applications.menu': Too many open files

** (xfce4-menu-plugin:8453): CRITICAL **: Unable to create FrapMenu from file '/etc/xdg/menus/xfce-applications.menu': Too many open files

** (xfce4-menu-plugin:8453): CRITICAL **: Unable to create FrapMenu from file '/etc/xdg/menus/xfce-applications.menu': Too many open files

doing lsof, led me to such output (only part of it):

xfce4-men  8453       gero   24r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   32r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   40r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   48r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   56r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   64r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   72r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   80r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   88r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero   96r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  104r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  112r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  122r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  130r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  138r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  146r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  154r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  162r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  170r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  178r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  186r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  194r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  202r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  210r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  218r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  226r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  234r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  242r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  250r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  258r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  266r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  274r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data
xfce4-men  8453       gero  282r      DIR        8,3     4096    2064428 /usr/share/xfce4/menu-data

I have found out that the culprit is panel-plugin/desktop-menu-plugin.c dmp_read_config-function which does not close the file opened with 
rcfile = xfce_rc_simple_open(cfgfile, TRUE);
I'll attach a patch, which is trivial simply adding:

xfce_rc_close (rcfile);

to the end of the function, resolves the problem for me.
Comment 1 Gergan Penkov 2007-03-27 12:32:08 CEST
Created attachment 1065 
open-files.patch

closes the opened rc-file on function exit
Comment 2 Brian J. Tarricone (not reading bugmail) 2007-05-05 18:10:47 CEST
Fixed in svn, trunk and 4.4 branch, thanks.

Bug #3065

Reported by:
Gergan Penkov
Reported on: 2007-03-27
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Attachments

open-files.patch (485 bytes, patch)
2007-03-27 12:32 CEST , Gergan Penkov
no flags

Additional information