Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

While playing Civilization V (most recently) and other games and apps (longer ago), occasionally one will not quit, causing me to have to force-restart my computer.

After awhile of playing, sometimes the game locks up. (I cannot get out to quit the game, nor can I interact with the game at all with keyboard or mouse, though I can move the mouse pointer.) I then ssh in from another Mac to kill the game, and issue a kill -9 to the game's PID. I then run ps again to see if it was killed (the game is still showing on my laptop's screen) and I see the below:

PID   TT  STAT      TIME COMMAND
468   ??  ?E     0:00.00 (Civilization V)

From the ps manpage, I see that the "E" in the status column means that the process is exiting. Five minutes (or so) later, the game is still taking up the screen, frozen, even though the process is gone. I then killed (-9 each time) all the other associated steam processes, and then (in desperation) killed SystemUIServer and the Dock to try to kick something into gear and, then, loginwindow to force a logout. None of this worked, so I issued a sudo shutdown -r now. Fifteen minutes later, it hasn't rebooted, the Civ V is still frozen on my screen, and I can't ssh into the affected system (presumably because the shutdown has stopped sshd).

I'd really rather not have to hard-reboot my computer too many times; does anybody have any ideas how to actually kill Civ?

For the record, I'm running OS X Lion (most recent point version) on an i7 MacBook Air.

EDIT: I've read this other semi-related question, but killing the parent process didn't work either.

share|improve this question
1  
Just in case: does option + cmd + esc show the "Force Quit Applications" dialog ? –  Karolos Jan 29 '12 at 18:38
    
That's my favourite shutdown method. –  Aram Kocharyan Jan 30 '12 at 10:30
    
@Karolos Nope. In other experimentation, that dialog shows up under the full-screen game. (If you invoke the Force Quit dialog and then quit the game, the dialog is there, waiting for you.) –  CajunLuke Jan 30 '12 at 15:12
add comment

2 Answers

A unkillable process is usually caused by one of two things, either the process is being traced by debugger, or (much more commonly) the process has a pending I/O request to some device that is stuck. In the latter case the culprit is typically a disk device that's throwing hard read/write errors or has gone silent and the kernel hasn't given up on it yet. But it could be anything connected to the system bus that's having problems.

For USB and FireWire devices, disconnecting the peripheral from the system will often clear a stuck process. But if the stuck device is a video card or something else not hot-pluggable, a reboot is your only option to clear the process.

share|improve this answer
    
That's useful to know. I'll probably accept your answer eventually, but I might see if another answer shows up (but I doubt it). –  CajunLuke Jan 31 '12 at 0:59
add comment

We have observed a similar behavior lately as a result of running the system out of mbufs. You can check whether this has happened with a "netstat -m" command. If the number of delayed allocations is non-zero, you've had a shortage that might have caused a problem.

When we ran the system out of mbufs, we were running a multithread program that was writing on UNIX domain sockets and TCP connections much faster than the other end could take it, expecting to be flow-controlled down to a reasonable level. 60-80 threads was usually about where it was running when the mbuf pool went dry (on both Snow Leopard and on Lion). After a number of such runs, we found a process like Safari or Mail that was unkillable with normal quit or kill, and had to reboot.

share|improve this answer
    
Thanks. I haven't had this in awhile; I'll check it out next time. –  CajunLuke May 4 '12 at 0:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.