| View previous topic :: View next topic |
| Author |
Message |
batkins Tux's lil' helper


Joined: 20 May 2003 Posts: 127
|
Posted: Sun Jun 08, 2003 3:31 pm Post subject: how to stop a lockup |
|
|
i've been using gentoo for a little while now, but it has an alarming tendency to lock up when I'm running X. normally, i just hit ctrl-alt-f1, log in as root, and kill the offending process (usually gtk-gnutella or mplayer)
every now and then, tho, this doesn't work and i'm forced to hard-reset my box. is there any definite way to stop a misbehaving process? in xp pro, ctrl-alt-del and task manager pretty much always worked. but i can't seem to rely on my current method (switching to a virtual console and killing the process).
how do other gentoo users deal with this?
thanks for your time! |
|
| Back to top |
|
 |
JM_ n00b

Joined: 09 Apr 2003 Posts: 13 Location: Bucharest
|
Posted: Sun Jun 08, 2003 3:46 pm Post subject: Re: how to stop a lockup |
|
|
| batkins wrote: |
how do other gentoo users deal with this?
|
I guess most gentoo users got their boxes setup well enough so don't lock up (my gentoo runs 16h/day, doing hard work, and freezed just once in a few months due to OpenOffice 1.1beta) _________________ Powered by 220V AC |
|
| Back to top |
|
 |
burmashave Tux's lil' helper


Joined: 01 Dec 2002 Posts: 82
|
Posted: Sun Jun 08, 2003 5:08 pm Post subject: Re: how to stop a lockup |
|
|
| JM_ wrote: | I guess most gentoo users got their boxes setup well enough so don't lock up |
Yes. If thy code doth offendeth you, pluck it out
Here are a couple of things to try with an app. hangs:
- Ctl - Alt - Backspace will restart the X session. As far as I know, it will kill all the processes running under X.
- Sometimes a process may not respond to a normal kill signal. When this happens, you can try to kill it using the "-9" argument as in:
I believe that if the process does not terminate when using the -9 argument that the process is a "zombie" process. I am unaware of any means to stop a zombie process short of rebooting the machine. |
|
| Back to top |
|
 |
batkins Tux's lil' helper


Joined: 20 May 2003 Posts: 127
|
Posted: Sun Jun 08, 2003 5:26 pm Post subject: |
|
|
um, how could i have set up my box in such a way that it would lock up?
also, given linux's famous stability, i would expect the kernel to accomodate "poor setups." |
|
| Back to top |
|
 |
Frozenwings n00b

Joined: 02 Apr 2003 Posts: 47
|
Posted: Sun Jun 08, 2003 5:40 pm Post subject: |
|
|
Hmm...my box was locked two times for unknown reasons...(not counting
two other freezes because of nvidia drivers). But in those, my keyboard
was somehow locked up and it won't respond to any alt+ctrl+backspace,
alt+ctrl+Fx or anything like that. I fear these lockups, as I don't have another
box to kill the process from (in these two locks, processes in the background
were active, even xmms). Any way to recover from these? |
|
| Back to top |
|
 |
dsd Developer

Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Sun Jun 08, 2003 6:56 pm Post subject: |
|
|
make sure that you have DMA enabled on your hard disk.
this is done through hdparm. Search it on these forums if you need help.
for some reason, after a fresh install, it wasnt enabled on my slower box, and it kept crashing.
enabling DMA stopped this. and bloody hell it runs fast now  |
|
| Back to top |
|
 |
Frozenwings n00b

Joined: 02 Apr 2003 Posts: 47
|
Posted: Mon Jun 09, 2003 3:50 am Post subject: |
|
|
If that was for me, my disk is tuned-up.
Looks like the failures were related to gqview, I'll go ask in the multimedia
forum as it's not behaving as it should lately. |
|
| Back to top |
|
 |
sn4ip3r Guru


Joined: 14 Dec 2002 Posts: 325 Location: Tallinn, Estonia
|
Posted: Wed Jun 11, 2003 9:36 am Post subject: |
|
|
| I have several PC's at home and when I X locks up, it also disables mouse and keyboard so I can't ctrl-alt-F1 or smth. but SSH access is still enabled and I can kill X from another PC, but even then it doesn't always fix things, it might lock the whole PC so even SSH doesn't work anymore. |
|
| Back to top |
|
 |
puddpunk l33t


Joined: 20 Jul 2002 Posts: 681 Location: New Zealand
|
Posted: Mon Jun 16, 2003 3:12 am Post subject: |
|
|
What you could also look at doing (and is of great help to me) is enabling the "Magic SysRq Key" in the kernel config, and using that to safely unmount your system etc... The SysRq key is the PrintScrn key.
It almost always works, unless your system is REALLY hard locked.
If my system jams, I press: Alt + SysRq + s to sync my disks (i.e. flush all buffered data onto the disk, so I don't lose anything), then I press: Alt + SysRq + u, which unmounts my filesystems (and I think remounts them ReadOnly, but I can't remember. Anyway, it stops the long fsck at boot) then I press Alt + SysRq + b for a reboot, which is fine because all my filesystems are unmounted, or safely mounted.
Just a tip for the hackers amoung you lots more cool things can be done with the Magic SysRq key, there is a readme file about it in the kernel documentation directory!
Cheers,
Chris. |
|
| Back to top |
|
 |
bsolar Bodhisattva


Joined: 12 Jan 2003 Posts: 2764
|
Posted: Mon Jun 16, 2003 5:00 am Post subject: Re: how to stop a lockup |
|
|
| burmashave wrote: | | I believe that if the process does not terminate when using the -9 argument that the process is a "zombie" process. I am unaware of any means to stop a zombie process short of rebooting the machine. |
Just to precise, there are two kind of processes that cannot be killed:
A zombie (state 'Z') process cannot be killed because it's already dead, but his parent process has not acknowledged that fact (probably a bug in the parent process that does not collect the exit state). You can kill zombies indirectly killing the parent process.
The other state that makes a process unkillable is 'D', that means that the process is waiting for a device. A bug in the kernel or some sort of harware failure might leave the process in 'D', the only things to do are wait and see if it clears or reboot the machine. _________________ I may not agree with what you say, but I'll defend to the death your right to say it. |
|
| Back to top |
|
 |
TinheadNed Guru


Joined: 05 Apr 2003 Posts: 337 Location: Farnborough, UK
|
Posted: Thu Jul 17, 2003 3:26 pm Post subject: Lock ups |
|
|
My laptop has never stopped locking up in X since I installed gentoo. Redhat was fine. Changing optimisations hasn't made any difference. These lockups can occur between seconds and hours after starting, and seem linked to using the mouse (as keyboard only is fine). When it locks, the keyboard is locked, the mouse is locked, the acpi events from the sleep button (on the keyboard) is locked. The only thing that works is network devices, and the lid switch. Magic Sysrq does not work.
Any ideas for that? |
|
| Back to top |
|
 |
xunil n00b


Joined: 18 Jun 2003 Posts: 36 Location: Blacksburg, VA, USA
|
Posted: Thu Jul 17, 2003 7:58 pm Post subject: |
|
|
In the years I've been using Linux, almost every true system lock-up was caused by hardware. Hardware is the direct cause when your hardware is just plain bad or flaky (overheating due to overclocking or packing too many heat-producing devices -- hard drives -- in an area w/o enough airflow or underpowering, both being very common among lamers who build their own computers w/o doing enough research). Hardware can indirectly be the cause when a driver is bad, but this usually comes w/ a kernel oops and traceback. In the few cases when hardware was not the true problem, it's userspace interacting poorly w/ kernelspace, but often this can be another indirect hardware issue: most userspace software that interacts w/ kernelspace is doing so to gain access to data provided by hardware (like X or webcam programs).
To prevent lock-ups due to hardware, I follow a few guidelines:
1) Before buying any hardware, I Google for it's name and the word "Linux" together. Also, searching one of the many LKML archives for the same keywords is very helpful.
2) Buy name-brand. I know that Asus motherboard is $20 more expensive than that off-brand one, but it's worth it. Trust me. This is *especially* true of RAM. Don't buy bleeding edge; chances are Linux won't support it well if it supports it at all.
3) Are you running the latest *stable* versions of tricky software like the kernel, X, or your webcam program? Being way behind is just as risky as being bleeding edge.
4) Check for BIOS updates frequently. If your motherboard's manufacturer has a notification list for BIOS updates, get on it. BIOS changelogs have a way of being terribly incomplete, too, so apply the stable updates. If other hardware has updateable BIOS/flash, make sure you're up to date w/ that hardware as well. |
|
| Back to top |
|
 |
SeJo Retired Dev


Joined: 08 Oct 2002 Posts: 298 Location: Belgium
|
Posted: Fri Jul 18, 2003 6:00 am Post subject: |
|
|
| batkins wrote: | um, how could i have set up my box in such a way that it would lock up?
also, given linux's famous stability, i would expect the kernel to accomodate "poor setups." |
It is mostly not gentoo that locks up but a program running on gentoo that takes all the cpu and/or memory...
so the kernel can't stop that. If you would limit the cputime per process (in the kernel) you could damage programs that are allowed to take all the cpu and or mem for a while...
try to find witch program is locking up and then find patches for it...
greetings _________________ "I am not bound to please thee with my answers." |
|
| Back to top |
|
 |
odinbpl n00b

Joined: 24 Nov 2002 Posts: 19 Location: London
|
Posted: Fri Jul 18, 2003 9:13 am Post subject: |
|
|
Whilst playing with new kernels (ck-sources with boot splash and nvidia), I sometimes experienced a similar X server lockup. I used to ssh into my box using a laptop and shut it down, but now I've installed ACPID (available on portage) and configured the power button to do a software powerdown.
One note: The version of acpid that I installed needed reconfiguring to recognise the power button event (I think it changed in kernel 2.4.20+), if you install it check that it works  _________________ --
Steven Capper |
|
| Back to top |
|
 |
jago25_98 Apprentice

Joined: 23 Aug 2002 Posts: 164
|
Posted: Wed Jul 23, 2003 12:06 am Post subject: sysRq (system rescue) |
|
|
Assuming you have in your kernel - Kernel Hacking :: Magic SysRq Key
compiled in...
To get out of some lock ups you can use the system rescue key.
It's on your keyboard, honest.
Found it?
Ok, it doubles as the print screen key.
To use it hold alt+sysRq+ ->
R (raw)
S ?
E (kill current process, very useful)
I ?
U (unmount mounted filesystems to avoid damage)
B (force reboot)
To remember that sequence - "Rasing Silly Elephants Is Utterly Boring" |
|
| Back to top |
|
 |
TinheadNed Guru


Joined: 05 Apr 2003 Posts: 337 Location: Farnborough, UK
|
Posted: Wed Jul 23, 2003 7:52 pm Post subject: |
|
|
Magic Sysrq doesn't work here when X locks. Otherwise it's very useful, and if you get the keys wrong, the set of commands will be printed to the terminal. Or look in the kernel documentation  |
|
| Back to top |
|
 |
|