Archives / Search ›

“Friendly sysadmin is out of town, so I, troublesome user, must do it all.” Sorry, dude. Hope you fix it soon.

I posted a comment on a song at Radio Paradise, clicked OK and wondered why :-) hadn't been expanded.

Radio includes a global glossary, but it's not that global. It does work here though. :-)

there is no spoon: “Nicholas Riley says OS X crashes at least once a day for him. What the heck is he doing?”

Here we go again. Yes, it crashes that often for me. No, it doesn't crash that often for everyone else; my father's PowerBook G4 often has 30+ day uptimes. I keep hitting the same OS X bugs, over and over; the last 10 window server crash logs I have show exactly the same backtrace.

Some more narrative. I arrived at the lab 20 minutes ago and have had to restart my Mac twice. Here's what I did.

Came in, turned on my monitor. My USB trackball, PS/2 keyboard connected by a PS-2/USB adapter, and my other USB devices (USB-serial adapter, iMic, card reader, hub) were all dead. Mac OS X's USB subsystem still has trouble when devices are added or removed, sometimes it turns off the entire bus. It's an improvement from 10.1.2, which crashed when I turned off my monitor, but it still has a way to go. This is not a power problem. I know because all the devices but one are plugged into my monitor, which is a powered hub. After attempts to unplug/replug devices and unload the USB drivers failed, I connected via VNC and restarted my machine.

A few days ago, I read the reason why OS X stopped recognizing my PostScript fonts. Its font caches get corrupted. There's one font cache for each font folder; in my case, it was the Classic font cache that was corrupted. I had thought my fonts were corrupted, even though they worked fine in Classic and Carbon, non-ATSUI apps. I removed them from my fonts folder because their presence caused Cocoa applications to take several minutes to bring up the Font panel while in a blocking wait for a message from ATSServer. Terminal requests a font list on startup, so it would take several minutes to start, even worse. So I classified my non-working PostScript fonts into two categories: those which OS X would show but not use (switching to another font when the font was selected), and those which OS X would not show at all (they'd appear like –font8474–, but with a different number for each font).

Among the “corrupted” fonts were some Univers fonts: I only had oblique styles installed for some weights, so the first thing I did after restarting was to grab the Univers fonts from the “show but not use” category, label them with SNAX (since the Finder still doesn't support labels), and drop them in my Fonts folder. First ATSServer crashed, then the whole house of cards came crashing down: a few individual applications crashed, then the window server crashed, being unable to render any text (it looked pretty funny mousing over the Dock, application names would display with a space where the non-cached letters should have been). I got a blue screen with a spinning color wheel, logged in from another machine, and had to go all the way to the 'kill 1' stage to get back to single-user mode.

Exited from single-user mode, and started writing this. The Univers fonts are fine; don't ask me why ATSServer decides to crash just because you add some perfectly decent fonts to a folder.

I hope this helps explain things. I could include a laundry list of all the other things that cause OS X to crash (the buggy iTunes Nomad driver I mentioned a few weeks ago, Classic-related stuff, etc.) but I really need to get to work!

A trick I just discovered if Mac OS X gets completely stuck.

I was trying to switch from a Classic application to Mozilla, the window server crashed. It restarted, as usual, without killing all its children, and so all my Mac OS X applications except ATSServer and TruBlueEnvironment (Classic) died. The screen displayed the login screen background with MacsBug over the top of it, and the color wheel of death™. I couldn't interact with MacsBug, so, as I do about once a day when OS X crashes, I ssh'ed in from the O2 and killed the processes I was still running. Sometimes this works; sometimes not. Next I killed loginwindow and the Window Server, but all that did was give me a plain blue screen with the color wheel. Again, nothing unusual, this happens all the time (not that I don't wish it didn't!)

Next I tried the 'shutdown now' trick I had learned from a Mac OS X Hints article, which should (theoretically) kill all processes and bring the machine to single-user mode on the console. But even that didn't work: the shutdown process kept running, blocked on something or other, so I started killing all nonessential processes (pretty much everything but the pager and lookupd).

Still, the window server kept relaunching itself and dying immediately afterward. What was doing that? The -j flag to ps displays parent PIDs: loginwindow was started by Window Server and Window Server was started by /sbin/init. Since I had nothing else to lose, I killed /sbin/init (its pid is 1). This kicked me off my SSH session, I switched back to OS X, and saw the spinning wheel… yet a few seconds later, I got the 'hostname#' prompt that indicated I was in single-user mode; a quick control-D and a few seconds later, and I was back looking at a now-functional loginwindow. This might be attributable to the still-running shutdown process timing out and deciding to do something more drastic, but I'd prefer to think it was my action that did it. :-)

So my procedure to recover from OS X window server failures is now:

  • Kill everything owned by the current user.
  • As root, kill the windowserver, ATS server, and any other graphical-type servers that are running.
  • shutdown now
  • kill 1

If a step doesn't help, try the next one. Depending on the severity of the problem, I've met success at each step.

The other common OS X-crashing annoyance I experience stems from lookupd dying. If the screensaver isn't active, I can usually manage to kill everything and restart gracefully, but if the screensaver is running, I have no choice but to hit the reset button. No lookupd, no password (no username lookup even—I can tell that's the problem when the screensaver unlock panel displays my username instead of my full name).

It's nice to see some sensible discussion about the repercussions of further divorcing the user-visible from the programmer- and UNIX-visible filesystem views on macosx-dev (see the thread I linked to on Wednesday). Extension hiding is one thing—while suboptimal when it does things like show multiple files with the same name, it's reasonably innocuous, but wholesale name changing is a different matter. They've got a lot of issues to work out, and I hope they do so.

I seem to be unable to work without listening to Belle and Sebastian now. Not tiring of music even after listening to it repeatedly is a good indication that I really like it, but… please, something else?

‹ Newer Posts  •  Older Posts ›