[crash分析]Kernel panic - not syncing: Aiee, killing interrupt handler!
公司产品升级后,测试发现下发某个配置失败时会导致系统crash。
crash查看栈显示如下,没有有用信息。
crash> bt
PID: 3348 TASK: ffff880175034e70 CPU: 3 COMMAND: "test.sh"#0 [ffff88016c063b38] machine_kexec at ffffffff81059beb#1 [ffff88016c063b98] __crash_kexec at ffffffff81105822#2 [ffff88016c063c68] panic at ffffffff81680541#3 [ffff88016c063ce8] do_exit at ffffffff8108c766#4 [ffff88016c063d78] do_group_exit at ffffffff8108c92f#5 [ffff88016c063da8] get_signal_to_deliver at ffffffff8109d980#6 [ffff88016c063e40] do_signal at ffffffff8102a427#7 [ffff88016c063f30] do_notify_resume at ffffffff8102aaef#8 [ffff88016c063f50] retint_signal at ffffffff8168effcRIP: 00007fe2414599f0 RSP: 00007fff17ea1938 RFLAGS: 00010246RAX: 00007fe241e306c0 RBX: 0000000000000016 RCX: 0000000000000000RDX: 0000000000000000 RSI: 00007fe2415a67fd RDI: 00007fe2415a643cRBP: 0000000000000000 R8: 0000000000000000 R9: 0000000000000005R10: 00007fff17ea1740 R11: 00007fe2414b0910 R12: 0000000000000000R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000ORIG_RAX: ffffffffffffffff CS: 0033 SS: 002b
查看vmcore-dmesg发现有 scheduling while atomic: test.sh/3348/0x00000400。
[ 287.366523] BUG: scheduling while atomic: test.sh/3348/0x00000400
[ 287.366525] Modules linked in: lwconn(OE) bridge stp llc sha512_ssse3 sha512_generic intel_powerclamp drbg ansi_cprng coretemp iosf_mbi kvm_intel igb(OE) kvm irqbypass crc32_pclmul iTCO_wdt ghash_clmulni_intel iTCO_vendor_support aesni_intel lrw ipmi_ssif qat_c3xxx gf128mul glue_helper ablk_helper pcspkr intel_qat cryptd i2c_i801 i2c_ismt authenc ipmi_msghandler i2c_algo_bit i2c_core shpchp ip_tables xfs libcrc32c mmc_block ahci libahci crct10dif_pclmul sdhci_pci ixgbe(OE) crct10dif_common sdhci dca crc32c_intel ptp pps_core mmc_core libata fjes dm_mirror dm_region_hash dm_log dm_mod nf_conntrack [last unloaded: lwconn]
[ 287.366571] CPU: 3 PID: 3348 Comm: link52.sh Tainted: G OE ------------ 3.10.0-514.26.2.el7.x86_64 #1
[ 287.366573] Hardware name: Default string DTA1161AC4/Default string, BIOS 5.13 (G168-025) 07/08/2020
[ 287.366574] 0000000000000000 0000000075a7f477 ffff88016c063ee8 ffffffff81687133
[ 287.366578] ffff88016c063ef8 ffffffff81680dd1 ffff88016c063f58 ffffffff8168c6de
[ 287.366581] ffff880175034e70 ffff88016c063fd8 ffff88016c063fd8 ffff88016c063fd8
[ 287.366584] Call Trace:
[ 287.366593] [<ffffffff81687133>] dump_stack+0x19/0x1b
[ 287.366596] [<ffffffff81680dd1>] __schedule_bug+0x4d/0x5b
[ 287.366600] [<ffffffff8168c6de>] __schedule+0x89e/0x990
[ 287.366603] [<ffffffff8168d831>] schedule_user+0x31/0xc0
[ 287.366606] [<ffffffff81697875>] sysret_careful+0x14/0x17
也就是说出现了在中断中调度的情况。preempt_count()为0x00000400。
之前讲过
软中断中我们会 preempt_count()+0x100;
local_bh_disable()会 preempt_count()+0x200;
0x400看起来是 local_bh_disable() 嵌套后的结果。
从log中我们可知每次下发link配置并且失败后,会导致crash。配置下发正常却没有问题。
初步查看link配置处理代码,没有发现异常(大意了)。于是增加debug log,打印preempt_count()。
复现后,查看debug log,发现link配置处理代码执行前是preempt_count()是0x00,嵌套调用 spin_lock_bh(A),spin_lock_bh(B) 后,是0x400,函数异常返回后,preempt_count()依然是0x400。
再仔细查看link配置处理代码,发先正常处理中,会调用 spin_unlock_bh(B),spin_unlock_bh(A)。然后函数返回,一切正常。
但是在异常处理逻辑中,调用了 spin_unlock(B),spin_unlock(A)。lock B和A是释放了,但是中断下半部没有enable,导致函数退出后,进程处在中断下半部disable状态。一旦有调度情况,就会出现scheduling while atomic 错误,导致系统异常。
后记:
当我们发现 scheduling while atomic 后,查看 preempt_count(),根据preempt_count()的值,来分析相关操作中对应的lock/unlock是否不匹配。
[crash分析]Kernel panic - not syncing: Aiee, killing interrupt handler!相关推荐
- [crash分析]“Kernel panic - not syncing: Aiee, killing interrupt handler”“BUG: scheduling while atomic“
crash的直接提示信息"Kernel panic - not syncing: Aiee, killing interrupt handler!",不太常见.crash栈也没太多 ...
- 内核移植出现:Kernel panic - not syncing: No init found.
今天在升级SDK的时候,升级到kernel时遇到如题所述的问题,花了天时间调通,在这里记录一下. 报错提示:(当时没有记录,错误的提示大概如下) Kernel panic - not syncing: ...
- Centos 6或7系统 从Kernel panic – not syncing: Attempted to kill init 故障引发的一系列操作
Centos 6或7系统 从Kernel panic – not syncing: Attempted to kill init 故障引发的一系列操作 Step1 问题描述 Step2 故障处理 St ...
- linux启动根文件失败报错:进程退出exitcode,Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
进程退出的 exitcode 错误信息 内核打印 1 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b 分 ...
- linux 开机提示 Kernel panic - not syncing: Attempted to kill init! 解决方案
原因极可能是:"在设置selinux的时候,是不是位置写错了,应该修改SELINUX行,而不是SELINUXTYPE" 问题:开机提示"Kernel panic - no ...
- NFS挂载失败(Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0))
写在前面: 我的博客已迁移至自建服务器:博客传送门,CSDN博客暂时停止,如有机器学习方面的兴趣,欢迎来看一看. 此外目前我在gitHub上准备一些李航的<统计学习方法>的实现算法,目标将 ...
- Kernel panic -not syncing:Attempted to kill init!
DELL R210II安装RHEL后启动系统正常,关机再装磁盘阵列卡接好磁盘阵列,开机后CTRL+R进入界面配置RAID5. 启动后出现错误: Kernel panic -not syncing:At ...
- Linux启动提示Kernel panic - not syncing: Attempted to kill init解决办法
系统类型:CentOS 6.5(x64) 启动提示:Kernel panic - not syncing: Attempted to kill init 解决办法: 系统启动的时候,按下'e'键进入g ...
- CentOS系统Kernel panic - not syncing: Attempted to k
2019独角兽企业重金招聘Python工程师标准>>> Centos系统启动时报 Kernel panic - not syncing: Attempted to kill init ...
最新文章
- 据说看完这21个故事的人,30岁前都成了亿万富翁。你是下一个吗?
- python编程代码示例_python编程线性回归代码示例
- Doxygen基本用法
- 防火墙对nginx服务器有影响
- Jerry带您了解Restful ABAP Programming模型系列之三:云端ABAP应用调试
- MySQL - cast()函数
- android q全局夜间模式,安卓Q新功能全局夜间模式,网友:都9102年了,魅族Flyme早就有...
- Excel自动换行、Export2Excel 自动换行
- linux开启和关闭防火墙
- AURIX Development Studio 使用指北(不定时更新)
- word文档图片画红线_Word文档怎么在图片内画线?
- 电视机当计算机屏幕,电视机能不能当电脑显示器?告诉你正确答案
- 机器学习_深度学习毕设题目汇总——图像分割
- 这些API接口,随便拿出来一个就能装逼、赚钱
- 有效防御DDOS的八规则
- 三星同时发展两种电视面板技术,围追堵截LG
- PN532NFC模块串口通信使用教程
- 位置度最大实体计算方式
- OpenCVSharp学习(五):关于摄像头的操作,打开,拍照,录视频
- 解决sudo pacman -S archlinuxcn-keyring 报错