2022-03-23 18:36:14

by kernel test robot

[permalink] [raw]
Subject: [block] 0a9a25ca78: BUG:sleeping_function_called_from_invalid_context_at_block/blk-sysfs.c



Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: 0a9a25ca78437b39e691bcc3dc8240455b803d8d ("block: let blkcg_gq grab request queue's refcnt")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

in testcase: xfstests
version: xfstests-x86_64-1de1db8-1_20220217
with following parameters:

disk: 4HDD
fs: f2fs
test: generic-group-01
ucode: 0x21

test-description: xfstests is a regression test suite for xfs and other files ystems.
test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git


on test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz with 16G 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]>


[ 292.171092][ C6] BUG: sleeping function called from invalid context at block/blk-sysfs.c:767
[ 292.171281][ C6] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/6
[ 292.171426][ C6] preempt_count: 101, expected: 0
[ 292.171512][ C6] CPU: 6 PID: 0 Comm: swapper/6 Not tainted 5.17.0-rc2-00126-g0a9a25ca7843 #1
[ 292.171656][ C6] Hardware name: /DZ77BH-55K, BIOS BHZ7710H.86A.0097.2012.1228.1346 12/28/2012
[ 292.171802][ C6] Call Trace:
[ 292.171861][ C6] <IRQ>
[ 292.172013][ C6] dump_stack_lvl (lib/dump_stack.c:107)
[ 292.172121][ C6] __might_resched.cold (kernel/sched/core.c:9574 kernel/sched/core.c:9527)
[ 292.172212][ C6] blk_release_queue (block/blk-sysfs.c:767)
[ 292.172297][ C6] kobject_release (lib/kobject.c:709 lib/kobject.c:736)
[ 292.172381][ C6] blkg_free+0xe6/0x1c0
[ 292.172465][ C6] rcu_do_batch (arch/x86/include/asm/preempt.h:27 kernel/rcu/tree.c:2534)
[ 292.172545][ C6] ? rcu_iw_handler (kernel/rcu/tree.c:2466)
[ 292.172629][ C6] ? __note_gp_changes (kernel/rcu/tree.c:1642)
[ 292.172717][ C6] rcu_core (kernel/rcu/tree.c:2780)
[ 292.172791][ C6] __do_softirq (arch/x86/include/asm/jump_label.h:27 include/linux/jump_label.h:212 include/trace/events/irq.h:142 kernel/softirq.c:559)
[ 292.172871][ C6] irq_exit_rcu (kernel/softirq.c:432 kernel/softirq.c:637 kernel/softirq.c:649)
[ 292.172949][ C6] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1097 (discriminator 14))
[ 292.173057][ C6] </IRQ>
[ 292.173120][ C6] <TASK>
[ 292.173173][ C6] asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
[ 292.173274][ C6] RIP: 0010:cpuidle_enter_state (drivers/cpuidle/cpuidle.c:259)
[ 292.173544][ C6] Code: 89 c6 0f 1f 44 00 00 31 ff e8 7d 14 60 fe 80 3c 24 00 74 12 9c 58 f6 c4 02 0f 85 27 07 00 00 31 ff e8 65 30 75 fe fb 45 85 ed <0f> 88 97 03 00 00 49 63 ed 48 83 fd 09 0f 87 cf 08 00 00 48 8d 44
All code
========
0: 89 c6 mov %eax,%esi
2: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
7: 31 ff xor %edi,%edi
9: e8 7d 14 60 fe callq 0xfffffffffe60148b
e: 80 3c 24 00 cmpb $0x0,(%rsp)
12: 74 12 je 0x26
14: 9c pushfq
15: 58 pop %rax
16: f6 c4 02 test $0x2,%ah
19: 0f 85 27 07 00 00 jne 0x746
1f: 31 ff xor %edi,%edi
21: e8 65 30 75 fe callq 0xfffffffffe75308b
26: fb sti
27: 45 85 ed test %r13d,%r13d
2a:* 0f 88 97 03 00 00 js 0x3c7 <-- trapping instruction
30: 49 63 ed movslq %r13d,%rbp
33: 48 83 fd 09 cmp $0x9,%rbp
37: 0f 87 cf 08 00 00 ja 0x90c
3d: 48 rex.W
3e: 8d .byte 0x8d
3f: 44 rex.R

Code starting with the faulting instruction
===========================================
0: 0f 88 97 03 00 00 js 0x39d
6: 49 63 ed movslq %r13d,%rbp
9: 48 83 fd 09 cmp $0x9,%rbp
d: 0f 87 cf 08 00 00 ja 0x8e2
13: 48 rex.W
14: 8d .byte 0x8d
15: 44 rex.R
[ 292.173853][ C6] RSP: 0018:ffffc9000016fd80 EFLAGS: 00000202
[ 292.173956][ C6] RAX: dffffc0000000000 RBX: ffffe8ffffd00000 RCX: 000000000000001f
[ 292.174106][ C6] RDX: 1ffff1106bf270e1 RSI: 0000000024a78e91 RDI: ffff88835f938708
[ 292.174236][ C6] RBP: 0000000000000004 R08: 0001b0d344d18970 R09: ffffed106bf27136
[ 292.174366][ C6] R10: ffff88835f9389ab R11: ffffed106bf27135 R12: ffffffff84d31820
[ 292.174495][ C6] R13: 0000000000000004 R14: 0000004406c0581a R15: ffffffff84d319d8
[ 292.174626][ C6] ? menu_reflect (drivers/cpuidle/governors/menu.c:267)
[ 292.174708][ C6] cpuidle_enter (drivers/cpuidle/cpuidle.c:353)
[ 292.174785][ C6] do_idle (kernel/sched/idle.c:158 kernel/sched/idle.c:239 kernel/sched/idle.c:306)
[ 292.174861][ C6] ? arch_cpu_idle_exit+0xc0/0xc0
[ 292.174950][ C6] cpu_startup_entry (kernel/sched/idle.c:402 (discriminator 1))
[ 292.175045][ C6] start_secondary (arch/x86/kernel/smpboot.c:224)
[ 292.175141][ C6] ? set_cpu_sibling_map (arch/x86/kernel/smpboot.c:224)
[ 292.175234][ C6] secondary_startup_64_no_verify (arch/x86/kernel/head_64.S:300)
[ 292.175335][ C6] </TASK>
[ 295.087930][ T409] generic/034 _check_dmesg: something found in dmesg (see /lkp/benchmarks/xfstests/results//generic/034.dmesg)
[ 295.087942][ T409]
[ 295.095812][ T409]
[ 295.095822][ T409]
[ 295.147346][ T1641] run fstests generic/035 at 2022-03-22 18:53:05
[ 295.664315][T21252] F2FS-fs (sda1): Found nat_bits in checkpoint
[ 296.183600][T21252] F2FS-fs (sda1): Mounted with checkpoint version = 45cf39af
[ 299.767202][T21337] F2FS-fs (sda1): Found nat_bits in checkpoint
[ 300.269931][T21337] F2FS-fs (sda1): Mounted with checkpoint version = 45cf39b2
[ 300.323177][ T409] generic/035 5s
[ 300.323201][ T409]
[ 300.371697][ T1641] run fstests generic/036 at 2022-03-22 18:53:10
[ 314.523462][T21631] F2FS-fs (sda1): Found nat_bits in checkpoint
[ 315.025867][T21631] F2FS-fs (sda1): Mounted with checkpoint version = 45cf39b5
[ 315.052392][ T409] generic/036 15s
[ 315.052403][ T409]
[ 315.102108][ T1641] run fstests generic/037 at 2022-03-22 18:53:25
[ 318.333987][T21854] F2FS-fs (sda4): Found nat_bits in checkpoint
[ 318.848347][T21854] F2FS-fs (sda4): Mounted with checkpoint version = 7c103a3d
[ 332.043312][T31828] F2FS-fs (sda4): Found nat_bits in checkpoint
[ 332.566295][T31828] F2FS-fs (sda4): Mounted with checkpoint version = 7c103a40
[ 332.740596][ T409] generic/037 18s
[ 332.740608][ T409]
[ 332.788906][ T1641] run fstests generic/038 at 2022-03-22 18:53:43
[ 333.223359][T32009] F2FS-fs (sda1): Found nat_bits in checkpoint
[ 333.739912][T32009] F2FS-fs (sda1): Mounted with checkpoint version = 45cf39b8
[ 336.589888][T32076] F2FS-fs (sda4): Found nat_bits in checkpoint
[ 337.104078][T32076] F2FS-fs (sda4): Mounted with checkpoint version = 75415b0f
[ 337.139560][ T409] generic/038 [not run] FITRIM not supported on /fs/scratch
[ 337.139572][ T409]
[ 337.324479][ T1641] run fstests generic/039 at 2022-03-22 18:53:47
[ 340.623627][T32328] F2FS-fs (dm-0): Found nat_bits in checkpoint
[ 341.126460][T32328] F2FS-fs (dm-0): Mounted with checkpoint version = 2d574653
[ 341.855693][T32354] F2FS-fs (dm-0): Disable nat_bits due to incorrect cp_ver (2746591535982659157, 9565639995773371987)
[ 341.929559][T32354] F2FS-fs (dm-0): Mounted with checkpoint version = 2d574655


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://01.org/lkp



Attachments:
(No filename) (7.94 kB)
config-5.17.0-rc2-00126-g0a9a25ca7843 (168.18 kB)
job-script (5.71 kB)
dmesg.xz (6.69 kB)
xfstests (2.39 kB)
job.yaml (4.86 kB)
reproduce (943.00 B)
Download all attachments