lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Summary of Crash/Panic Behaviors in Linux Kernel
2019년 9월 27일 (금) 오전 5:01, 慕冬亮 <mudongliangabcd@gmail.com>님이 작성:
>
> Dear all,
>
> Is there any summary of crash/panic behaviors in the Linux Kernel? For
> example, GPF (general protection fault), Kernel BUG (BUG_ON).

There are a number of blogs and material which describe the behavior
the kernel panic.

Talking about Android Linux Device, the behavior of kernel panic is as
followings:

USER DEBUG Version(Engineering version)

* On kernel panic, the device suddenly stops execution and keep on
displaying kernel log through the screen.
Below is one of the examples.
[ 34.187856 01-05 13:30:49.424] Unable to handle kernel NULL pointer
dereference at virtual address 00000000
[ 34.197812 01-05 13:30:49.434] pgd = e6f9c000
[ 34.202275 01-05 13:30:49.438] [00000000] *pgd=00000000
[ 34.207610 01-05 13:30:49.444] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 34.214663 01-05 13:30:49.451] Modules linked in: bcmdhd(O)
[ 34.220400 01-05 13:30:49.457] CPU: 0 Tainted: G W O
(3.4.65-gbc0bf75 #1)
[ 34.228317 01-05 13:30:49.464] PC is at ext4_free_inode+0x288/0x574
[ 34.234664 01-05 13:30:49.471] LR is at ext4_free_inode+0x260/0x574

Kernel engineers are able to notice what is the cause of the kernel
panic from kernel log.

USER Version(Production version)

* When kernel panic occurs, the device suddenly stops execution and
starts rebooting again.

In addition, we can describe BUG_ON() and exception as followings:

BUG_ON()

* If the subsystem realizes that it is running under critical condition,
BUG_ON() is called to cause kernel panic.

Please be aware that BUG_ON or BUG is executed only with CONFIG_BUG enabled.
Normally, many Linux devices are running with CONFIG_BUG enabled
*by default*.

Exception(Data abort, Prefeth abort: ARM processor)

* If MMU cannot handle the virtual address translation, exception occurs.
The program counter is jumped into predefined exception vector.
Usually panic() is called and then system is crashed.

Hope above would be helpful.

Thanks,
Austin Kim

>
> --
> My best regards to you.
>
> No System Is Safe!
> Dongliang Mu

\
 
 \ /
  Last update: 2019-09-28 02:22    [W:0.027 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site