clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.72k stars 671 forks source link

library is not watching a device: inotify_add_watch failed: ENOSPC #1714

Open Clementine-Issue-Importer opened 10 years ago

Clementine-Issue-Importer commented 10 years ago

From orion@nwra.com on April 08, 2011 21:08:36

What steps will reproduce the problem? 1. Rip new tracks into the music library location What is the expected output? What do you see instead? All new tracks found, quickly What version of the product are you using? On what operating system? 0.7.1, fedora 14, kde 4.6.1 Please provide any additional information below. It seems to find just the first track of a new album rip.

Original issue: http://code.google.com/p/clementine-player/issues/detail?id=1714

Clementine-Issue-Importer commented 10 years ago

From orion@nwra.com on April 18, 2011 10:58:54

Downloaded r3150 rpm - seems even worse. Not picking up new albums at all without a manual scan.

Clementine-Issue-Importer commented 10 years ago

From ivanovnegro on April 18, 2011 14:28:29

Cannot confirm this. Maybe the package is broken, can you try to compile it yourself? Im on the same revision, it works perfectly like always. Are you sure that monitor library is on?

Clementine-Issue-Importer commented 10 years ago

From orion@nwra.com on April 19, 2011 09:29:32

Running from the command line, I see lots of:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No space left on device QFileSystemWatcher: failed to add paths: /export/home/orion/Music/Fentzke/iTunes/Album Artwork/Download/79540191C6ABAA7C/09/07/01

Clementine-Issue-Importer commented 10 years ago

From keirangtp on April 20, 2011 00:59:39

Summary: library is not watching a device: inotify_add_watch failed: No space left on device

Clementine-Issue-Importer commented 10 years ago

From orion@nwra.com on April 20, 2011 09:42:19

So, I removed the Music/Fentzke/iTunes directory tree (there must have been a lot of directories there) and everything is working now. So, I guess there is a limit to how many subdirectories you can watch. Perhaps there is a better way to handle this condition though.

Clementine-Issue-Importer commented 10 years ago

From john.maguire on April 22, 2011 07:41:03

The error printed by Qt is misleading, it should actually be: ENOSPC The user limit on the total number of inotify watches was reached or the kernel failed to allocate a needed resource.

This probably means we ran out of watch descriptors. cat /proc/sys/fs/inotify/max_user_watches gives me 8192 on Lucid.

I guess we could work around this by fork()'ing but maybe >8192 directories is an edge case that we just don't care about.

Summary: library is not watching a device: inotify_add_watch failed: ENOSPC
Labels: -Priority-Medium Priority-Low OpSys-Linux Component-MusicLibrary

Clementine-Issue-Importer commented 10 years ago

From john.maguire on April 22, 2011 09:03:27

After a chat with jefferai on #tomahawk...

the 8192 limit is per-user, so we can't get around it by fork()'ing: We could prompt the user when we've used half of them or so and ask for root permission to bump the value. This sucks though.

FAM/Gamin might be an alternative but there's no Qt API: http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/0650/bks/SGI_Developer/books/IIDsktp_IG/sgi_html/ch08.html#LE29093-PARENT

Clementine-Issue-Importer commented 10 years ago

From ivanovnegro on April 22, 2011 09:20:16

Hm, interesting, I dont have problems with adding new files to my library but I have the same error message. The discussion here is very techy, can someone explain what that meens, that Clementine no longer can watch my library? It works fine here but maybe Im missing something.

Clementine-Issue-Importer commented 10 years ago

From orion@nwra.com on April 22, 2011 09:29:59

Well, it probably can watch some (most) of your directories, but not all. Depends on where it ran out of directories to watch.

Clementine-Issue-Importer commented 10 years ago

From ivanovnegro on April 22, 2011 09:56:27

Have to observe this, doesnt sound very good at all. Especially I have here an amount of music and directories. Though it seems somehowe very Qt specific as all my Qt programs give me the same message also Amarok.