427 Star 1.5K Fork 1.6K

GVPopenEuler/kernel

 / 详情

【OLK5.10】 WARNING: bad unlock balance in dentry_unlink_inode

Done
内核缺陷
Opened this issue  
2025-03-25 20:39

请尽量提供详细的信息,如缺乏必要的定位信息,则缺陷不会被定位

环境信息

【OS版本】(如openEuler-22.03-LTS,参考命令"cat /etc/os-release"结果)

【内核版本】(如kernel-5.10.0-60.138.0.165,参考命令"uname -r"结果)

【硬件平台】(缺陷相关的硬件信息,如:处理器型号、内存、磁盘、网卡、BIOS 等信息)

【组网信息】(和网络、性能相关的问题,应该说明详细的组网和场景信息)

缺陷信息

【问题复现步骤】
1.
2.
3.

【实际结果】请描述出问题的结果和影响

【期望结果】请描述出期望的结果和影响

【其他相关附件信息】比如 syslog、dmesg、panic、lockup、kdump 信息、图片等

cmd=cd fs_fusiontest/tests/test_fs_fusion076; sh test.sh   testing... 613
[  777.274525][T23730] sh (23730): drop_caches: 3
[  777.307583][T23729] 
[  777.308697][T23729] =====================================
[  777.311636][T23729] WARNING: bad unlock balance detected!
[  777.314217][T23729] 5.10.0-20256-g376819016715 #10 Not tainted
[  777.317088][T23729] -------------------------------------
[  777.319807][T23729] sh/23729 is trying to release lock (&sb->s_type->i_lock_key) at:
[  777.323845][T23729] [<ffffffff81e09bea>] dentry_unlink_inode+0x1fa/0x470
[  777.327673][T23729] but there are no more locks to release!
[  777.331712][T23729] 
[  777.331712][T23729] other info that might help us debug this:
[  777.337045][T23729] 3 locks held by sh/23729:
[  777.340213][T23729]  #0: ffff888190f81448 (sb_writers#4){.+.+}-{0:0}, at: ksys_write+0x132/0x260
[  777.346089][T23729]  #1: ffffffff86a033d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0xcb/0x280
[  777.349021][T23728] sh (23728): drop_caches: 3
[  777.351736][T23729]  #2: ffff88819ecb90e0 (&type->s_umount_key#40){++++}-{3:3}, at: super_cache_scan+0x76/0x580
[  777.359517][T23729] 
[  777.359517][T23729] stack backtrace:
[  777.362766][T23729] CPU: 1 PID: 23729 Comm: sh Not tainted 5.10.0-20256-g376819016715 #10
[  777.367382][T23729] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[  777.373898][T23729] Call Trace:
[  777.375597][T23729]  dump_stack+0x107/0x167
[  777.377586][T23729]  ? dentry_unlink_inode+0x1fa/0x470
[  777.380129][T23729]  __lock_release.cold+0x11/0x19
[  777.382392][T23729]  ? lock_downgrade+0x100/0x100
[  777.384937][T23729]  ? __lock_release+0x220/0x520
[  777.387368][T23729]  ? dentry_unlink_inode+0x1fa/0x470
[  777.390048][T23729]  lock_release+0xdb/0x1c0
[  777.392205][T23729]  _raw_spin_unlock+0x17/0x30
[  777.394429][T23729]  dentry_unlink_inode+0x1fa/0x470
[  777.397060][T23729]  __dentry_kill+0x3ea/0x6c0
[  777.399397][T23729]  ? shrink_dentry_list+0xc1/0x570
[  777.401831][T23729]  shrink_dentry_list+0x134/0x570
[  777.404115][T23729]  prune_dcache_sb+0xec/0x150
[  777.406306][T23729]  ? d_invalidate+0x280/0x280
[  777.408633][T23729]  super_cache_scan+0x336/0x580
[  777.411011][T23729]  do_shrink_slab+0x432/0x9e0
[  777.413362][T23729]  shrink_slab+0x172/0x280
[  777.415384][T23729]  ? register_shrinker+0x50/0x50
[  777.418021][T23729]  ? mem_cgroup_iter+0x4b2/0xeb0
[  777.420820][T23729]  drop_slab_node+0xa1/0x170
[  777.423375][T23729]  drop_slab+0x55/0xa0
[  777.425242][T23729]  drop_caches_sysctl_handler+0xff/0x120
[  777.427821][T23729]  proc_sys_call_handler+0x34d/0x630
[  777.430260][T23729]  ? proc_sys_lookup+0x590/0x590
[  777.432534][T23729]  ? __lock_acquire+0x7ac/0x1070
[  777.435127][T23729]  new_sync_write+0x42e/0x670
[  777.437288][T23729]  ? new_sync_read+0x700/0x700
[  777.439457][T23729]  ? ksys_write+0x132/0x260
[  777.441528][T23729]  ? lock_release+0x1c0/0x1c0
[  777.443730][T23729]  ? security_file_permission+0x2e5/0x6a0
[  777.446312][T23729]  vfs_write+0x7c6/0xb50
[  777.448307][T23729]  ksys_write+0x132/0x260
[  777.450417][T23729]  ? __ia32_sys_read+0xb0/0xb0
[  777.452777][T23729]  do_syscall_64+0x30/0x40
[  777.454778][T23729]  entry_SYSCALL_64_after_hwframe+0x67/0xd1
[  777.457614][T23729] RIP: 0033:0x7f6c036e4f07
[  777.459653][T23729] Code: 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
[  777.470908][T23729] RSP: 002b:00007fff481ecac8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  777.475460][T23729] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f6c036e4f07
[  777.479470][T23729] RDX: 0000000000000002 RSI: 0000558dacb68290 RDI: 0000000000000001
[  777.484834][T23729] RBP: 0000558dacb68290 R08: 00007f6c03799000 R09: 00007f6c03799080
[  777.489458][T23729] R10: 00007f6c03798f80 R11: 0000000000000246 R12: 0000000000000002
[  777.493439][T23729] R13: 00007f6c037da5a0 R14: 0000000000000002 R15: 00007f6c037da7a0
[  777.497572][T23729] ------------[ cut here ]------------
[  777.500466][T23729] pvqspinlock: lock 0xffff8881aa5fbb68 has corrupted value 0x0!
[  777.504438][T23729] WARNING: CPU: 1 PID: 23729 at kernel/locking/qspinlock_paravirt.h:498 __pv_queued_spin_unlock_slowpath+0xf7/0x140
[  777.510364][T23729] Modules linked in:
[  777.512226][T23729] CPU: 1 PID: 23729 Comm: sh Not tainted 5.10.0-20256-g376819016715 #10
[  777.516338][T23729] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[  777.525041][T23729] RIP: 0010:__pv_queued_spin_unlock_slowpath+0xf7/0x140
[  777.528992][T23729] Code: c1 ea 03 0f b6 14 02 48 89 e8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 51 8b 55 00 48 89 ee 48 c7 c7 00 28 4d 85 e8 23 75 73 03 <0f> 0b e9 76 ff ff ff 48 89 04 24 e8 49 10 76 00 48 8b 04 24 e9 59
[  777.542017][T23729] RSP: 0000:ffff888196a8f7e0 EFLAGS: 00010286
[  777.546417][T23729] RAX: 0000000000000000 RBX: ffff8881aa5fbcc8 RCX: 0000000000000000
[  777.551225][T23729] RDX: ffff8881c1330040 RSI: ffffffff81570882 RDI: ffffed1032d51eee
[  777.556642][T23729] RBP: ffff8881aa5fbb68 R08: 0000000000000001 R09: ffff8881d1ac1727
[  777.561494][T23729] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8881aa5fbb70
[  777.567065][T23729] R13: ffff8881aa5fbb78 R14: 0000000000000000 R15: ffff88819c4c8120
[  777.572989][T23729] FS:  00007f6c035e5740(0000) GS:ffff8881d1a80000(0000) knlGS:0000000000000000
[  777.579426][T23729] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  777.584312][T23729] CR2: 0000558dacacbecc CR3: 00000001c60ce001 CR4: 0000000000770ee0
[  777.590283][T23729] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  777.594630][T23729] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  777.599887][T23729] PKRU: 55555554
[  777.602432][T23729] Call Trace:
[  777.605048][T23729]  ? __warn+0xe7/0x1f0
[  777.607849][T23729]  ? __pv_queued_spin_unlock_slowpath+0xf7/0x140
[  777.612519][T23729]  ? report_bug+0x28f/0x300
[  777.615966][T23729]  ? handle_bug+0x41/0x90
[  777.619221][T23729]  ? exc_invalid_op+0x14/0x70
[  777.622793][T23729]  ? asm_exc_invalid_op+0x12/0x20
[  777.626601][T23729]  ? vprintk_func+0xe2/0x210
[  777.630029][T23729]  ? __pv_queued_spin_unlock_slowpath+0xf7/0x140
[  777.633633][T23729]  __raw_callee_save___pv_queued_spin_unlock_slowpath+0x11/0x24
[  777.638278][T23729]  ? debug_locks_off+0x17/0xe0
[  777.641965][T23729]  .slowpath+0x9/0x16
[  777.644812][T23729]  ? debug_locks_off+0x23/0xe0
[  777.647833][T23729]  do_raw_spin_unlock+0x149/0x1f0
[  777.650302][T23729]  _raw_spin_unlock+0x1f/0x30
[  777.652641][T23729]  dentry_unlink_inode+0x1fa/0x470
[  777.655408][T23729]  __dentry_kill+0x3ea/0x6c0
[  777.657825][T23729]  ? shrink_dentry_list+0xc1/0x570
[  777.660489][T23729]  shrink_dentry_list+0x134/0x570
[  777.663100][T23729]  prune_dcache_sb+0xec/0x150
[  777.665756][T23729]  ? d_invalidate+0x280/0x280
[  777.669018][T23729]  super_cache_scan+0x336/0x580
[  777.672466][T23729]  do_shrink_slab+0x432/0x9e0
[  777.675999][T23729]  shrink_slab+0x172/0x280
[  777.679289][T23729]  ? register_shrinker+0x50/0x50
[  777.683239][T23729]  ? mem_cgroup_iter+0x4b2/0xeb0
[  777.686120][T23729]  drop_slab_node+0xa1/0x170
[  777.688628][T23729]  drop_slab+0x55/0xa0
[  777.690704][T23729]  drop_caches_sysctl_handler+0xff/0x120
[  777.693728][T23729]  proc_sys_call_handler+0x34d/0x630
[  777.696872][T23729]  ? proc_sys_lookup+0x590/0x590
[  777.700172][T23729]  ? __lock_acquire+0x7ac/0x1070
[  777.703233][T23729]  new_sync_write+0x42e/0x670
[  777.706115][T23729]  ? new_sync_read+0x700/0x700
[  777.708493][T23729]  ? ksys_write+0x132/0x260
[  777.710702][T23729]  ? lock_release+0x1c0/0x1c0
[  777.713056][T23729]  ? security_file_permission+0x2e5/0x6a0
[  777.715831][T23729]  vfs_write+0x7c6/0xb50
[  777.717882][T23729]  ksys_write+0x132/0x260
[  777.720443][T23729]  ? __ia32_sys_read+0xb0/0xb0
[  777.722792][T23729]  do_syscall_64+0x30/0x40
[  777.725082][T23729]  entry_SYSCALL_64_after_hwframe+0x67/0xd1
[  777.728280][T23729] RIP: 0033:0x7f6c036e4f07
[  777.731340][T23729] Code: 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
[  777.745211][T23729] RSP: 002b:00007fff481ecac8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  777.750805][T23729] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f6c036e4f07
[  777.755091][T23729] RDX: 0000000000000002 RSI: 0000558dacb68290 RDI: 0000000000000001
[  777.758922][T23729] RBP: 0000558dacb68290 R08: 00007f6c03799000 R09: 00007f6c03799080
[  777.762771][T23729] R10: 00007f6c03798f80 R11: 0000000000000246 R12: 0000000000000002
[  777.766817][T23729] R13: 00007f6c037da5a0 R14: 0000000000000002 R15: 00007f6c037da7a0
[  777.770647][T23729] Kernel panic - not syncing: kernel: panic_on_warn set ...
[  777.774157][T23729] CPU: 1 PID: 23729 Comm: sh Not tainted 5.10.0-20256-g376819016715 #10
[  777.778581][T23729] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[  777.787150][T23729] Call Trace:
[  777.789312][T23729]  dump_stack+0x107/0x167
[  777.791669][T23729]  panic+0x372/0x6e1
[  777.793636][T23729]  ? __warn_printk+0xfc/0xfc
[  777.795889][T23729]  ? entry_SYSCALL_64_after_hwframe+0x67/0xd1
[  777.798947][T23729]  ? check_panic_on_warn+0x20/0x90
[  777.801436][T23729]  ? __pv_queued_spin_unlock_slowpath+0xf7/0x140
[  777.804862][T23729]  check_panic_on_warn.cold+0x19/0x35
[  777.807740][T23729]  __warn+0xf3/0x1f0
[  777.809900][T23729]  ? __pv_queued_spin_unlock_slowpath+0xf7/0x140
[  777.814279][T23729]  report_bug+0x28f/0x300
[  777.816919][T23729]  handle_bug+0x41/0x90
[  777.819090][T23729]  exc_invalid_op+0x14/0x70
[  777.821759][T23729]  asm_exc_invalid_op+0x12/0x20
[  777.824235][T23729] RIP: 0010:__pv_queued_spin_unlock_slowpath+0xf7/0x140
[  777.828171][T23729] Code: c1 ea 03 0f b6 14 02 48 89 e8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 51 8b 55 00 48 89 ee 48 c7 c7 00 28 4d 85 e8 23 75 73 03 <0f> 0b e9 76 ff ff ff 48 89 04 24 e8 49 10 76 00 48 8b 04 24 e9 59
[  777.838731][T23729] RSP: 0000:ffff888196a8f7e0 EFLAGS: 00010286
[  777.841865][T23729] RAX: 0000000000000000 RBX: ffff8881aa5fbcc8 RCX: 0000000000000000
[  777.845503][T23729] RDX: ffff8881c1330040 RSI: ffffffff81570882 RDI: ffffed1032d51eee
[  777.849155][T23729] RBP: ffff8881aa5fbb68 R08: 0000000000000001 R09: ffff8881d1ac1727
[  777.853200][T23729] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8881aa5fbb70
[  777.856933][T23729] R13: ffff8881aa5fbb78 R14: 0000000000000000 R15: ffff88819c4c8120
[  777.860963][T23729]  ? vprintk_func+0xe2/0x210
[  777.863255][T23729]  __raw_callee_save___pv_queued_spin_unlock_slowpath+0x11/0x24
[  777.866991][T23729]  ? debug_locks_off+0x17/0xe0
[  777.869218][T23729]  .slowpath+0x9/0x16
[  777.871128][T23729]  ? debug_locks_off+0x23/0xe0
[  777.873978][T23729]  do_raw_spin_unlock+0x149/0x1f0
[  777.877342][T23729]  _raw_spin_unlock+0x1f/0x30
[  777.879787][T23729]  dentry_unlink_inode+0x1fa/0x470
[  777.882349][T23729]  __dentry_kill+0x3ea/0x6c0
[  777.884744][T23729]  ? shrink_dentry_list+0xc1/0x570
[  777.887880][T23729]  shrink_dentry_list+0x134/0x570
[  777.891444][T23729]  prune_dcache_sb+0xec/0x150
[  777.894822][T23729]  ? d_invalidate+0x280/0x280
[  777.898162][T23729]  super_cache_scan+0x336/0x580
[  777.901840][T23729]  do_shrink_slab+0x432/0x9e0
[  777.904183][T23729]  shrink_slab+0x172/0x280
[  777.906517][T23729]  ? register_shrinker+0x50/0x50
[  777.909090][T23729]  ? mem_cgroup_iter+0x4b2/0xeb0
[  777.912573][T23729]  drop_slab_node+0xa1/0x170
[  777.916163][T23729]  drop_slab+0x55/0xa0
[  777.918428][T23729]  drop_caches_sysctl_handler+0xff/0x120
[  777.921778][T23729]  proc_sys_call_handler+0x34d/0x630
[  777.925061][T23729]  ? proc_sys_lookup+0x590/0x590
[  777.928588][T23729]  ? __lock_acquire+0x7ac/0x1070
[  777.931986][T23729]  new_sync_write+0x42e/0x670
[  777.935332][T23729]  ? new_sync_read+0x700/0x700
[  777.938735][T23729]  ? ksys_write+0x132/0x260
[  777.941796][T23729]  ? lock_release+0x1c0/0x1c0
[  777.945140][T23729]  ? security_file_permission+0x2e5/0x6a0
[  777.949011][T23729]  vfs_write+0x7c6/0xb50
[  777.951408][T23729]  ksys_write+0x132/0x260
[  777.954398][T23729]  ? __ia32_sys_read+0xb0/0xb0
[  777.956744][T23729]  do_syscall_64+0x30/0x40
[  777.959037][T23729]  entry_SYSCALL_64_after_hwframe+0x67/0xd1
[  777.961861][T23729] RIP: 0033:0x7f6c036e4f07
Error: Could not stat device /dev/sdb - No such file or directory.

【已分析信息】如已经做过分析和定位,请尽量附上详细的分析结果
二、缺陷分析结构反馈
影响性分析说明:

缺陷严重等级:(Critical/High/Moderate/Low)

缺陷根因说明:

受影响版本排查(受影响/不受影响):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1

修复是否涉及abi变化(是/否):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1

Comments (3)

LiBaokun created内核缺陷 9 days ago

Hi cool-water, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers.

openeuler-ci-bot set assignee to CTC-Xibo.Wang 9 days ago
openeuler-ci-bot added
 
sig/Kernel
label
9 days ago
openeuler-ci-bot changed description 9 days ago
openeuler-ci-bot added
 
DEFECT/UNFIXED
label
9 days ago
openeuler-ci-bot set start time to 2025-03-25 9 days ago
openeuler-ci-bot set deadline to 2025-04-01 9 days ago
ci-robot related pull requestopenEuler/kernel Pull Request !15695 5 days ago
ci-robot related pull requestopenEuler/kernel Pull Request !15696 5 days ago
ci-robot related pull requestopenEuler/kernel Pull Request !15697 5 days ago
openeuler-ci-bot through merging Pull Request !15697: fs/dcache: fix bad unlock balance in shrink_dentry_list() changed issue state from 待办的 to 已完成 23 hours ago
openeuler-ci-bot removed
 
DEFECT/UNFIXED
label
23 hours ago

Sign in to comment

Status
Assignees
Projects
Duration (hours)
Planed to start   -   Planed to end
-
Top level
模块/子系统
Priority
Milestones
Branches
参与者(2)
5329419 openeuler ci bot 1632792936 LiBaokun-cool-water
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

Search