Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Software] Kernel lockup
-
- Posts: 3
- Joined: 2023-03-31 12:24
[Software] Kernel lockup
I realize this is a bit general, but have there been any reports of kernel lockups with Debian 11? I have a system that runs fine on Debian 10, but I'm experiencing random lockups running it on Debian 11. There isn't a kernel panic displayed, everything becomes unresponsive and I have to do a hard reboot of the machine. Examining the logs post reboot shows no indication of an issue. The system is using kernel 5.10.0-21-amd64, on an Intel i5-8500 and Q370 chipset.
Barring any reports of this issue, I'm looking for ideas as to how I can wedge myself into the system when it's in this state, so that I can get some useful information.
Barring any reports of this issue, I'm looking for ideas as to how I can wedge myself into the system when it's in this state, so that I can get some useful information.
-
- Global Moderator
- Posts: 2933
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 72 times
- Been thanked: 401 times
Re: [Software] Kenel lockup
Hello,
You can try the REISUB sequence [1] to shutdown the operative system in a controlled way. This could allow you to save data in the system log before the shutdown.
[1] https://en.wikipedia.org/wiki/Magic_SysRq_key
You can try the REISUB sequence [1] to shutdown the operative system in a controlled way. This could allow you to save data in the system log before the shutdown.
[1] https://en.wikipedia.org/wiki/Magic_SysRq_key
- None1975
- df -h | participant
- Posts: 1404
- Joined: 2015-11-29 18:23
- Location: Russia, Kaliningrad
- Has thanked: 46 times
- Been thanked: 69 times
Re: [Software] Kenel lockup
Magic keys tend to be disabled in Debian these days, so you can't just hard-reboot your machine or kill all your X processes by pressing a few keys accidentally.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github
Debian Wiki | DontBreakDebian, My config files on github
-
- Global Moderator
- Posts: 2933
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 72 times
- Been thanked: 401 times
Re: [Software] Kenel lockup
Hello,
According to [1]:
According to [2] the bit mask in /proc/sys/kernel/sysrq is:
Decimal 438 equals binary 110110110 , therefore are active by default in Debian the following SYSRQ features:
These should be enough to "gently" (as far as possible) shutdown the system (if the kernel responds to the SYSRQ sequence).
If you want to enable on the fly the dumps of processes:
it is possible to issue the command:
or modify /etc/sysctl.conf and update the initramfs.
---
[1] https://www.debian.org/doc/manuals/secu ... rq.it.html
[2] https://www.kernel.org/doc/html/latest/ ... sysrq.html
Thank you for your remarks.
According to [1]:
For example, on my Debian Bullseye (stable, 11.6) (I'm currently running 5.10.0-16-amd64, I know, it's not the latest version for current stable):Since the Etch release, the Magic SysRq key feature is enabled in the Linux kernel to allow console users certain privileges. You can confirm this by checking if the /proc/sys/kernel/sysrq exists and reviewing its value:Code: Select all
$ cat /proc/sys/kernel/sysrq 438
Code: Select all
$ cat /proc/sys/kernel/sysrq
438
Code: Select all
2 = 0x2 - enable control of console logging level
4 = 0x4 - enable control of keyboard (SAK, unraw)
8 = 0x8 - enable debugging dumps of processes etc.
16 = 0x10 - enable sync command
32 = 0x20 - enable remount read-only
64 = 0x40 - enable signalling of processes (term, kill, oom-kill)
128 = 0x80 - allow reboot/poweroff
256 = 0x100 - allow nicing of all RT tasks
Code: Select all
2 = 0x2 - enable control of console logging level
4 = 0x4 - enable control of keyboard (SAK, unraw)
16 = 0x10 - enable sync command
32 = 0x20 - enable remount read-only
128 = 0x80 - allow reboot/poweroff
256 = 0x100 - allow nicing of all RT tasks
If you want to enable on the fly the dumps of processes:
Code: Select all
8 = 0x8 - enable debugging dumps of processes etc.
Code: Select all
su -l -c "echo 446 > /proc/sys/kernel/sysrq"
---
[1] https://www.debian.org/doc/manuals/secu ... rq.it.html
[2] https://www.kernel.org/doc/html/latest/ ... sysrq.html
-
- Global Moderator
- Posts: 2933
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 72 times
- Been thanked: 401 times
Re: [Software] Kernel lockup
@segviolate: besides the REISUB sequence, you can check if the terminal console is active and, if yes, you can try to enter there and issue some commands to shutdown the system and/or read system logs to understand what's happening. You can activate the terminal console pressing simultaneously the keys CTRL+ALT+F2 , (e.g. terminal console number 2).
-
- Posts: 3
- Joined: 2023-03-31 12:24
Re: [Software] Kernel lockup
I've tried the alternate terminal via alt - F[0-9] but I'm not able to get another terminal session.
-
- Global Moderator
- Posts: 2933
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 72 times
- Been thanked: 401 times
Re: [Software] Kernel lockup
Hello,
Have you tried the REISUB sequence ?
If the graphical environment is running, the key sequence to activate the console terminal is CTRL-ALT-F[0-9].segviolate wrote: ↑2023-03-31 18:23 I've tried the alternate terminal via alt - F[0-9] but I'm not able to get another terminal session.
Have you tried the REISUB sequence ?
-
- Posts: 3
- Joined: 2023-03-31 12:24
Re: [Software] Kernel lockup
I mis-typed and forgot the ctrl. I haven't had a lockup since I learned of the Magic SysRq key sequence. It will be the first thing I try if it happens again.
-
- Posts: 263
- Joined: 2023-03-02 05:26
- Location: USA
- Has thanked: 50 times
- Been thanked: 60 times
- Contact:
Re: [Software] Kernel lockup
Usually lockups or freezes are because of running out of memory, it might be good to leave 'top' running in the background to see if you can spot a memory hog culprit. If you aren't experienced with top, 'htop' is a prettier version that I find easier to understand that is available in the repos.
Be seeing you...
-
- Global Moderator
- Posts: 2933
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 72 times
- Been thanked: 401 times
Re: [Software] Kernel lockup
In this case, you should see the disk continuously spinning if ram swap is configured.CynicalDebian wrote: ↑2023-03-31 19:09 Usually lockups or freezes are because of running out of memory [..]
- sunrat
- Administrator
- Posts: 6476
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 474 times
Re: [Software] Kernel lockup
Which logs were you looking at?
Code: Select all
journalctl -b -1 -p 3
If you want to switch to a text terminal, use F2-F6. F7-F12 are Xserver instances, typically default is F7. A good reference is at - https://calcoen.web.cern.ch/Linux_keys.htmAki wrote: ↑2023-03-31 18:27 Hello,If the graphical environment is running, the key sequence to activate the console terminal is CTRL-ALT-F[0-9].segviolate wrote: ↑2023-03-31 18:23 I've tried the alternate terminal via alt - F[0-9] but I'm not able to get another terminal session.
Have you tried the REISUB sequence ?
Magic SysReq keys (eg. REISUB) can be reconfigured as well but 438 should be enough. The value of 438 is obtained from the sum of 2 + 4 + 16 + 32 + 128 + 256, so all the corresponding functions are enabled.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
-
- Global Moderator
- Posts: 2933
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 72 times
- Been thanked: 401 times