vmcore-dmesg:log_bufシンボルがありません

vmcore-dmesg:log_bufシンボルがありません

kdumpを使用してvmcoreファイルを作成し、これを分析するためのターンです。

まず、コアダンプからdmesgログを取得することです。これは次のことを行う必要があります。

  vmcore-dmesg vmcore

しかし、エラーが発生して動作しないようです。

Missing the log_buf symbol

このエラーを解決する方法を知っている人はいますか?

どんな助けでも大変感謝します。

ベストアンサー1

dmesgログを取得する方法は2つあります。

  1. vmcoreが保存されているのと同じディレクトリにdmesgログを見つけることができます。
  2. crashを使用してvmcoreからdmesgログをダンプできます(衝突にはカーネルのデバッグシンボルが必要です)。
$ sudo crash /usr/lib/debug/boot/vmlinux-5.4.0-99-generic /var/crash/202202110944/dump.202202110944 

crash 7.2.8
Copyright (C) 2002-2020  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.
 
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...

WARNING: kernel relocated [688MB]: patching 115324 gdb minimal_symbol values

      KERNEL: /usr/lib/debug/boot/vmlinux-5.4.0-99-generic             
    DUMPFILE: /var/crash/202202110944/dump.202202110944  [PARTIAL DUMP]
        CPUS: 4
        DATE: Fri Feb 11 09:43:56 2022
      UPTIME: 00:05:50
LOAD AVERAGE: 0.08, 0.16, 0.10
       TASKS: 566
    NODENAME: user-virtual-machine
     RELEASE: 5.4.0-99-generic
     VERSION: #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022
     MACHINE: x86_64  (2808 Mhz)
      MEMORY: 8 GB
       PANIC: "Kernel panic - not syncing: sysrq triggered crash"
         PID: 0
     COMMAND: "swapper/2"
        TASK: ffff8f13f44a0000  (1 of 4)  [THREAD_INFO: ffff8f13f44a0000]
         CPU: 2
       STATE: TASK_RUNNING (PANIC)

crash> dmesg
[    0.000000] Linux version 5.4.0-99-generic (buildd@lgw01-amd64-007) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022 (Ubuntu 5.4.0-99.112-generic 5.4.162)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-99-generic root=/dev/mapper/vgubuntu-root ro quiet splash crashkernel=4096M-:512M vt.handoff=7
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Hygon HygonGenuine
[    0.000000]   Centaur CentaurHauls
[    0.000000]   zhaoxin   Shanghai  
[    0.000000] Disabled fast string operations
...

おすすめ記事