Bug 301207 - amarok fails to sync itunesdb with "too many open files" error
Summary: amarok fails to sync itunesdb with "too many open files" error
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/iPod iPhone (show other bugs)
Version: 2.5-git
Platform: unspecified Linux
: NOR normal
Target Milestone: 2.6
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 11:10 UTC by Piotr Keplicz
Modified: 2012-06-05 21:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.6
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Keplicz 2012-06-05 11:10:54 UTC
When copying a collection of 6700 tracks, Amarok fails to update the iTunesDB during the process with a "Too many open files" error. Indeed, during the transfer, lsof show a continously raising number of open files with cover artwork (/tmp/kde-$USER/amarok*.png). 

ulimit is: open files (-n) 1024




Reproducible: Always

Steps to Reproduce:
1. Attempt to transfer a large collection to an iPod.

Actual Results:  
A message appears in the lower right corner of the main Amarok window, stating that creating an iTunesDB.xxx file resulted in a "Too many open files error".

At the end, transfer fails with an "internal Amarok error" notice.

Expected Results:  
Tracks are copied regardless of their count.
Comment 1 Matěj Laitl 2012-06-05 11:17:53 UTC
Thanks for the report, I can confirm this bug. This is connected to the way we store album covers that are determined to be written to the Amarok db. I'll investigate how we can work around the open files limit.
Comment 2 Matěj Laitl 2012-06-05 21:43:47 UTC
Git commit 980fdcac9892d19737b9cd51a3fb270d27c4bd09 by Matěj Laitl.
Committed on 05/06/2012 at 23:38.
Pushed by laitl into branch 'master'.

IpodCollection: Don't hit ulimit -n when copying covers

This was because QTemporaryFile holds its file open. It cannot be
forced to close its file, so use slightly more dumb solution.
FIXED-IN: 2.6

M  +1    -0    ChangeLog
M  +1    -0    src/core-impl/collections/ipodcollection/IpodCollection.cpp
M  +12   -12   src/core-impl/collections/ipodcollection/IpodMeta.cpp
M  +4    -5    src/core-impl/collections/ipodcollection/IpodMeta.h

http://commits.kde.org/amarok/980fdcac9892d19737b9cd51a3fb270d27c4bd09