Apparently a process called gsd-housekeeping is periodically invoked on my Ubuntu 17.10 system. It traverses my /var/tmp for some reason. Looks like it is leaking file descriptors while doing so.
My syslogs are full of error messages like the following:
Jan 26 20:21:42 snail gsd-housekeepin[3178]: Failed to enumerate children of /var/tmp/chmaa-backup/usr/include/c++/5/bits/stl_raw_storage_iter.h: Error opening directory '/var/tmp/chmaa-backup/usr/include/c++/5/bits/stl_raw_storage_iter.h': Too many open files
Jan 26 20:21:42 snail gsd-housekeepin[3178]: Failed to enumerate children of /var/tmp/chmaa-backup/usr/include/c++/5/bits/basic_string.h: Error opening directory '/var/tmp/chmaa-backup/usr/include/c++/5/bits/basic_string.h': Too many open files
Jan 26 20:21:42 snail gsd-housekeepin[3178]: Failed to enumerate children of /var/tmp/chmaa-backup/usr/include/c++/5/bits/quoted_string.h: Error opening directory '/var/tmp/chmaa-backup/usr/include/c++/5/bits/quoted_string.h': Too many open files
Jan 26 20:21:42 snail gsd-housekeepin[3178]: Failed to enumerate children of /var/tmp/chmaa-backup/usr/include/c++/5/bits/postypes.h: Error opening directory '/var/tmp/chmaa-backup/usr/include/c++/5/bits/postypes.h': Too many open files
Jan 26 20:21:42 snail gsd-housekeepin[3178]: Failed to enumerate children of /var/tmp/chmaa-backup/usr/include/c++/5/bits/stl_iterator.h: Error opening directory '/var/tmp/chmaa-backup/usr/include/c++/5/bits/stl_iterator.h': Too many open files
Jan 26 20:21:42 snail gsd-housekeepin[3178]: Failed to enumerate children of /var/tmp/chmaa-backup/usr/include/c++/5/bits/move.h: Error opening directory '/var/tmp/chmaa-backup/usr/include/c++/5/bits/move.h': Too many open files
$ lsb_release -rd
Description: Ubuntu 17.10
Release: 17.10
$ apt policy gnome-settings-daemon
gnome-settings-daemon:
Installed: 3.26.2-0ubuntu0.1
Candidate: 3.26.2-0ubuntu0.1
Version table:
*** 3.26.2-0ubuntu0.1 500
500 http://se.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages
100 /var/lib/dpkg/status
3.26.1-0ubuntu5 500
500 http://se.archive.ubuntu.com/ubuntu artful/main amd64 Packages
Also seen on Bionic with a gnome xorg session.