User Name
Password
AppleNova Forums » Genius Bar »

Any way to kill an unkillable fullscreen process?


Register Members List Calendar Search FAQ Posting Guidelines
Any way to kill an unkillable fullscreen process?
Page 1 of 2 [1] 2  Next Thread Tools
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2007-10-14, 12:01

A game jammed my OS X. No reaction to cmd+opt+esc. So I ssh'd in and did kill -9 PID. The process dropped to zero CPU time and resources but it held onto its life and the picture stuck in the screen, desktop still showed in secondary screen. The name went in parentheses in ps listing. I tried again a few times. Now it's been a while and the process disappeared from the list, both screens show plain grey. No reaction to cmd+opt+esc still. I already did killall Finder with the idea of relaunching it, but can't figure out how to launch GUI stuff on the local screen. An attempt to open jams and I need to ctrl-C it.

Suggestions? Other than "reboot", that is. One of the reasons I'm using a Mac is I don't want to reboot it.
  quote
Bryson
Rocket Surgeon
 
Join Date: Feb 2005
Location: The Canadark
 
2007-10-14, 12:11

Quote:
Originally Posted by Koodari View Post

Suggestions? Other than "reboot", that is. One of the reasons I'm using a Mac is I don't want to reboot it.
I assume you ask for academic curiosity reasons, rather than a genuine belief that messing around in the terminal for hours is in some way easier than just rebooting....
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 12:16

Two things:
1) When the process name shows up in parentheses, the process is zombie'd. You can generally only kill it, then, by killing its parent process. I assume you can't run Activity Monitor to use its hierarchical listing, and you probably don't have pstree either, so I can't think of a way of how to find out the parent process. If you launched the app through the Dock, that would be it.
2) Killing lookupd can sometimes help with UI lockups.
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2007-10-14, 12:53

I did nothing for a good while, and the game screen reappeared as did the other screen's desktop background.
But there was a mouse pointer!

Unfortunately, still no reaction to anything.
I did sudo killall lookupd and nothing else changes but the pointer turns into a beachball.
lookupd seems to have auto-launched itself back.
I repeated with sudo kill -9 (pid-of-lookupd) with the same result.
Finder hasn't relaunched itself. I wonder how I could launch it?

I can't shake the feeling that what I have here is a basically well-running system. Should it be possible, theoretically, to reboot the GUI only without touching the apps? Or without touching anything but GUI apps?
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 12:58

Quote:
Originally Posted by Koodari View Post
lookupd seems to have auto-launched itself back.
It was supposed to.

Quote:
Finder hasn't relaunched itself. I wonder how I could launch it?
Simply
Code:
open -a Finder
Should do. Failing that, try

Code:
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder &
Quote:
I can't shake the feeling that what I have here is a basically well-running system. Should it be possible, theoretically, to reboot the GUI only without touching the apps? Or without touching anything but GUI apps?
No, since the GUI is part of your login session. You'd have to log out to relaunch the GUI.
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2007-10-14, 13:01

Quote:
Originally Posted by chucker View Post
Two things:
1) When the process name shows up in parentheses, the process is zombie'd. You can generally only kill it, then, by killing its parent process. I assume you can't run Activity Monitor to use its hierarchical listing, and you probably don't have pstree either, so I can't think of a way of how to find out the parent process. If you launched the app through the Dock, that would be it.
Launched via a Finder window, and like I said in the first post, I killed Finder. I just don't seem to manage to relaunch it. I tried osascript -e 'select window of desktop' but that script goes into some sort of infinite loop the same as open.

But note that my initial post says the game process did already disappear from the list.

edit: Finder actually launched with full path-&. Who'd have known, apparently open uses something that is currently borked. This did nothing for the screen and beachballing cursor or working cmd-opt-esc though.

Can I logout using the command line?
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 13:03

You don't happen to have any FireWire or USB devices connected, such as an iPod?
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2007-10-14, 13:03

While the OS should be able to reset the graphics card so that it shows the GUI again, in practice that is non-trivial. The game may have changed a lot of settings and allocated memory on the graphics card that it could not return when you force-quit it. Couple that with a bug in the graphics driver (which may have been the cause of the game "jamming"), and the card is in a state where it's hard to get it back to normal.

So basically, simply reboot the computer and forget about it!
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2007-10-14, 13:09

Quote:
Originally Posted by chucker View Post
You don't happen to have any FireWire or USB devices connected, such as an iPod?
Yeah, plus a Powermate and a FW hard drive. All have been plugged in for aeons. I pulled the iPod off, no difference.
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2007-10-14, 13:13

Quote:
Originally Posted by ghoti View Post
So basically, simply reboot the computer and forget about it!
This exact time I am probably not losing anything by shutting down.. but I could have just about any process, a massive screen or something running in there that I don't want to lose, or a GUI app I need to save work in. Now things are certainly starting to look like I can't get the box back up this time, but anything less than reboot (such as logout/login) that would restore the computer to usable state would be preferable.

Not that it has to do with anything at this point, but the game is Sauerbraten
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2007-10-14, 13:26

I killed WindowServer, it along with every app is now a zombie.
Still no login screen.

edit: and I killed loginwindow, launchd sprung it back up. No login screen. Screw this, I'm rebooting.

So you guys think it's a driver issue? I'm sure the game was going to be pretty much over GMA950's capacity anyway, but how is a graphics chip driver going to block keyboard input when the bulk of the computer is still running well in the background?
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 13:39

Quote:
Originally Posted by Koodari View Post
So you guys think it's a driver issue?
Really doubt it. Just a hiccup, in a style rather typical of OS X (but rare).

Drivers causing kernel panics, sure. Drivers causing zombie processes? Unusual.
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2007-10-14, 13:50

But drivers not cleaning up properly in case an application is killed is not very unusual. Not every driver bug causes a kernel panic.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 13:56

Quote:
Originally Posted by ghoti View Post
But drivers not cleaning up properly in case an application is killed is not very unusual.
No, but I've never heard of that causing zombieing.
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2007-10-14, 14:05

A bug in either the game or the driver caused the game to "jam", and then the driver didn't clean up properly on exit, hosing the screen (that could be a result of the earlier problem, or a separate issue). The temporary zombie was due to the kill -9, and that is not unusual in such a case.

Of course this is all speculation, it could also have been a problem in the graphics card caused by overheating from the game, or something entirely else.

Last edited by ghoti : 2007-10-14 at 14:26.
  quote
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2007-10-14, 15:00

Ahh, how I miss the good old days when you simply turned off the computer and turned it back & inserted the floppy disk if you need a program to clear its sinuses.

Seriously, I'd be far more concerned about possibility of damaging my core systems by mocking with random kills command than if I just rebooted, whether this may be theoretically possible, and if it was an academic curiosity, I'd at least do that on a obsolete machine that I can live without should something awful happen to it.
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2007-10-14, 15:20

It's also interesting to remember that back in Windows 3.1, you had to reboot to change your screen resolution. Either the drivers or the graphics cards (especially those "Windows accelerators" that were more than just memory bricks and a D/A converter) were so flaky that they didn't trust them to reliably reset the card.

You can't hose your system by killing random threads. The worst that can happen is that it becomes unresponsive, and then you can still turn it off and reboot it. It then just needs to run chkdsk repair any half-finished stuff on the harddisk, which thanks to journaling is no longer a problem. And from there you have a perfectly running system again.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 15:34

Quote:
Originally Posted by ghoti View Post
It's also interesting to remember that back in Windows 3.1, you had to reboot to change your screen resolution.
And, embarrassingly enough, being able to switch it without logging out and back in is still not a standard feature in many Linux/*BSD/*nix distros.

Quote:
You can't hose your system by killing random threads.
Well it can cause dataloss, but then you'd get the same dataloss (and possibly more) by simply shutting the machine down (hard).
  quote
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2007-10-14, 15:40

Quote:
Originally Posted by chucker View Post
And, embarrassingly enough, being able to switch it without logging out and back in is still not a standard feature in many Linux/*BSD/*nix distros.
I thought the su and sudo were a standard features? Or is there more to FSU than just su?

Quote:
Well it can cause dataloss, but then you'd get the same dataloss (and possibly more) by simply shutting the machine down (hard).
Really? I'd have thought that hard reboot would be preferable than randomly killing processes...


Ahhh, now I think I know why I thought that. That was from Windows XP, where one process isn't always isolated and therefore can cause system instability. Mac OS X doesn't work like that, and therefore is different in this case.. Right?
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 15:45

Quote:
Originally Posted by Banana View Post
I thought the su and sudo were a standard features?
Switch the screen resolution, not the user.

Quote:
Or is there more to FSU than just su?
Well, OS X for one had su and sudo from the start, but didn't have multiple graphical sessions until 10.3, and no multiple simultaneously controllable ones until 10.4. But this wasn't the subject.

Quote:
Ahhh, now I think I know why I thought that. That was from Windows XP, where one process isn't always isolated and therefore can cause system instability. Mac OS X doesn't work like that, and therefore is different in this case.. Right?
My head hurts.
  quote
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2007-10-14, 15:49

Quote:
Originally Posted by chucker View Post
And, embarrassingly enough, being able to switch it without logging out and back in is still not a standard feature in many Linux/*BSD/*nix distros.
Quote:
Originally Posted by chucker View Post
Switch the screen resolution, not the user.
Oh, sorry- I misunderstood what you were referring to 'it'.

Quote:
My head hurts.
Sorry for the garfunkle. Let's start over.

I am asking you if it's preferable to kill threads than reboot Mac OS X because the potential damage is much more minimized and the whole system will not be affected, but would not be true for Windows XP where killing a process can threaten a system stability... Is that right?
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2007-10-14, 15:49

Quote:
Originally Posted by chucker View Post
And, embarrassingly enough, being able to switch it without logging out and back in is still not a standard feature in many Linux/*BSD/*nix distros.
Really? I haven't used Linux in some time, but I seem to remember being able to do that without problems years ago. It may just be that they now tie the session to the X server or something, but there is no technical reason why you would need to log out to restart the X server. Of course the other question is why you need a restart of the server at all just to change the resolution. But anyway.

Quote:
Originally Posted by Banana View Post
I thought the su and sudo were a standard features? Or is there more to FSU than just su?
What's FSU?

Quote:
Originally Posted by Banana View Post
Really? I'd have thought that hard reboot would be preferable than randomly killing processes...
Well any data that an application has not written to disk will of course be lost. If you can't see the program any more and can't trigger its save function, you'll lose any changes. The same is true for data that is being written when the system goes down, but the transaction has not been completed. In such a case, the entire transaction is discarded and the file looks like it did before the application started writing. This is still preferable to half-written data in a file or a file system that is inconsistent because the computer was turned off while some important data structure was being modified.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 15:56

Quote:
Originally Posted by Banana View Post
Oh, sorry- I misunderstood what you were referring to 'it'.
…but I quoted it!

Quote:
Sorry for the garfunkle. Let's start over.

I am asking you if it's preferable to kill threads than reboot Mac OS X because the potential damage is much more minimized and the whole system will not be affected,
Yes. Resetting the machine in hardware has a much larger potential for dataloss, not to mention hardware damage (such as with the hard drive head not being parked properly). The potential is still small, but it's there.

Quote:
but would not be true for Windows XP where killing a process can threaten a system stability... Is that right?
For Windows 9x, that may be valid; for anything NT-based, I doubt it's any different from Unix.

Quote:
Originally Posted by ghoti View Post
Really? I haven't used Linux in some time, but I seem to remember being able to do that without problems years ago. It may just be that they now tie the session to the X server or something,
Yes, I believe it's typically done that way these days (since most users don't need the console).

Quote:
Of course the other question is why you need a restart of the server at all just to change the resolution. But anyway.
That's the issue. Changing the resolution without restarting the X server.

Quote:
What's FSU?
I assume he means FUS, Fast User Switching.
  quote
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2007-10-14, 16:16

Quote:
Originally Posted by chucker View Post
For Windows 9x, that may be valid; for anything NT-based, I doubt it's any different from Unix.
Hmm... I wonder then why they issue an warning in XP if you try to kill a process from task manager but not if you terminate an application, even though they've (on surface at least) same thing.

Quote:
I assume he means FUS, Fast User Switching.
I'm thinking that today is just not my day.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 16:18

Quote:
Originally Posted by Banana View Post
Hmm... I wonder then why they issue an warning in XP if you try to kill a process from task manager but not if you terminate an application, even though they've (on surface at least) same thing.
Killing a process isn't normally a good idea (regardless of OS); it's called "kill" for a reason. You do it in exceptional situations. The warning, thus, is appropriate. A normal user shouldn't do this unless specifically instructed to.
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2007-10-14, 16:21

try killing off the Window Server (windowserve)
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2007-10-14, 16:24

That is not entirly true Chuckler. When you shutdown your Mac properly, "kill" signals are sent to all the running programs.

kill -(1,2,3 and 6) should be fairly safe. Kill -3, should not really be any different that choosing quit from the applications main menu.

OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available!
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-10-14, 16:29

Quote:
Originally Posted by Gargoyle View Post
That is not entirly true Chuckler. When you shutdown your Mac properly, "kill" signals are sent to all the running programs.

kill -(1,2,3 and 6) should be fairly safe. Kill -3, should not really be any different that choosing quit from the applications main menu.
That's correct, but when referring to "killing a process", one usually means -15 or -9. I was perhaps oversimplifying.
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2007-10-14, 17:38

One last question.. if this were a Linux machine, would it have been possible to reload the driver and/or init the graphics hardware all over again while non-graphical processes keep running uninterrupted?
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2007-10-14, 17:47

Yes, in principle. All GUI programs are killed when you kill the X server, and that also includes non-GUI programs started from a shell in an xterm (because the xterm goes away), unless you use screen or something. But other processes still run, and you can restart the X server independently of the OS. Depending on how hosed your graphics card is, that might or might not bring back the GUI. But if that means you're losing hours of work that you were not able to save without being able to access the application's menu, it might not make a difference.
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Page 1 of 2 [1] 2  Next

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the build_hd_i process for? alcimedes Genius Bar 3 2006-11-19 01:16
Switching applications from within a fullscreen app Kraetos Genius Bar 8 2006-08-24 16:54
"update" process & hard drive ticking -- Calling *nix gurus! Brad Genius Bar 77 2006-05-19 19:50
When do they kill the PowerBook? (or do they?) Mac Donald Speculation and Rumors 8 2006-01-11 12:20
DVD Player fullscreen woes Koodari Apple Products 2 2005-03-19 01:40


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 05:17.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova