GNOME Bugzilla – Bug 548131
fetching cover art results in 100% cpu utilization
Last modified: 2009-09-06 09:12:17 UTC
I have always 100% cpu utilization after importing new songs via "Import Media -> Local Folder". Banshee tries to fetch the album covers and fails, but the application doesn't crash. My internet connection is working and I don't use a http proxy. Here is the log file from "banshee-1 --debug": [Debug 16:10:30.425] Player state change: Playing -> Paused [Debug 16:13:00.368] Importing Media duration: 0.071002s [Debug 16:13:10.166] Importing Media duration: 9.79161s [Warn 16:13:15.993] Caught an exception - The remote server returned an error: (404) Not Found. (in `System') at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] [Warn 16:13:17.887] Caught an exception - The remote server returned an error: (404) Not Found. (in `System') at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] [Debug 16:13:28.636] TrackInfoDisplay RenderAnimation: 31.00 FPS [Debug 16:14:26.898] Service disposed (CoverArtService) [Debug 16:14:26.898] Service disposed (GStreamerCoreService) [Debug 16:14:26.903] Service disposed (MultimediaKeysService) [Debug 16:14:26.945] Service disposed (PodcastService) [Debug 16:14:26.945] Service disposed (GnomeService) [Debug 16:14:26.964] Service disposed (NotificationAreaService) [Debug 16:14:26.965] Service disposed (BookmarksService) [Debug 16:14:26.974] Service disposed (DapService) [Debug 16:14:26.978] Service disposed (AudioCdService) [Debug 16:14:26.980] Service disposed (NereidPlayerInterface) [Debug 16:14:26.981] Service disposed (HardwareManager) [Debug 16:14:26.982] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL [Debug 16:14:27.016] Player state change: Paused -> Idle [Debug 16:14:27.020] (libbanshee:player) bp_destroy: disposed player [Debug 16:14:27.020] Service disposed (PlayerEngine) [Debug 16:14:27.029] Service disposed (SourceManager) [Warn 16:14:27.036] Caught an exception - Object reference not set to an instance of an object (in `Banshee.CoverArt') at Banshee.CoverArt.CoverArtJob.RunQuery () [0x00000] in /build/buildd/banshee-1-1.2.1/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtJob.cs:105 at Banshee.CoverArt.CoverArtJob.Run () [0x00096] in /build/buildd/banshee-1-1.2.1/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtJob.cs:126 [Debug 16:14:27.130] Service disposed (DbConnection) When I'm playing one of the newly imported songs, the following error message alwys appears in the debug log: [Warn 16:15:32.133] Caught an exception - The remote server returned an error: (404) Not Found. (in `System') at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] OS: Ubuntu Hardy Banshee Version: 1.2.1 Banshee Version from Repository: deb http://ppa.launchpad.net/banshee-team/ubuntu hardy main regards, jochen
I forgot to mention that "Tools -> Cover Art -> Download Cover Art" also results in 100% cpu utilization. When I open now the "Stop Downloading Cover Art" dialog and click on the "Stop" button, I get no debug output and banshee stil tries to fetch the cover art. But after exiting from banshee, the last debug log message is: [Warn 16:29:56.948] Caught an exception - Object reference not set to an instance of an object (in `Banshee.CoverArt') at Banshee.CoverArt.CoverArtJob.Run () [0x0002e] in /build/buildd/banshee-1-1.2.1/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtJob.cs:121 [Debug 16:29:57.039] Service disposed (DbConnection)
Created attachment 117410 [details] Banshee log file Created by launching kill -s QUIT $(pidof banshee-1); cp ~/.config/banshee-1/log ~/Desktop/banshee.log
I have similar problem. While trying to download the album cover banshee is using 100% of CPU. There is no way to cancel the download process. Clicking the suitable for cancelling button, gives no effect. The only way to fix this problem is to restart banshee. After that, the album cover of which downloading caused the problem is available in banshee and appears while playing the tracks from that album. I've attached the log file which had been created by launching this command: kill -s QUIT $(pidof banshee-1); cp ~/.config/banshee-1/log ~/Desktop/banshee.log
*** Bug 560475 has been marked as a duplicate of this bug. ***
I encounter the same problem with the cover art fetching plugin. When a new album is imported to Banshee the the program start searching for new album cover. It doesn't stop, keeps going and the cpu power is drained out of my linux box. I have a two kernel prosessor. And Banshee uses ordinarly less than 3% av the cpu resources. when fetching album art it uses up to 90% of the cpu available. I have to stop the program to reset. I haven't experienced this before, and I have used Benahee for some month's. -- mvh Dag R
*** Bug 564093 has been marked as a duplicate of this bug. ***
*** Bug 564180 has been marked as a duplicate of this bug. ***
The log from bug #564180 : [Debug 15:39:30.943] Executed in 111ms SELECT DISTINCT CoreAlbums.AlbumID, CoreAlbums.Title, CoreArtists.Name, CoreTracks.Uri, CoreTracks.UriType FROM CoreTracks, CoreArtists, CoreAlbums WHERE CoreTracks.PrimarySourceID = 1 AND CoreTracks.DateUpdatedStamp > 1203107966 AND CoreTracks.AlbumID = CoreAlbums.AlbumID AND CoreAlbums.ArtistID = CoreArtists.ArtistID AND CoreTracks.AlbumID NOT IN ( SELECT AlbumID FROM CoverArtDownloads WHERE LastAttempt > 1202503166 OR Downloaded = 1) GROUP BY CoreTracks.AlbumID LIMIT 10 [Debug 15:39:31.030] Executed in 77ms SELECT count(DISTINCT CoreTracks.AlbumID) FROM CoreTracks WHERE CoreTracks.PrimarySourceID = 1 AND CoreTracks.DateUpdatedStamp > 1203107966 AND CoreTracks.AlbumID NOT IN ( SELECT AlbumID FROM CoverArtDownloads WHERE LastAttempt > 1202503166 OR Downloaded = 1) [Debug 15:39:31.138] Executed in 106ms SELECT DISTINCT CoreAlbums.AlbumID, CoreAlbums.Title, CoreArtists.Name, CoreTracks.Uri, CoreTracks.UriType FROM CoreTracks, CoreArtists, CoreAlbums WHERE CoreTracks.PrimarySourceID = 1 AND CoreTracks.DateUpdatedStamp > 1203107966 AND CoreTracks.AlbumID = CoreAlbums.AlbumID AND CoreAlbums.ArtistID = CoreArtists.ArtistID AND CoreTracks.AlbumID NOT IN ( SELECT AlbumID FROM CoverArtDownloads WHERE LastAttempt > 1202503166 OR Downloaded = 1) GROUP BY CoreTracks.AlbumID LIMIT 10 [Debug 15:39:31.199] Executed in 58ms SELECT count(DISTINCT CoreTracks.AlbumID) FROM CoreTracks WHERE CoreTracks.PrimarySourceID = 1 AND CoreTracks.DateUpdatedStamp > 1203107966 AND CoreTracks.AlbumID NOT IN ( SELECT AlbumID FROM CoverArtDownloads WHERE LastAttempt > 1202503166 OR Downloaded = 1)
Banshee gets into an infinite loop because the "count" query return 1, but the other query returns no result. This happens when a database contains entries in CoreTracks whose AlbumID or ArtistID is wrong. You can check it by running the two following commands : sqlite3 ~/.config/banshee-1/banshee.db "select count(*) from coretracks where albumid not in (select albumid from corealbums)" sqlite3 ~/.config/banshee-1/banshee.db "select count(*) from coretracks where artistid not in (select artistid from coreartists)" If any of those have a non zero value, that's a problem. I'll post a patch to work around this.
Created attachment 124460 [details] [review] Change the cover art count query This patch changes the count query so that it has the same "where" clause as the other query. This should prevent the infinite loop. The change probably degrades the performance of the query, I'm not sure about the impacts.
Bertrand, please commit after 1.4.2 assuming you've tested this.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report. The patch degrades the performance of the count query by 20 or 30% in my tests, but it's still running in less than 50ms on my system.
*** Bug 571289 has been marked as a duplicate of this bug. ***
*** Bug 575110 has been marked as a duplicate of this bug. ***
*** Bug 576599 has been marked as a duplicate of this bug. ***
We have several reports of this happening on 1.4.3 Please reopen http://mail.gnome.org/archives/banshee-list/2009-March/msg00216.html
As I said in my e-mail, the fix did NOT make it into 1.4.3, but it is in trunk. Bug #575110 turned out to be caused by the same problem.
*** Bug 581498 has been marked as a duplicate of this bug. ***
Yup I've had this - had to disable fetching cover art completely! Good to hear it's fixed in 1.6 beta :)