How do you prevent an application from grinding the whole system to a halt?

James Gray james at grayonline.id.au
Fri Jun 2 05:50:06 UTC 2006


On Fri, 2 Jun 2006 02:55 pm, Chanchao wrote:
> This annoyed me this morning... Was happy to see that the Dapper
> download was like 90% finished and still happily downloading away..
> Then had to rotate an image. (2560 x something, 5MP camera shot).
> While rotating though, The Gimp managed to bring everything down.
> Nothing responded anymore, the clock in the top left remained stationary
> at 9:02 am for 20 minutes, I couldn't close Gimp, I couldn't move to a
> different workplace, Ctrl-Alt-F1 and so on didn't do anything to give me
> a TTY, Ctrl-Alt-Backspace didn't do anything..   So just had to pull the
> plug and restart.

Hmmm.  So you were doing a full system upgrade with X running and doing 
graphics editing work at the same time....then wonder why the hell it all 
fell in a heap?  :P

Free advice (you get what you pay for): run system updates in runlevel 1, ie,
0. Modify sources.list for new version (Dapper)
1. sudo init 1
2. apt-get update
3. apt-get -u dist-upgrade
4. reboot

If you can't get into runlevel 1 (root password issues etc) simply switch to 
TTY1 (CTRL+ALT+F1) and kill off your X session ("sudo /etc/init.d/gdm stop" 
or kdm/xdm etc), and stop any other servers you have running too (ssh, samba, 
etc).  THEN do #2-#4 above prefixing with "sudo".

Ok, so your system isn't particularly useful during the upgrade by dropping 
out of X etc, but how do you expect programs to behave predictably when all 
the underlying libs and modules are being modified/removed/added?  That's 
like trying to change a tyre while the car is still moving a freeway 
speeds ;)

> Is there anything you can do to stop applications crashing everything?
> Wouldn't the OS take care of such things all by itself in a perfect
> world? (i.e. is something wrong with my installation? I do have 512MB
> memory installed.)

Not really.  Linux is usually pretty good with this sort of thing because 
(unlike a certain operating system beginning with "W") applications don't run 
with kernel level privs.  They run in user space.  Theoretically, code 
running in user space shouldn't be capable of crashing anything other than 
user space code (ie, itself, other apps in user space, etc).  The kernel is 
essentially protected.  Although some particularly badly behaved program can 
take down the kernel too (fork bomb anyone?).

Because you pulled the plug, there will be no logs, no core files, no hints as 
to what went wrong.  My guess is that some important library or kernel module 
was modified and sent the whole system to hell in a hand basket.

Just try to give your system some breathing space while it upgrades the whole 
operating system (especially with 512MB RAM) - make a coffee or three, walk 
the dog, watch pr0n (see sigmonster's thoughts), or whatever you prefer for 
passing the time :)

HTH,

James
-- 
osteopornosis:
	A degenerate disease.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060602/b0c960bb/attachment.pgp>


More information about the ubuntu-users mailing list