Greeting,
FYI, we noticed WARNING:at_block/bdev.c:#bd_prepare_to_claim due to commit (built with gcc-11):
commit: fb541ca4c36500b7b1d1a4def992059d9af56f14 ("md: remove lock_bdev / unlock_bdev")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
[test failed on linux-next/master c76083fac3bae1a87ae3d005b5cb1cbc761e31d5]
in testcase: mdadm-selftests
version: mdadm-selftests-x86_64-5f41845-1_20220826
with following parameters:
disk: 1HDD
test_prefix: 18
on test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (Haswell) with 8G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-lkp/[email protected]
[ 78.488835][ T913] ------------[ cut here ]------------
[ 78.494802][ T913] WARNING: CPU: 3 PID: 913 at block/bdev.c:577 bd_prepare_to_claim (block/bdev.c:577 (discriminator 1))
[ 78.504268][ T913] Modules linked in: multipath loop raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid10 raid1 raid0 ipmi_devintf ipmi_msghandler intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp btrfs i915 blake2b_generic xor raid6_pq zstd_compress libcrc32c sg kvm_intel drm_buddy kvm irqbypass crct10dif_pclmul crc32_pclmul intel_gtt crc32c_intel ghash_clmulni_intel drm_display_helper ahci sha512_ssse3 ttm mei_wdt libahci rapl drm_kms_helper mei_me intel_cstate syscopyarea joydev i2c_i801 libata intel_uncore mei lpc_ich sysfillrect i2c_smbus video sysimgblt fb_sys_fops wmi drm fuse ip_tables
[ 78.565665][ T913] CPU: 3 PID: 913 Comm: mdadm Tainted: G S 6.1.0-rc2-00207-gfb541ca4c365 #1
[ 78.576327][ T913] Hardware name: Dell Inc. OptiPlex 9020/0DNKMN, BIOS A05 12/05/2013
[ 78.585032][ T913] RIP: 0010:bd_prepare_to_claim (block/bdev.c:577 (discriminator 1))
[ 78.591591][ T913] Code: e8 1e 12 3a ff e9 a3 fe ff ff 4c 89 63 40 48 c7 c7 40 d7 40 84 c6 07 00 0f 1f 00 45 31 c0 65 ff 0d 5e 05 12 7e e9 cb fe ff ff <0f> 0b 41 b8 ea ff ff ff e9 be fe ff ff 48 89 7c 24 28 e8 92 71 98
All code
========
0: e8 1e 12 3a ff callq 0xffffffffff3a1223
5: e9 a3 fe ff ff jmpq 0xfffffffffffffead
a: 4c 89 63 40 mov %r12,0x40(%rbx)
e: 48 c7 c7 40 d7 40 84 mov $0xffffffff8440d740,%rdi
15: c6 07 00 movb $0x0,(%rdi)
18: 0f 1f 00 nopl (%rax)
1b: 45 31 c0 xor %r8d,%r8d
1e: 65 ff 0d 5e 05 12 7e decl %gs:0x7e12055e(%rip) # 0x7e120583
25: e9 cb fe ff ff jmpq 0xfffffffffffffef5
2a:* 0f 0b ud2 <-- trapping instruction
2c: 41 b8 ea ff ff ff mov $0xffffffea,%r8d
32: e9 be fe ff ff jmpq 0xfffffffffffffef5
37: 48 89 7c 24 28 mov %rdi,0x28(%rsp)
3c: e8 .byte 0xe8
3d: 92 xchg %eax,%edx
3e: 71 98 jno 0xffffffffffffffd8
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: 41 b8 ea ff ff ff mov $0xffffffea,%r8d
8: e9 be fe ff ff jmpq 0xfffffffffffffecb
d: 48 89 7c 24 28 mov %rdi,0x28(%rsp)
12: e8 .byte 0xe8
13: 92 xchg %eax,%edx
14: 71 98 jno 0xffffffffffffffae
[ 78.612486][ T913] RSP: 0018:ffffc90000f67aa0 EFLAGS: 00010246
[ 78.619180][ T913] RAX: dffffc0000000000 RBX: ffff88810cc20d80 RCX: 1ffff1102198421a
[ 78.627773][ T913] RDX: 1ffff11043074208 RSI: 0000000000000000 RDI: ffff8882183a1040
[ 78.636373][ T913] RBP: ffff88810cc20d80 R08: 0000000000000001 R09: ffff88810cc2127b
[ 78.644945][ T913] R10: ffffed102198424f R11: 0000000000000001 R12: 0000000000000000
[ 78.653502][ T913] R13: 00000000fffffffe R14: ffff88810cc210d0 R15: ffff88810cc20d80
[ 78.662050][ T913] FS: 00007f3f562f8740(0000) GS:ffff888199b80000(0000) knlGS:0000000000000000
[ 78.671529][ T913] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 78.678656][ T913] CR2: 000055d5e91e4048 CR3: 0000000213af2002 CR4: 00000000001706e0
[ 78.687190][ T913] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 78.695681][ T913] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 78.704295][ T913] Call Trace:
[ 78.708201][ T913] <TASK>
[ 78.711663][ T913] ? _raw_spin_lock (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:543 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:186 include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154)
[ 78.716859][ T913] ? blkdev_put_whole (block/bdev.c:574)
[ 78.722254][ T913] ? kobject_get_unless_zero (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:560 include/linux/refcount.h:157 include/linux/refcount.h:227 include/linux/refcount.h:245 include/linux/kref.h:111 lib/kobject.c:637)
[ 78.728389][ T913] ? _atomic_dec_and_lock (arch/x86/include/asm/atomic.h:29 include/linux/atomic/atomic-arch-fallback.h:1242 include/linux/atomic/atomic-arch-fallback.h:1267 include/linux/atomic/atomic-instrumented.h:608 lib/dec_and_lock.c:24)
[ 78.734181][ T913] ? iput (fs/inode.c:1765 fs/inode.c:1759)
[ 78.738609][ T913] blkdev_get_by_dev (block/bdev.c:1052)
[ 78.744677][ T913] ? devcgroup_check_permission (security/device_cgroup.c:819 security/device_cgroup.c:844)
[ 78.751054][ T913] md_import_device (drivers/md/md.c:3667)
[ 78.756455][ T913] new_dev_store (drivers/md/md.c:4576)
[ 78.761594][ T913] ? md_check_recovery (drivers/md/md.c:4534)
[ 78.767499][ T913] ? _raw_spin_lock (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:543 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:186 include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154)
[ 78.772751][ T913] ? _raw_write_lock_irq (kernel/locking/spinlock.c:153)
[ 78.778694][ T913] md_attr_store (drivers/md/md.c:653 drivers/md/md.c:5544)
[ 78.783828][ T913] ? sysfs_kf_bin_read (fs/sysfs/file.c:129)
[ 78.789721][ T913] kernfs_fop_write_iter (fs/kernfs/file.c:334)
[ 78.795750][ T913] vfs_write (include/linux/fs.h:2191 fs/read_write.c:491 fs/read_write.c:584)
[ 78.800790][ T913] ? kernel_write (fs/read_write.c:565)
[ 78.806282][ T913] ? build_open_flags (fs/open.c:1296)
[ 78.811931][ T913] ? task_work_run (kernel/task_work.c:182 (discriminator 1))
[ 78.817355][ T913] ? __fget_light (arch/x86/include/asm/atomic.h:29 include/linux/atomic/atomic-instrumented.h:28 fs/file.c:1006)
[ 78.822529][ T913] ksys_write (fs/read_write.c:637)
[ 78.827370][ T913] ? __ia32_sys_read (fs/read_write.c:627)
[ 78.832705][ T913] ? switch_fpu_return (arch/x86/include/asm/bitops.h:75 include/asm-generic/bitops/instrumented-atomic.h:42 include/linux/thread_info.h:94 arch/x86/kernel/fpu/context.h:80 arch/x86/kernel/fpu/core.c:755)
[ 78.838290][ T913] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
[ 78.843255][ T913] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
[ 78.849646][ T913] RIP: 0033:0x7f3f563e9f33
[ 78.854552][ T913] Code: 8b 15 61 ef 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
All code
========
0: 8b 15 61 ef 0c 00 mov 0xcef61(%rip),%edx # 0xcef67
6: f7 d8 neg %eax
8: 64 89 02 mov %eax,%fs:(%rdx)
b: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax
12: eb b7 jmp 0xffffffffffffffcb
14: 0f 1f 00 nopl (%rax)
17: 64 8b 04 25 18 00 00 mov %fs:0x18,%eax
1e: 00
1f: 85 c0 test %eax,%eax
21: 75 14 jne 0x37
23: b8 01 00 00 00 mov $0x1,%eax
28: 0f 05 syscall
2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction
30: 77 55 ja 0x87
32: c3 retq
33: 0f 1f 40 00 nopl 0x0(%rax)
37: 48 83 ec 28 sub $0x28,%rsp
3b: 48 89 54 24 18 mov %rdx,0x18(%rsp)
Code starting with the faulting instruction
===========================================
0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
6: 77 55 ja 0x5d
8: c3 retq
9: 0f 1f 40 00 nopl 0x0(%rax)
d: 48 83 ec 28 sub $0x28,%rsp
11: 48 89 54 24 18 mov %rdx,0x18(%rsp)
[ 78.875232][ T913] RSP: 002b:00007ffc5eb6e138 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 78.884360][ T913] RAX: ffffffffffffffda RBX: 00007ffc5eb70390 RCX: 00007f3f563e9f33
[ 78.892858][ T913] RDX: 0000000000000003 RSI: 00007ffc5eb6e220 RDI: 0000000000000006
[ 78.901364][ T913] RBP: 0000000000000006 R08: 00000000ffffffff R09: 00007ffc5eb6dfc0
[ 78.909823][ T913] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc5eb6e220
[ 78.918304][ T913] R13: 00007ffc5eb70390 R14: 0000000000000000 R15: 0000000000000000
[ 78.926730][ T913] </TASK>
[ 78.930224][ T913] ---[ end trace 0000000000000000 ]---
[ 78.936156][ T913] md: could not open device unknown-block(7,0).
[ 79.127239][ T381] /lkp/benchmarks/mdadm-selftests/tests/18imsm-1d-takeover-r0_1d... FAILED - see /var/tmp/18imsm-1d-takeover-r0_1d.log and /var/tmp/fail18imsm-1d-takeover-r0_1d.log for details
[ 79.127248][ T381]
[ 85.431749][ T1025] loop0: detected capacity change from 0 to 40000
[ 85.638740][ T1031] loop1: detected capacity change from 0 to 40000
[ 85.844483][ T1036] loop2: detected capacity change from 0 to 40000
[ 86.051863][ T1041] loop3: detected capacity change from 0 to 40000
[ 86.266434][ T1049] loop4: detected capacity change from 0 to 40000
[ 86.469395][ T1054] loop5: detected capacity change from 0 to 40000
[ 86.676377][ T1059] loop6: detected capacity change from 0 to 40000
[ 86.876781][ T1064] loop7: detected capacity change from 0 to 40000
[ 87.469588][ T1075] loop8: detected capacity change from 0 to 131072
[ 88.061829][ T1080] loop9: detected capacity change from 0 to 131072
[ 88.656197][ T1088] loop10: detected capacity change from 0 to 131072
[ 89.258611][ T1096] loop11: detected capacity change from 0 to 131072
[ 89.863317][ T1101] loop12: detected capacity change from 0 to 131072
[ 90.500181][ T1109] loop13: detected capacity change from 0 to 131072
[ 90.525792][ T381] Testing on linux-6.1.0-rc2-00207-gfb541ca4c365 kernel
[ 90.525805][ T381]
[ 90.611308][ T1126] md: could not open device unknown-block(7,0).
[ 90.804497][ T381] /lkp/benchmarks/mdadm-selftests/tests/18imsm-1d-takeover-r1_2d... FAILED - see /var/tmp/18imsm-1d-takeover-r1_2d.log and /var/tmp/fail18imsm-1d-takeover-r1_2d.log for details
[ 90.804508][ T381]
[ 97.040576][ T1242] loop0: detected capacity change from 0 to 40000
[ 97.241584][ T1248] loop1: detected capacity change from 0 to 40000
[ 97.463397][ T1256] loop2: detected capacity change from 0 to 40000
[ 97.664791][ T1261] loop3: detected capacity change from 0 to 40000
[ 97.870902][ T1266] loop4: detected capacity change from 0 to 40000
[ 98.074234][ T1274] loop5: detected capacity change from 0 to 40000
[ 98.278356][ T1280] loop6: detected capacity change from 0 to 40000
[ 98.491480][ T1287] loop7: detected capacity change from 0 to 40000
[ 99.070949][ T1292] loop8: detected capacity change from 0 to 131072
[ 99.670376][ T1300] loop9: detected capacity change from 0 to 131072
[ 100.265457][ T1305] loop10: detected capacity change from 0 to 131072
[ 100.860594][ T1313] loop11: detected capacity change from 0 to 131072
[ 101.455755][ T1321] loop12: detected capacity change from 0 to 131072
[ 102.055578][ T1326] loop13: detected capacity change from 0 to 131072
[ 102.077796][ T381] Testing on linux-6.1.0-rc2-00207-gfb541ca4c365 kernel
[ 102.077806][ T381]
[ 102.168502][ T1345] md: could not open device unknown-block(7,0).
[ 102.355361][ T381] /lkp/benchmarks/mdadm-selftests/tests/18imsm-r0_2d-takeover-r10_4d... FAILED - see /var/tmp/18imsm-r0_2d-takeover-r10_4d.log and /var/tmp/fail18imsm-r0_2d-takeover-r10_4d.log for details
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
sudo bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
sudo bin/lkp run generated-yaml-file
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests