Strange OS X Behavior

Yesterday morning, for no reason I can discern, my Macbook Pro started heating up again. After the 10.4.7 upgrade, my CPU temp has dropped on an average basis to the high 50’s and low 60’s for doing normal tasks like reading email and writing documents. The temperature climbs to high 70’s when playing DVDs or decoding high-bandwidth media. Well, yesterday the normal resting temp climbed to the high 70’s and low 80’s and stayed there. With all user-level apps closed.

Activity Monitor showed an average CPU load of about 40-55% (with no user apps running, remember), and much of that was simply that one of the two CPU cores was pegged pretty constantly. This didn’t show up in the process table at all, however, which I found odd. Even kernel_task was only consuming 1-2% CPU.

Eventually, looking at log files, I noticed that /var/log/samba/log.nmbd was growing outrageously, as nmbd (the Samba name service daemon) was being restarted and dying many many times per second. Somehow it was failing to start, to bind to port 137, and then launchd was restarting it virtually without any delay or sleep. I consider the latter a bug in Apple’s implementation of Windows file sharing, but whatever.

Turning off Windows File Sharing fixed the problem, and now CPU utilization and temperatures are back to normal. But it leaves a question — why, after months without such symptoms, did nmbd suddenly go wonky yesterday at 10am? Not a clue.

This wasn’t a particularly “difficult” problem to troubleshoot, but it did have very few symptoms visible in any of Apple’s utilities and apps. I found this one on the command line using the time-honored Unix toolset. So it does make you wonder how someone only acquainted with the GUI would find and fix it. We continue to build technology which requires highly specialized knowledge to deal with ordinary, everyday issues. Of course, that’s true of automobiles and other consumer technology as well, but arguably computing has a long way to go to get as reliable as the average automobile.