内核调试
内核调试
本文档介绍 内核调试 的相关内容。
lshw -c network 查看网卡信息时显示错误 Segmentation fault
yum install -y gdb gdb /usr/sbin/lshw <gdb>: run -c network # 查看是哪一个被卡住或不能正常识别,然后再进行关闭 [root@szgl-cloud-opsdev-D1240-12250 ~]# gdb /usr/sbin/lshw GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7 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-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/sbin/lshw...Reading symbols from /usr/sbin/lshw...(no debugging symbols found)...done. (no debugging symbols found)...done. Missing separate debuginfos, use: debuginfo-install lshw-B.02.18-13.el7.x86_64 (gdb) run -c network Starting program: /usr/sbin/lshw -c network [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". USB #### 显示USB存在问题,签名不正常 Program received signal SIGSEGV, Segmentation fault. 0x00007ffff72b1e50 in feof () from /lib64/libc.so.6 # 使用以下方法可查看网卡信息 lshw -disable usb -c network * -network:0 description: Ethernet interface product: NetXtreme BCM5720 2-port Gigabit Ethernet PCIe vendor: Broadcom Inc. and subsidiaries physical id: 0 bus info: pci@0000:02:00.0 logical name: em3 version: 00 serial: 54:9f:35:1f:12:ce size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 duplex=full firmware=FFV7.10.59 bc 5720-v1.36 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:85 memory:91a30000-91a3ffff memory:91a40000-91a4ffff memory:91a50000-91a5ffff memory:91f00000-91f3ffff # 查看对应关系 [root@szgl-cloud-opsdev-D1240-12250 ~]# lshw -disable usb -c network -businfo Bus info Device Class Description ============================================================ pci@0000:02:00.0 em3 network NetXtreme BCM5720 2-port Gigabit Ethernet PCIe pci@0000:02:00.1 em4 network NetXtreme BCM5720 2-port Gigabit Ethernet PCIe pci@0000:01:00.0 em1 network NetXtreme BCM5720 2-port Gigabit Ethernet PCIe pci@0000:01:00.1 em2 network NetXtreme BCM5720 2-port Gigabit Ethernet PCIe team1 network Ethernet interface br1 network Ethernet interface veth1 network Ethernet interface tap2419a1ad-5d network Ethernet interface team1.12 network Ethernet interface veth1-bp network Ethernet interface brq3ea6d99a-e5 network Ethernet interface docker0 network Ethernet interface 本文由作者按照 CC BY 4.0 进行授权