How to read, understand, analyze, and debug a Linux kernel panic?

前端 未结 3 944
孤街浪徒
孤街浪徒 2020-12-22 17:58

Consider the following linux kernel dump stack trace, you can trigger a panic from the kernel source code by calling panic(\"debugging a linux kernel panic\");:

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-22 18:44

    In unwind_backtrace+0x0/0xf8 what the +0x0/0xf8 stands for?

    The first number (+0x0) is the offset from the beginning of the function (unwind_backtrace in this case). The second number (0xf8) is the total length of the function. Given these two pieces of information, if you already have a hunch about where the fault occurred this might be enough to confirm your suspicion (you can tell (roughly) how far along in the function you were).

    To get the exact source line of the corresponding instruction (generally better than hunches), use addr2line or the other methods in other answers.

提交回复
热议问题