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 770553 - Gnome-Music crashes with "Too many open files"
Gnome-Music crashes with "Too many open files"
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-music-maint
gnome-music-maint
: 786980 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-08-29 13:39 UTC by Mikhail
Modified: 2017-12-28 18:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log for gnome-music --debug (1.60 MB, text/x-log)
2016-08-29 13:39 UTC, Mikhail
Details
traces from gdb (31.14 KB, text/plain)
2016-08-30 04:57 UTC, Mikhail
Details

Description Mikhail 2016-08-29 13:39:37 UTC
Created attachment 334366 [details]
log for gnome-music --debug

Log attached, can upload core dump if needed.
Size of library approximately is 20k tracks. I've tried shrinking the library, but this did not really help.

Happening on Fedora 24.
Comment 1 Marinus Schraal 2016-08-29 21:39:40 UTC
Maybe just the 't a a bt' for the coredump for now will do?
Comment 2 Mikhail 2016-08-30 04:57:40 UTC
Created attachment 334411 [details]
traces from gdb
Comment 3 Mikhail 2016-08-30 04:57:51 UTC
@Marinus, uploaded.
Comment 4 Marinus Schraal 2016-08-30 05:51:56 UTC
Is this a first run? As in, you haven't been able to actually use music by now?
Comment 5 Mikhail 2016-08-30 07:22:11 UTC
No, I was using gnome-music for almost a year without an issue. Issue has arised after last update to gnome 3.20.2
Comment 6 Mikhail 2016-08-30 07:25:25 UTC
After a little bit more investigation, I've found that ulimit -n is set to 1024 for some reason on Fedora 24.

Rising this limit to previous default of 65k did fix the issue, however I think that this is a bit strange behaviour to have >1k descriptors opened at once. I am not in any way filesystem expert, nor am I linux developer expert, so this might be complete BS, but this still looks like a nasty bug to me.
Comment 7 Marinus Schraal 2016-08-30 08:30:20 UTC
Is that limit set for all Fedora 24 installs, or just a local mishap?

And I agree, we shouldn't have that much files open at one time. We do a lot of async file operations on startup (mostly loading art) and that's not throttled/pooled as it is, combined with python maybe not cleaning up fast enough. It has been on my radar for a while.
Comment 8 Mikhail 2016-08-30 12:43:25 UTC
I'll take a look on fresh install of F24 on VM.. but on both machines I run after update 23->24 that limit is set to 1024.
Comment 9 Mikhail 2016-08-30 18:31:14 UTC
I did not have a chance to verify it on fresh 24 install, but there is this on RH bugtracker: https://bugzilla.redhat.com/show_bug.cgi?id=1338760
Comment 10 Matteo Settenvini 2016-11-09 09:26:20 UTC
This is also happening for me on Debian stretch (testing) too:

~$ ulimit -Hn
4096
~$ ulimit -Sn
1024

The relevant stacktrace for me is:

~$ gnome-music 
10:18:02 WARNING	can't find artwork for album '1978-10-16: Guildhall, Portsmouth, Hampshire, UK' by Hawklords

(gnome-music:15366): Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
10:18:02 WARNING	Error: g-io-error-quark: Error opening file /usr/share/icons/Adwaita/32x32/places/folder-music-symbolic.symbolic.png: Too many open files (31)
Traceback (most recent call last):
  • File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 290 in album_art_for_item_callback
  • File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 257 in finish
  • File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 142 in get
  • File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 104 in _make_default_icon
GLib.Error: g-io-error-quark: Error opening file /usr/share/icons/Adwaita/32x32/places/folder-music-symbolic.symbolic.png: Too many open files (31)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 295, in album_art_for_item_callback
  File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 257, in finish
  File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 142, in get
  File "/usr/lib/python3/dist-packages/gnomemusic/albumartcache.py", line 104, in _make_default_icon
GLib.Error: g-io-error-quark: Error opening file /usr/share/icons/Adwaita/32x32/places/folder-music-symbolic.symbolic.png: Too many open files (31)
Comment 11 Marinus Schraal 2016-11-09 14:06:56 UTC
(In reply to Matteo Settenvini from comment #10)
> This is also happening for me on Debian stretch (testing) too:

What version of grilo & gnome-music?
Comment 12 Matteo Settenvini 2016-11-19 20:00:41 UTC
(In reply to Marinus Schraal from comment #11)
> (In reply to Matteo Settenvini from comment #10)
> > This is also happening for me on Debian stretch (testing) too:
> 
> What version of grilo & gnome-music?

Package: gnome-music
Version: 3.22.2-1

Package: libgrilo-0.3-0
Source: grilo
Version: 0.3.2-2
Comment 13 donfuy 2017-01-16 17:26:58 UTC
I'm having this exact same problem on arch, version 3.22.2-2.
Comment 14 Marinus Schraal 2017-08-17 14:44:08 UTC
I'm pretty sure this should be solved with https://git.gnome.org/browse/gnome-music/commit/?id=dbce6f439ce86949f1f70561bbfbc6af9a2b1147 .

Please test 3.25.90 if you can and reopen if the problem persists.

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 15 Marinus Schraal 2017-12-28 18:55:19 UTC
*** Bug 786980 has been marked as a duplicate of this bug. ***