Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: 2aa18c32fd0905de7894b1e3a32f84edf77bc840 ("block/mq-deadline: Add cgroup support")
https://github.com/bvanassche/linux deadline-scheduler
in testcase: mdadm-selftests
version: mdadm-selftests-x86_64-5f41845-1_20210508
with following parameters:
disk: 1HDD
test_prefix: 15
ucode: 0x21
on test machine: 4 threads 1 sockets Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz 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]>
kern :warn : [ 100.174333] WARNING: CPU: 0 PID: 1055 at block/mq-deadline-main.c:714 dd_insert_requests (kbuild/src/consumer/block/mq-deadline-main.c:714 kbuild/src/consumer/block/mq-deadline-main.c:761)
kern :warn : [ 100.184543] Modules linked in: multipath loop raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid10 raid1 raid0 netconsole btrfs blake2b_generic xor zstd_compress raid6_pq libcrc32c ipmi_devintf ipmi_msghandler sd_mod t10_pi sg intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp i915 kvm_intel kvm intel_gtt drm_kms_helper irqbypass crct10dif_pclmul syscopyarea crc32_pclmul sysfillrect crc32c_intel sysimgblt ghash_clmulni_intel fb_sys_fops rapl wmi_bmof intel_cstate intel_uncore ahci libahci mei_me drm video libata wmi joydev mei ip_tables
kern :warn : [ 100.240822] CPU: 0 PID: 1055 Comm: mkfs.ext3 Not tainted 5.13.0-rc3-00092-g2aa18c32fd09 #1
kern :warn : [ 100.250180] Hardware name: Hewlett-Packard HP Pro 3340 MT/17A1, BIOS 8.07 01/24/2013
kern :warn : [ 100.259064] RIP: 0010:dd_insert_requests (kbuild/src/consumer/block/mq-deadline-main.c:714 kbuild/src/consumer/block/mq-deadline-main.c:761)
kern :warn : [ 100.265114] Code: c6 07 00 0f 1f 40 00 65 ff 0d a7 fe a0 7e 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f c3 4c 89 f7 e8 d0 21 01 00 e9 f3 fe ff ff <0f> 0b e9 26 ff ff ff 41 8b 47 d0 4c 89 f6 83 e0 01 48 83 c0 01 48
All code
========
0: c6 07 00 movb $0x0,(%rdi)
3: 0f 1f 40 00 nopl 0x0(%rax)
7: 65 ff 0d a7 fe a0 7e decl %gs:0x7ea0fea7(%rip) # 0x7ea0feb5
e: 48 83 c4 18 add $0x18,%rsp
12: 5b pop %rbx
13: 5d pop %rbp
14: 41 5c pop %r12
16: 41 5d pop %r13
18: 41 5e pop %r14
1a: 41 5f pop %r15
1c: c3 retq
1d: 4c 89 f7 mov %r14,%rdi
20: e8 d0 21 01 00 callq 0x121f5
25: e9 f3 fe ff ff jmpq 0xffffffffffffff1d
2a:* 0f 0b ud2 <-- trapping instruction
2c: e9 26 ff ff ff jmpq 0xffffffffffffff57
31: 41 8b 47 d0 mov -0x30(%r15),%eax
35: 4c 89 f6 mov %r14,%rsi
38: 83 e0 01 and $0x1,%eax
3b: 48 83 c0 01 add $0x1,%rax
3f: 48 rex.W
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: e9 26 ff ff ff jmpq 0xffffffffffffff2d
7: 41 8b 47 d0 mov -0x30(%r15),%eax
b: 4c 89 f6 mov %r14,%rsi
e: 83 e0 01 and $0x1,%eax
11: 48 83 c0 01 add $0x1,%rax
15: 48 rex.W
kern :warn : [ 100.286230] RSP: 0018:ffffc9000101fb40 EFLAGS: 00010246
kern :warn : [ 100.292611] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
kern :warn : [ 100.300920] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8881ff9a2f00
kern :warn : [ 100.309253] RBP: ffff8880744c3200 R08: ffffc9000101fbd0 R09: 0000000000000000
kern :warn : [ 100.317578] R10: 0000000000000033 R11: 0000000000000000 R12: ffffc9000101fbd0
kern :warn : [ 100.325885] R13: ffff88821a411908 R14: ffff8881ff981a40 R15: ffff8881ff981a88
kern :warn : [ 100.334200] FS: 00007f21576fe780(0000) GS:ffff88821fa00000(0000) knlGS:0000000000000000
kern :warn : [ 100.343452] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern :warn : [ 100.350333] CR2: 00007f215797f060 CR3: 00000001a07a6002 CR4: 00000000001706f0
kern :warn : [ 100.358636] Call Trace:
kern :warn : [ 100.362195] blk_mq_sched_insert_requests (kbuild/src/consumer/block/blk-mq-sched.c:513)
kern :warn : [ 100.368316] blk_mq_flush_plug_list (kbuild/src/consumer/include/linux/list.h:282 kbuild/src/consumer/block/blk-mq.c:1960)
kern :warn : [ 100.373997] blk_flush_plug_list (kbuild/src/consumer/block/blk-core.c:1734)
kern :warn : [ 100.379312] blk_mq_submit_bio (kbuild/src/consumer/arch/x86/include/asm/jump_label.h:19 kbuild/src/consumer/include/linux/jump_label.h:200 kbuild/src/consumer/include/trace/events/block.h:356 kbuild/src/consumer/block/blk-mq.c:2260)
kern :warn : [ 100.384521] submit_bio_noacct (kbuild/src/consumer/block/blk-core.c:919 kbuild/src/consumer/block/blk-core.c:968 kbuild/src/consumer/block/blk-core.c:1047)
kern :warn : [ 100.389722] submit_bio_wait (kbuild/src/consumer/block/bio.c:1164)
kern :warn : [ 100.394597] blkdev_issue_discard (kbuild/src/consumer/block/blk-lib.c:145)
kern :warn : [ 100.399964] blk_ioctl_discard (kbuild/src/consumer/block/ioctl.c:141)
kern :warn : [ 100.405090] blkdev_common_ioctl (kbuild/src/consumer/block/ioctl.c:468)
kern :warn : [ 100.410425] blkdev_ioctl (kbuild/src/consumer/block/ioctl.c:579)
kern :warn : [ 100.415175] block_ioctl (kbuild/src/consumer/fs/block_dev.c:1655)
kern :warn : [ 100.419642] __x64_sys_ioctl (kbuild/src/consumer/fs/ioctl.c:52 kbuild/src/consumer/fs/ioctl.c:1069 kbuild/src/consumer/fs/ioctl.c:1055 kbuild/src/consumer/fs/ioctl.c:1055)
kern :warn : [ 100.424405] do_syscall_64 (kbuild/src/consumer/arch/x86/entry/common.c:47)
kern :warn : [ 100.429016] entry_SYSCALL_64_after_hwframe (kbuild/src/consumer/arch/x86/entry/entry_64.S:112)
kern :warn : [ 100.435090] RIP: 0033:0x7f2157812427
kern :warn : [ 100.439661] Code: 00 00 90 48 8b 05 69 aa 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 39 aa 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 00 add %al,(%rax)
2: 90 nop
3: 48 8b 05 69 aa 0c 00 mov 0xcaa69(%rip),%rax # 0xcaa73
a: 64 c7 00 26 00 00 00 movl $0x26,%fs:(%rax)
11: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax
18: c3 retq
19: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
20: 00 00 00
23: b8 10 00 00 00 mov $0x10,%eax
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 39 aa 0c 00 mov 0xcaa39(%rip),%rcx # 0xcaa73
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W
Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 39 aa 0c 00 mov 0xcaa39(%rip),%rcx # 0xcaa49
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 100.460608] RSP: 002b:00007ffe241c15b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
kern :warn : [ 100.469262] RAX: ffffffffffffffda RBX: 00007ffe241c16e0 RCX: 00007f2157812427
kern :warn : [ 100.477447] RDX: 00007ffe241c15c0 RSI: 0000000000001277 RDI: 0000000000000004
kern :warn : [ 100.485637] RBP: 0000557074df39d0 R08: 0000000000000004 R09: 0000000000000000
kern :warn : [ 100.493851] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000002800
kern :warn : [ 100.502067] R13: 0000557074df39d0 R14: 0000000000000000 R15: 0000000000000000
kern :warn : [ 100.510250] ---[ end trace 3c43a36e40e0cc9b ]---
kern :warn : [ 100.515932] ------------[ cut here ]------------
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
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
bin/lkp run generated-yaml-file
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation
Thanks,
Oliver Sang
On 6/11/21 12:04 AM, kernel test robot wrote:
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
In the dmesg output I found the following:
kern :warn : [ 100.174333] WARNING: CPU: 0 PID: 1055 at
block/mq-deadline-main.c:714 dd_insert_requests+0x1b5/0x300
kern :warn : [ 100.521569] WARNING: CPU: 0 PID: 1055 at
block/mq-deadline-main.c:474 dd_dispatch_request+0x280/0x380
So these warnings are triggered by:
#if defined(CONFIG_BLK_CGROUP)
WARN_ON_ONCE(true);
#endif
and in both call stacks I found the following: blkdev_issue_discard(). I
will take a closer look.
Bart.