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 696220 - tries to save an unbounded number of avatars in parallel
tries to save an unbounded number of avatars in parallel
Status: RESOLVED DUPLICATE of bug 697695
Product: folks
Classification: Platform
Component: e-d-s backend
git master
Other Linux
: High major
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-20 18:43 UTC by Simon McVittie
Modified: 2013-06-16 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon McVittie 2013-03-20 18:43:55 UTC
When run against 3 copies of a real address book where many contacts have avatars (via the FOLKS_TESTS_REAL_VCARDS environment variable), the test from Bug #696104 fails:

Couldn't cache avatar for Edsf.Persona 'eds:test6:pas-id-514A00CC00000D7F':
Error opening file
'/tmp/tmp.x7By5PtrAC/.cache/folks/avatars/eds%3Atest6%3Apas-id-514A00CC00000D7F':
Too many open files

It appears that Edsf.Persona._update_avatar() doesn't take any steps to avoid trying to write out hundreds of avatars in parallel, resulting in running out of file descriptors.

If Folks needs to maintain its own cache of avatars independently of e-d-s (does it really?), it should probably have a pipeline of some reasonable depth (1? 5? 10?) and queue any subsequent avatars to be cached afterwards.
Comment 1 Travis Reitter 2013-03-20 18:46:18 UTC
Bumping, as this should be a fairly common scenario.
Comment 2 Philip Withnall 2013-03-20 20:37:50 UTC
(In reply to comment #0)
> If Folks needs to maintain its own cache of avatars independently of e-d-s
> (does it really?), …

The cache is needed because EDS can provide avatars as URIs, which we don’t want to have to keep downloading. If EDS provides an avatar as a file instead, we symlink (or hard link; I can’t remember) to it to avoid wasting disk space.

Perhaps a better solution would be to ensure EDS caches all avatars (especially URI ones) on disk itself.
Comment 3 Philip Withnall 2013-06-16 21:50:27 UTC
(In reply to comment #2)
> Perhaps a better solution would be to ensure EDS caches all avatars (especially
> URI ones) on disk itself.

Accordingly, this is a dupe of bug #697695.

*** This bug has been marked as a duplicate of bug 697695 ***