Mavericks broke SMB

Apple broke file sharing in MacOS Mavericks. I started finding the problem when I got a new iPhone and was going through the hell of setting up music on it via iTunes. Nothing worked and I finally started over with a new iTunes library, only to find I couldn’t add songs from my SMB network share (an Ubuntu box running Samba). The files showed up fine in Finder, and if I copied them to my desktop I could add them to iTunes. But trying to add them right off the fileshare resulted in nothing happening; no errors, no console logs, nothing.

A lot of research later and I learned that Mavericks has a brand new SMB2 implementation, and apparently it’s broken. In complex and subtle ways, maybe worse using Samba as a server than Windows. Awesome! As usual there’s a lot of cargo cult thinking for bugs like this, but this Apple discussion and this ZDNet article were particularly useful.

The recommended fixes are two ways to fake out MacOS to not use the new broken SMB2 implementation and instead fall back to the slower-but-stable SMB1 implementation. I found I also had to add “log level = 0” to my SMB server configuration to make this work (previously no log level configured). Yeah, there’s no way that makes sense, but it only started working when I had debug logs on (level 2) and then if I removed the line entirely it stopped working, but level 0 works. I’m too angry to spend more time trying to figure out what’s really going on.

It is so, so frustrating when Apple breaks basic Unix services that have been working in the past. Doubly so if there’s absolutely no error logging, and triply if the bug only shows up in some awful piece of client software like iTunes. Just terrible all around.