[wishlist] sysrq enhancements (more actions)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Summary:
Alt-SysRQ-[X] functions are extremely useful, however they are sometimes insufficient. I'd like to add a few more options, either pre-defined, or user-configurable.
Motivation:
I have several times encountered serious problems that could be repaired, without serious dataloss, but where I ended up having to reset the computer, because there was no way to get an emergency root login. This enhancement would solve that problem; it might also be rather useful for getting / saving diagnostics. Examples where this would be useful:
* Xserver crash (eg the wretched fglrx) going to 100% CPU. We could then a)do some diagnostics on the hung process. b)shut down relatively gracefully c)try to save data where possible, for example killing emacs would make it autosave, and cat /dev/mem > memdump.dat would give us some hope later of retrieving the long email we were in the middle of writing.
* Runaway processes eg a "fork bomb" or something which is rapidly leaking memory could be terminated. Likewise, anything that is using up so much I/O that it takes ages to actually start the root shell.
* Failing disk: one part of the drive becomes inaccessible because it is failing; but because you can't kill the process accessing that bit, the disk effectively blocks. And there's no way to take control of the system, and attempt a (partial) recovery, even though this is usually possible in principle.
Details:
I propose patching the kernel sysrq function to add some extra keys (in addition to the rather useful RSEIUB etc). These would be bound to user-definable actions. The one I really want to see is:
killall -STOP <all userspace processes, including the X-server>
chvt 1 (and clear the screen)
prompt for root password
start bash, at nice -10.
What I suggest is similar in principle to Alt-SysRQ-K, but less destructive. There are some potential security risks here, but nothing that can't be fixed.
If people think this is a good idea, I'll write a detailed proposal sadly kernel hacking is beyond me!
Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in recently. We were wondering if this is still an issue for you? Thanks in advance.