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 662590 - File names for cached avatars too long
File names for cached avatars too long
Status: RESOLVED NOTGNOME
Product: folks
Classification: Platform
Component: e-d-s backend
0.6.x
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-24 09:58 UTC by Age Bosma (IRC: Forage)
Modified: 2011-10-25 23:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Age Bosma (IRC: Forage) 2011-10-24 09:58:10 UTC
Hardly any cached avatar is created because the resulting file names are too long.

The file ~/.xsession-errors contains a long list of errors like:

eds-WARNING **: edsf-persona.vala:1190: Couldn't cache avatar for Edsf.Persona 'eds:1319145214.3663.2@Khazad-dum:http\://www.google.com/m8/feeds/contacts/agebosma%40gmail.com/full/34665a9d0f79b916': Error opening file '/home/forage/.cache/folks/avatars/eds%3A1319145214.3663.2%40Khazad-dum%3Ahttp%5C%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds%2Fcontacts%2Fagebosma%2540gmail.com%2Ffull%2F34665a9d0f79b916': File name too long
Comment 1 Philip Withnall 2011-10-24 16:43:52 UTC
What architecture/operating system/distribution are you on? What file system is your home directory using? What're the values of your PATH_MAX and NAME_MAX (both defined in /usr/include/linux/limits.h)?

That entire path is only 178 characters in length, which is shorter than the standard NAME_MAX of 255.
Comment 2 Age Bosma (IRC: Forage) 2011-10-24 17:28:32 UTC
I'm running a clean install of Ubuntu 11.10 (x86) with GNOME Shell.
The home folder is on an ext4 partition and only that folder is encrypted (default Ubuntu install procedure).
NAME_MAX 255
PATH_MAX 4096
Comment 3 Philip Withnall 2011-10-24 19:00:55 UTC
Ah, I guess you're using ecryptfs. It appears that ecryptfs mangles file names and makes them much longer by encrypting them, which pushes them over the 255 character limit.

I don't think this is a bug in libfolks, really, since we're generating file names comfortably below NAME_MAX in length.

I guess you have several options:
 • Ignore the problem. This will just mean that you can't see your contacts' avatars in GNOME Contacts when you're not online in Empathy.
 • Disable ecryptfs, or disable file name encryption (which I believe is possible without disabling encryption of the file contents themselves).

This seems to be a relevant ecryptfs bug, which I'll consider as the real bug here: https://bugs.launchpad.net/ecryptfs/+bug/344878
Comment 4 Age Bosma (IRC: Forage) 2011-10-25 01:15:46 UTC
Ah, darn, that's just stupid. A problem lying around for two and a half years and nothing has been done so far...

Thanks for looking at the issue and finding the cause though.

Just wondering: why is there so much info included in the file names of libfolks anyway? Wouldn't shorter file names be more efficient and manageable? :-D
Comment 5 Philip Withnall 2011-10-25 07:23:34 UTC
(In reply to comment #4)
> Just wondering: why is there so much info included in the file names of
> libfolks anyway? Wouldn't shorter file names be more efficient and manageable?
> :-D

The file name of a cached avatar is (an escaped version of) the ID of the persona it belongs to. These IDs aren't short because they are built in a hierarchy out of (typically) several URIs.
Comment 6 Travis Reitter 2011-10-25 23:34:57 UTC
Some people had reported a suspiciously-low number of cached avatars, but I couldn't reproduce it for any of my accounts. I wonder if this was the problem.

Guillaume, if you still have this problem, are you using encryptfs as well?