This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1297035 - gnome-settings-daemon leaks file descriptors
gnome-settings-daemon leaks file descriptors
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cups (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: 7.3
Assigned To: Zdenek Dohnal
Petr Sklenar
: Patch
Depends On:
Blocks: 1305230
  Show dependency treegraph
 
Reported: 2016-01-08 14:30 EST by Alan Matsuoka
Modified: 2017-07-25 21:25 EDT (History)
10 users (show)

See Also:
Fixed In Version: cups-1.6.3-25.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 02:46:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Close client.conf after its use (282 bytes, patch)
2016-01-12 06:50 EST, Marek Kašík
no flags Details | Diff

  None (edit)
Description Alan Matsuoka 2016-01-08 14:30:41 EST
Description of problem:

gnome-settings-daemon leaks file descriptors over time.

you can see it grow with time
gnome-set 6827 alanm  589r      REG              253,1         0 210994981 /etc/cups/client.conf
gnome-set 6827 alanm  590r      REG              253,1         0 210994981 /etc/cups/client.conf
gnome-set 6827 alanm  591r      REG              253,1         0 210994981 /etc/cups/client.conf
gnome-set 6827 alanm  592r      REG              253,1         0 210994981 /etc/cups/client.conf
gnome-set 6827 alanm  593r      REG              253,1         0 210994981 /etc/cups/client.conf
-bash-4.2$                 ls -l /etc/cups/client.conf
-

eventually it crashes with

Dec 28 10:14:39 mulchsbt gnome-session: (gnome-settings-daemon:23535): GLib-ERROR **: Creating pipes for GWakeup: Too many open files
Dec 28 10:14:39 mulchsbt gnome-session: (gnome-settings-daemon:23569): GLib-ERROR **: Creating pipes for GWakeup: Too many open files
Dec 28 10:14:39 mulchsbt kernel: traps: gnome-settings-[23535] trap int3 ip:7ffb9948d8c3 sp:7fff09405d10 error:0
Dec 28 10:14:39 mulchsbt kernel: traps: gnome-settings-[23569] trap int3 ip:7fe79360c8c3 sp:7ffc969fb6c0 error:0
Dec 28 10:14:39 mulchsbt abrt-hook-ccpp: Not saving repeating crash in '/usr/libexec/gnome-settings-daemon'
Dec 28 10:14:39 mulchsbt gnome-session[4392]: WARNING: Application 'gnome-settings-daemon.desktop' killed by signal 5
Dec 28 10:14:39 mulchsbt gnome-session: gnome-session[4392]: WARNING: Application 'gnome-settings-daemon.desktop' killed by signal 5

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

3.14.4-9.el7

How reproducible:

do an lsof on gnome-settings-daemon over time

Steps to Reproduce:
1.
2.
3.

Actual results:

number of fd's grows

Expected results:

there shouldn't be any extra growth in the number of fd's
Additional info:
(gdb) bt
#0  open64 () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f575cc50cae in open (__oflag=0, 
    __path=0x7ffd90770a90 "/etc/cups/client.conf") at /usr/include/bits/fcntl2.h:53
#2  cupsFileOpen (filename=filename@entry=0x7ffd90770a90 "/etc/cups/client.conf", 
    mode=mode@entry=0x7f575cc80874 "r") at file.c:1111
#3  0x00007f575cc785a4 in _cupsSetDefaults () at usersys.c:836
#4  0x00007f575cc7877a in cupsEncryption () at usersys.c:100
#5  0x00007f575ce968e0 in renew_subscription (data=0x21c5c60, 
    data@entry=<error reading variable: value has been optimized out>)
    at gsd-print-notifications-manager.c:1076
#6  0x00007f578c7701b3 in g_timeout_dispatch (source=0x2260340, 
    callback=<optimized out>, user_data=<optimized out>) at gmain.c:4518
#7  0x00007f578c76f79a in g_main_dispatch (context=0x20fc6d0) at gmain.c:3109
#8  g_main_context_dispatch (context=context@entry=0x20fc6d0) at gmain.c:3708
#9  0x00007f578c76fae8 in g_main_context_iterate (context=0x20fc6d0, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at gmain.c:3779
#10 0x00007f578c76fdba in g_main_loop_run (loop=0x2130dd0) at gmain.c:3973
#11 0x00007f578e27a045 in gtk_main () at gtkmain.c:1207
#12 0x00000000004037c1 in main (argc=1, argv=0x7ffd907711a8) at main.c:427
Comment 2 Marek Kašík 2016-01-12 06:50 EST
Created attachment 1113912 [details]
Close client.conf after its use

This is a problem in CUPS. Function _cupsSetDefaults() overwrites client.conf's file descriptor without closing it.
There is no opened descriptor after application of the attached patch.
Comment 9 errata-xmlrpc 2016-11-04 02:46:18 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2459.html

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