dfbills.com blog

Spotlight became “sputter-heavy”

I was having problems with Spotlight on Leopard 10.5.1.  My computer was dog-slow and just plain unresponsive.  Spotlight search results were inconsistent and I was noticing that my drive was being re-indexed quite regularly (as evidenced by the spotlight menu item and the concealed progress bar).

My first troubleshooting step was to fire up Spotless to delete the indexes and allow them to rebuild.  Unfortunately, 24 hours later the indexing was still going.  My index kept stalling at around 127MB.

I used the following code to check it.

sudo du -h /.Spotlight-V100/

After watching it for about and hour, I decided to upgrade to a self-running version with Growl notifications.

while :
do
clear
sudo du -h /.Spotlight-V100/ | /usr/local/bin/growlnotify
echo “growled” & date “+%H:%M:%S%n”
sleep 90
done

Some searching revealed that quite a number of people had experienced this problem at the release of 10.5.1.  My standard tracing solution didn’t tell me too much.

lsof | grep mdworker

But, anther user explained how to use the dtrace system utility to examine the mdworker process.  On my system it was using 90-100% processor time.

sudo dtrace -n ‘syscall::open*:entry /execname == “mdworker” | execname == “mds”/ { printf("%Y %u %s %s",walltimestamp,pid,execname,copyinstr(arg0)); }’

This led me to examine the console and sure enough, the mdworker was crashing every 3 secs on a particular file and writing a crashlog.

Jan 30 23:55:07 Macintosh ReportCrash2692: Formulating crash report for process mds2686
Jan 30 23:55:07 Macintosh com.apple.launchd[1] (0x10c830.mdworker2687): Exited: Terminated
Jan 30 23:55:07 Macintosh com.apple.launchd[1] (0x10c9f0.mdworker2690): Exited: Terminated
Jan 30 23:55:07 Macintosh com.apple.launchd[1] (0x10cbb0.mdworker2691): Exited: Terminated
Jan 30 23:55:07 Macintosh com.apple.launchd[1] (com.apple.metadata.mds2686): Exited abnormally: Segmentation fault
Jan 30 23:55:07 Macintosh mds2695: (/.Spotlight-V100/Store-V1/Stores/9A285684-2061-4212-B186-56B95ACE8BD7)(Error) IndexCI in ContentIndexOpenBulk:No index
Jan 30 23:55:07 Macintosh ReportCrash2692: Saved crashreport to /Library/Logs/CrashReporter/mds_2007-11-12-235505_Macintosh.crash using uid: 0 gid: 0, euid: 0 egid: 0

After poking about for a while I settled on the same solution as many others- an OS reinstall.  Archive & Install worked fine and the entire process, including software updates, took about 90 minutes.

Fixed.

comment on this | posted in: Mac Tips Troubleshooting Unix

First iPhone 1.1.3 jailbreak fails

I attempted the first Nate True Mac iPhone 1.1.3 jailbreak and found that it failed.  My iPhone rebooted and was stuck on the Apple logo. 

No errors reported from /Volumes/jb113/Run_This, log below.


/Volumes/jb113/Run_This ; exit;
pro:~ dfbills$ /Volumes/jb113/Run_This ; exit;
Let’s start by checking your iPhone. Make sure it’s plugged in and press Enter.

Checking iPhone version…
You have iPhone version 1.1.2.
Excellent! Your phone qualifies.
Locating 1.1.3 firmware
1.1.3 package found: /Users/dfbills/Library/iTunes/iPhone Software Updates/iPhone1,1_1.1.3_4A93_Restore.ipsw
Extracting firmware…
Decrypting firmware…
Decompressing firmware…
Downloading patch…
  % Total   % Received % Xferd Average Speed   Time   Time   Time Current
                      Dload Upload   Total   Spent   Left Speed
100 10.9M 100 10.9M   0   0   205k     0 0:00:54 0:00:54—:—:— 405k
Applying patch…
Ready to upload the new firmware. Make sure your phone is on and connected, then press Enter.

Uploading image. This will take about 2 minutes…
Done!  Now head to Installer.app and install the “1.1.3 soft upgrade” package.

logout

[Process completed]

Now, I’m unsuccessfully attempting a restore to 1.1.1.  Looks like I’m going all the way up to 1.1.3 so that my phone will be functional for tomorrow.  Ugh- the bleeding edge!  No MobileScrobbling tomorrow.

comment on this | posted in: iPhone Troubleshooting

MacOSX filesystem usage

To see realtime filesystem usage in MacOSX:

fs_usage

Also useful for checking what exactly an app is doing:

fs_usage -w -f filesys | grep AppName

comment on this | posted in: Mac Tips Troubleshooting Unix

MacOSX system troubleshooting via kernel extensions

To find non-apple kernel extensions:

kextstat | grep -v apple

comment on this | posted in: Mac Tips Troubleshooting Unix

So it isn’t a bug

I’ve been wondering why the little “E” on my iPhone sometimes was filled in, appearing as a solid block.  Apple illuminated me today.

image

comment on this | posted in: iPhone News Troubleshooting

Leopard’s unix changes

I found this great technote and linked documentation on Apple’s site: “Mac OS X 10.5: Terminal command changes in Leopard.”  It all has to do with UNIX 03 conformance.

UNIX 03 Conformance Release Notes

General Command-Line Tool Differences

Now I know why this doesn’t work..

ps -auxww

The replacement would be:

ps -el

More notes as I have time to dive in.

comment on this | posted in: Mac Tips Troubleshooting Unix

Resetting iTunes preferences

It is possible to reset the iTunes preferences without wiping out iTunes.  All content-related information is stored in the “iTunes Library” file.  Application preferences are stored here:

~/Library/Preferences/

I found the following files and deleted them:

com.apple.iTunesHelper.plist
com.apple.iTunes.000d93ade640.plist
com.apple.iTunes.0016cb8bfff4.plist
com.apple.iTunes.0016cb053d11.plist
com.apple.iTunes.plist

Upon relaunch, the app displayed the user license and initial startup options.  My iPhone backup was the only setting retained in the entire preferences panel.

comment on this | posted in: Mac Troubleshooting

iTunes music store is being restocked

Looks like Apple pulled more than just the NBC content from iTunes this evening.  Let’s hope they’re just restocking for the holidays.

image

comment on this | posted in: Mac Troubleshooting

Sometimes bugs are cool

Coolest bug I’ve seen in a while: “Infinite Desktop.”

image

(2) comments | posted in: Mac Troubleshooting

CrashPlan engine notes

The good folks at Code42 have made some changes to the way that CrashPlan is loaded and controlled at the system level.  After a bit of digging, I’ve got it figured out. 

They are now using launchd to control the engine.  So at boot, the following is executed by kernel_task (with root perms):

launchctl load -w /Library/LaunchDaemons/com.crashplan.engine.plist

This means that launchd is constantly monitoring the process to make sure that it is running.  Should make the software even more reliable.

To unload the software as a mere mortal, I issued:

sudo launchctl unload -w /Library/LaunchDaemons/com.crashplan.engine.plist

The -w flag adds the “disabled” key from to plist to keep launchd from immediately relaunching the process.

All loaded processes can be listed per user and sudo can be adding to list the system-level processes.

launchctl list

My final crontab:

30 7 * * * root launchctl unload -w /Library/LaunchDaemons/com.crashplan.engine.plist
30 9 * * 1,2,3,4,5 root launchctl load -w /Library/LaunchDaemons/com.crashplan.engine.plist
0 18 * * 1,2,3,4,5 root launchctl unload -w /Library/LaunchDaemons/com.crashplan.engine.plist
30 23 * * * root launchctl load -w /Library/LaunchDaemons/com.crashplan.engine.plist

comment on this | posted in: Mac Troubleshooting Unix
« First  <  3 4 5 6 >