Bugzilla – Bug 9040
Scanning Semi-Broken in MacOs for 7.1+
Last modified: 2009-07-31 10:26:33 UTC
I presume the issue is with the scanner itself, but it could be more the mDNS component that I just noticed in the list (it's hard for me to say). In 7.0, scanning works fine on my mac, no issues whatsoever. In 7.1 (and 7.0.1 and 7.2), scanning stops shortly (a few minutes) after starting. Looking at the scanner log file I see something similar to the following: [08-08-01 09:37:25.9448] main::main (219) Error: Failed when running main scan: [spec is not a valid file specification at /Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Utils/Misc.pm line 416. ] [08-08-01 09:37:25.9451] main::main (220) Error: Skipping post-process & Not updating lastRescanTime! Also, I often (always?) find a mDNSResponderPosix_2008-08-02-111920_macmini.crash file in the craash (crashreporter?) folder of my library folder. Attached is a zip that contains the server.log, scanner.log and mDNS crash file from my last attempt to do a scan with 7.1. I say that scanning is semi-broken, because if I point SC to a small subset of my library (few albums), scanning works fine (as seen in the uploaded scanner.log). If you have access to customer support records, you can find the whole saga under question reference #080728-000843. I am ready to test anything else/provide more feedback if helpful (and although I am not a programmer, I can use vi and so can comment out thinsg like the function 'sub isMacAlias' that seems to be the cause of all my woes...). This issue started with 7.0.1 and continues in 7.1 and 7.2 (well a build of 7.2 I tried a week to ten days ago). When I originally came across this issue, I was using MacOs 10.5.2; upgrading to 10.5.4 does not change anything.
I cannot access the logs I attached to 'Question Reference #080728-000843' and am currently at work so will not be able to upload until approx 21h00 CEST.
Support asked me to do a couple of tests; the results are that I can scan all of my library when I split it up and scan the pieces separately, but I cannot scan the entire library. Here is what I last wrote to support: Just a reminder that with 7.0 (and 6.5.x) I could scan my entire library without any issues on my mac; and with the Windows or Linux 7.1 versions of SC I can still scan my entire library. Anyway I did as you requested, in a slightly different way according to my music library's organization. The short of it is that if I cut up my library into smaller pieces, I can scan each piece OK. Here's the long of it: - clean install of SC 7.1 (removed all SC files prior to installation as per FAQ) - scan of lossless folder = OK (Total Tracks: 585, Total Albums: 62, scan time = 00:03:17). - scan (clear library and rescan everything) of lossy folder = FAIL (no mDNS crash (Misc.pm line 416 problem), scan time = 00:15:53) - scan (clear library and rescan everything) of lossy/_Compilations_and_labels_and_OSTs = FAIL (no sign of progress after 45 minutes (usually my whole library is scanned within this time); stopped SC from SC prefpane in System Preferences, and noticed another mDNS crash of the same time) - restarted SC and this time the scan progress bar (retry lossy/_Compilations_and_labels_and_OSTs) updates... - scan of lossy/_Compilations_and_labels_and_OSTs = FAIL (SC suggests success: Directory Scan (4021 of 4021) Complete 00:23:15 Playlist Scan (2 of 2) Complete 00:00:04 Merge Various Artists (230 of 230) Complete 00:00:07 Artwork Scan (7 of 336) Running 00:00:08 All Tomorrow's Parties 3.0 (Disc 2 of 2) SqueezeCenter has finished scanning your music collection.00:23:34 but the scanner log file tells another story: [08-08-05 23:57:55.5291] main::main (219) Error: Failed when running main scan: [spec is not a valid file specification at /Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Utils/Misc.pm line 416. ] [08-08-05 23:57:55.9985] main::main (220) Error: Skipping post-process & Not updating lastRescanTime! [08-08-05 23:57:56.8994] Slim::Schema::Storage::dbh (33) Warning: Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Schema/Storage.pm line 33. - However library is NOT empty, so main scan actually succeeded? - stopped SC (another mDNS crash...), temporarily moved _Compilations_and_labels_and_OSTs out of lossy, restarted SC - scan (clear library and rescan everything) of lossy (without _Compilations_and_labels_and_OSTs) = SUCCESS (SC suggests success: Directory Scan (13690 of 13690) Complete 00:31:29 Playlist Scan (2 of 2) Complete 00:00:01 Merge Various Artists (1318 of 1318) Complete 00:00:24 Artwork Scan (1322 of 1322) Complete 00:07:02 Database Optimize Complete 00:00:12 SqueezeCenter has finished scanning your music collection.00:39:08) - stopped SC (another mDNS crash...), restarted SC - scan (clear library and rescan everything) of _Compilations_and_labels_and_OSTs (in new - temporary - place on disk) = FAIL (Directory Scan Running 00:00:59 SqueezeCenter has finished scanning your music collection.00:00:59 [08-08-06 01:10:20.5609] main::main (219) Error: Failed when running main scan: [spec is not a valid file specification at /Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Utils/Misc.pm line 416. ] [08-08-06 01:10:20.5613] main::main (220) Error: Skipping post-process & Not updating lastRescanTime!) - stopped SC (2 more mDNS crashes...), restarted SC (no sign of progress after 15 minutes - no sign of directory traversal; stopped SC from SC prefpane in System Preferences, and noticed another mDNS crash of the same time) - restarted SC and this time the scan progress bar (retry _Compilations_and_labels_and_OSTs in new - temporary - place on disk) updates... - scan of _Compilations_and_labels_and_OSTs (in new - temporary - place on disk) = SUCCESS!! (Directory Scan (4021 of 4021) Complete 00:14:36 Playlist Scan (2 of 2) Complete 00:00:02 Merge Various Artists (230 of 230) Complete 00:00:04 Artwork Scan (336 of 336) Complete 00:02:27 Database Optimize Complete 00:00:06 SqueezeCenter has finished scanning your music collection.00:17:15) - Conclusion is that it is the volume of files causing the problem so must be a bug in SC 7.1, introduced between 7.0 and 7.0.1
Created attachment 3762 [details] Zip file containing scanner and server log files Log files related to my last update.
Chris - thanks for the info so far. Could you please enable debugging for scan.* options (settings/advanced/logging), then run a full scan again. Once it's done (or crashed...) please upload the scanner.log file. You can forget about the mDNS issue for no. This is very likely unrelated to your issue. One more thing: are you running on a x86 or PowerPC Mac?
And yet a few more questions: - how large is your library? - are you using any aliases?
Created attachment 3773 [details] check whether file can be read before checking for alias Could you please give this patch a try? It will check whether the file can be read or not to the alias detection. From the error message I assume there's some problem reading a file when we try to open it to see whether it's an alias or not.
- x86 Mac Mini - library has more than 20,000 tracks in it - not using aliases (even removed left over windows shortcuts) - music is stored in a NAS, connecting via CIFS/SMB (I can temporarily activate AFP and test over that instead if you need me to) What order do you want me to do tests with? 1. retry 7.1 with scanning (only) logs set to debug 2. try attached patch* on 7.1 then rescan (again debug logs) I'm out tonight, but will try to do 1. at least with aim of attaching logs tomorrow morning (if scanner has stopped). * please point me to an newbie's guide to applying patches if you know of one, otherwise I'll look via google.
I just wanted to note that I just completed a scan of 105,200 files without issue using SC 7.1 - 22170 on a Intel Mac mini with 10.5.4. I did not have any aliases involved and these were all local files however.
Please try the patch fist as I hope it will solve your issue.
Steven - do you have a possibility to run a test against a NAS or other network share?
Actually I have all of my music (within a hundred or so tracks) backed-up to a firewire drive, so I could try scanning that first to see if that works. If it does, then I'll try apply the patch and re-test.
FWIW: I've just successfully scanned 11k tracks stored on a ReadyNAS using my MacBook.
I upgraded to 7.1 and applied the patch - I can now scan (clear library and scan everything) my entire library :) I don't suppose you need the logs, but I can upload them if needed.
Thanks for testing! Fixed in 7.2 at change 22532 - check whether a file can be read before trying to get its resource tree (OSX)
(In reply to comment #13) > I upgraded to 7.1 and applied the patch - I can now scan (clear library and > scan everything) my entire library :) > > I don't suppose you need the logs, but I can upload them if needed. > Marking as verified
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC