what is linux oops

青灯夜游
Release: 2022-02-24 13:48:24
Original
3569 people have browsed it

In Linux, oops means "surprise", which is an information prompt, meaning that something running on the system violates the rules specified by the kernel; oops will generate a crash signature "crash signature", which can Helps kernel developers find bugs and improve code quality.

what is linux oops

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

The Linux kernel is watching you, and when it detects something running on the system that violates normal kernel behavior, it shuts down the system and issues an "oops!"

If you examine the processes running on your Linux system, you may be curious about a process called "kerneloops". Just a reminder, it's "kernel oops", not "kerne loops".

To put it bluntly, "oops" are part of the Linux kernel that behaves erratically. Did you do anything wrong? Maybe not. But something is wrong. And the process that did something wrong may have been terminated by the CPU. Worst of all, the kernel might throw an error and shut down the system abruptly.

Please note that "oops" is not an acronym. It does not mean something like "object-oriented programming and systems" or "out of procedural specs". It's literally "oops," like you just dropped a glass of wine or stepped on your cat. oops! The plural form of "oops" is "oopses".

oops means that something running on the system violates the kernel's rules for correct behavior. Maybe the code tries to take a code path that's not allowed or uses an invalid pointer. Whatever it is, the kernel - which is always monitoring processes for misbehavior - will most likely block a specific process and write a message to the console, /var/log/dmesg, about what it did. Or /var/log/kern.log.

oops may be caused by the kernel itself, or they may be caused by some process trying to get the kernel to violate what it can and is allowed to do on the system.

oops will generate a crash signature, which can help kernel developers find bugs and improve code quality.

The kernelloops process running on your system may look like this:

kernoops 881 1 0 Feb11 ? 00:00:01 /usr/sbin/kerneloops
Copy after login

You may notice that the process is not run by root, but by a user named "kernoops", And it has minimal running time. In fact, the only task assigned to this particular user is to run kerneloops.

$ sudo grep kernoops /etc/passwd
kernoops:x:113:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false
Copy after login

If your Linux system does not come with kerneloops (such as Debian), you may consider adding it. Check out this Debian page for more information.

When should you pay attention to oops?

General oops no big deal. It depends in part on the role played by a particular process. It also depends on the category of oops.

Some oops are serious and can cause system panic. Technically, system panics are a subset of oops (i.e., more severe oops). Occurs when the problem detected by the kernel is severe enough that the kernel believes that it (the kernel) must stop running immediately to prevent data loss or other damage to the system. Therefore, the system needs to be paused and restarted to prevent any inconsistencies from causing unavailability or unreliability. So the system panics actually to protect itself from irreparable damage.

In short, all kernel panics are oops, but not all oops are kernel panics.

/var/log/kern.log and related rotation logs (/var/log/kern.log.1, /var/log /kern.log.2 etc.) contains logs generated by the kernel and processed by syslog.

The kernelloops program collects and by default submits error information to http://oops.kernel.org/, where it is analyzed and presented to kernel developers. Configuration details for this process are specified in the /etc/kerneloops.conf file. You can easily view the settings using the following command:

$ sudo cat /etc/kerneloops.conf | grep -v ^# | grep -v ^$
[sudo] password for shs:allow-submit = ask
allow-pass-on = yes
submit-url = http://oops.kernel.org/submitoops.phplog-file = /var/log/kern.logsubmit-pipe = /usr/share/apport/kernel_oops
Copy after login

In the above (default) settings, kernel issues can be submitted, but user permission is required. If set to allow-submit = always, the user will not be asked.

Debugging kernel problems is one of the more advanced techniques for using a Linux system. Fortunately, most Linux users rarely or never experience oops or kernel panics. However, it's also good to know what a process like kerneloops does on your system, and to know what it might report and when your system encounters a severe kernel conflict.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of what is linux oops. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!