LinuxX · Kernel ManagementKernel logs
Kernel logs, taint flags, and oops decoding
What you'll learn
- Read dmesg output and understand its severity prefixes
- Identify kernel taint flags and what they mean
- Recognise a kernel oops and extract the relevant information
- Decide when a kernel oops requires escalation
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
The kernel logs to a ring buffer exposed as /dev/kmsg. Reading that buffer is how you investigate hardware, driver, and filesystem issues that originate below userspace.
Reading dmesg output
$ cat /proc/sys/kernel/tainted; echo see-table-below-for-decoding12289
K,B,GIllustrative output
Kernel oops
A kernel oops is the kernel’s “something went wrong, but I am trying to continue” message. Unlike a panic (which halts), an oops may kill the offending process and continue — but the kernel is now tainted.
$ dmesg | grep -A 5 -i 'oops'[12345.678] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
[12345.678] PGD 0 P4D 0
[12345.678] Oops: 0002 [#1] SMP PTIT
[12345.678] CPU: 2 PID: 1234 Comm: myapp Tainted: G W 6.6.31-linuxkit
[12345.678] RIP: 0010:[<ffffffffc0deadbeef>]
...Illustrative output
The discipline for oops:
1; capture the full oops output (photo or serial capture).
2. Check the taint flags — was the kernel already in a problematic state?
3. Check mcelog (or rasdaemon) for hardware-level errors if the oops is a machine check.
4. Look up the oops code in the kernel source (kernel.org git).
5; test on a clone host before applying any fix.
When to escalate
A kernel oops is always worth investigating. The escalation threshold depends on the symptoms:
| Symptom | Escalation |
|---|---|
| One oops, no service impact | File an internal bug; investigate on the next maintenance window |
| Repeated oops, same code path | Open a vendor / kernel bug immediately; the issue is real |
| Oops + service crashes | Treat as an incident; engage the on-call |
| Oops + filesystem corruption | Stop writes; engage storage team; prepare for restore |
| Oops + machine check exception | Hardware fault suspected; engage hardware vendor |
Knowledge check
Knowledge check · 3 questions
Q1. What does `journalctl -p err -k` show?
Q2. A tainted kernel is unusable for production.
Q3. Which of the following are correct kernel-log practices? Select all that apply.
Passing score: 75%. Answers are checked in this browser.