Mavericks Upgrade Experience – Apps keep freezing

So I, like a zillion other Apple fanbois, updated to Mavericks yesterday. Yay for free upgrades.

Overall, I’m impressed. It feels faster, I love the proper support for multiple monitors, iBooks on the desktop is a win, and the iCloud keychain works as advertised, with syncing to my phone.

But there’s one big negative – I’ve had multiple episodes of “applications randomly freezing”. When this occurs, the application _that I’m currently using_ just stops. It doesn’t crash, it just pauses. For a few seconds, or a few minutes, then it resumes. I can go use other apps, and they’ll work – or they might pause as well. It’s only been a day, but I’ve had 4 of these episodes so far – once last night shortly after upgrading, which I kind of shrugged off, and then 3 this afternoon, in about a 2 hour period. (Worked fine all morning though).

If I had to guess, I’d say it’s the new memory compression feature – but I had it occur just after a reboot this afternoon, with no other apps open. Then this evening it’s working fine again.

The other likely explanation is a clash with 3rd-party apps – I don’t run that many, but you never know.

In any case, I’m going to be doing a clean install to an external disk to see if it reproduces there – if it doesn’t happen there, then it will be a clean install for the laptop as well this weekend.

If you’ve had issues like that, feel free to leave a comment.

Update: Well, it just happened again. The only observation I can make is that it was while doing a build for the project I’m looking at – it’s quite possible that it was trying to compact memory or move stuff to swap. I wonder if the swap partition is corrupted?

Update the second: As it turns out, my hard disk had started reporting SMART errors the day before I download Mavericks. Bad timing. The freezes were being caused by I/O errors – sure enough, when reading from the swap file (not partition).

Fixing SMB issues with OSX Lion

Update: THIS DOES NOT APPLY TO MOUNTAIN LION. The technique mentioned here does not work on Mountain Lion

I use a Linksys NAS200 as a file share device at home. This uses Samba – an open-source port of Microsoft’s SMB file share protocol – for sharing files to other computers. This worked fine from my Mac when I was using Snow Leopard.

At some point after I upgraded to Lion (not exactly sure when, but I don’t think it was on upgrade day…), I tried to access the share and could connect. It turns out that Apple have discontinued support for older versions of the SMB protocol (pre-Windows XP versions, to be precise). Of course, that’s the exact version used by my NAS.

I found lots of suggestions on line to fix this, but the simplest one is just to re-enable the support. Apple have only turned it off by default, and you can turn it back on. I used the instructions I found in an Apple support notice to turn it on temporarily, like so:

sudo sysctl -w net.smb.fs.kern_deprecatePreXPServers=0
And this let me connect to my file server. Yay!
Unfortunately, this is only temporary. The command changes  a setting in the kernel (the foundation layer of the operating system), but it’s transient – it will get forgotten the next time you start the computer. A little bit of googling later, and I found how to make it permanent.

You need to edit the file /etc/sysctl.conf – the file may not exist, but if it does you probably want to back it up first. Add the setting from above into the file.

My sysctl.conf file ended up looking like this – I added a couple of extra settings I found while searching for this that significantly speed up transferring files, so a win all around (or so it seems):

# Re-enable smb support for my old LinkSys NAS200
net.smb.fs.kern_deprecatePreXPServers=0
# Maybe make NAS faster?
net.inet.tcp.delayed_ack=0

(The tip about delayed_ack came from this post over at MacWorld.com. Reasonably fine to do on a home network, but probably not a good idea on a busy network)

If you found this useful, please let me know. 🙂

%d bloggers like this: