Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 04-22-2009, 08:14 AM   #1
33hobbit
Prospect
 
Join Date: Apr 2009
Posts: 31
Spotlight weirdness on 10.4

A friend's Tiger ibook started experiencing all kinds of slowdowns
and beach-balls when trying to use Spotlight, which she routinely
consults to quickly find applications and such. She was getting
the dreaded
_ Can't checkin with server named com.apple.metadata.mdserver, error 0x10000004
messages in the log, but that wasn't being particularly helpful.

After a *lot* of googling and reading the references listed below
and fooling around with deleting/recreating of the Spotlight database
we were almost at our wits' end, but with about six eyeballs into the
logfiles we got into slightly deeper thought about these entries that
had gone by earlier:

... Apr 17 22:20:48 mds[179]: *** -[NSCFData _getCString:maxLength:encoding:]: selector not recognized [self 0x480ca0]
... Apr 17 22:20:48 mds[179]: Reason : *** -[NSCFData _getCString:maxLength:encoding:]: selector not recognized [self 0x480ca0]

Now, nowhere does it hint about bad or misparsed characters in there but
one of our group who had to leave right then said "hey, try scanning
around for files with a NEWLINE in the name" as he headed out. So we
did that, and what do you know? A recently-downloaded package for
managing recipes came with a small database of stuff, and one of the
files that had gotten installed sure enough had a newline in the
name. We did this with "find /<whatever> -type f -print" and then
looking for any line that didn't begin with a "/".

Apparently that causes the Tiger "mds" to trip up and hang. The
process was still running, convincing everything else that looks for
it that Spotlight was alive and well, except that after a longish
timeout, metadata search queries never got answered. Killing the
server caused a new one to immediately restart, but since the prior
indexing run hadn't completed it went ahead for another one and hit
the same problem all over again. Once the offending file [and the
whole surrounding package, because it was lame] was removed,
everything was fine. Much more satisfactory than the total OS
reinstall that was starting to be considered...

This problem doesn't seem to be in Leopard; I tried deliberately
creating a file with a newline in it and temporarily re-enabling
com.apple.metadata.mds and telling it to index everything. It didn't
trip over my trap file or even mention anything in the log, but it
also didn't actually add it to the index because after it was finally
done, searching for elements of the name returned nothing. At least
it didn't take out the whole Spotlight / Finder search service, so I
guess there's been an improvement. I'm mostly posting this with
generous search-strings thrown in so that people in the same bind
might actually be able to find the ANSWER, which a lot of the other
threads never arrived at. Bottom line, look for filenames with
newlines or other funny characters in them. This is like basic
"sanity-check and filter all user input 101" that Apple was still
boning up on around the time of Tiger releases, I suppose.

References:

http://macosx.com/forums/archive/t-240323.html
http://discussions.apple.com/thread....hreadID=507442
http://forums.macosxhints.com/showthread.php?t=68801
http://www.insanelymac.com/forum/ind...howtopic=31483

_H*
33hobbit is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.