FYI, we noticed the following commit (built with gcc-7):
commit: ccf552bfc4651cc06a2fd4cd8033e5f13a250d11 ("sched/core: Prevent race condition
between cpuset and __sched_setscheduler()")
https://github.com/jlelli/linux.git fixes/deadline/root-domain-account-v8
in testcase: boot
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+-----------------------------------------------------------------------------------+------------+------------+
| |
65cb6e0b28 | ccf552bfc4 |
+-----------------------------------------------------------------------------------+------------+------------+
| boot_successes | 8
| 0 |
| boot_failures | 14
| 38 |
| BUG:kernel_reboot-without-warning_in_test_stage | 14
| |
| BUG:sleeping_function_called_from_invalid_context_at_include/linux/percpu-rwsem.h | 0
| 38 |
+-----------------------------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
[ 4.637371] BUG: sleeping function called from invalid context at
include/linux/percpu-rwsem.h:34
[ 4.639887] in_atomic(): 1, irqs_disabled(): 1, pid: 1, name: swapper/0
[ 4.639887] 1 lock held by swapper/0/1:
[ 4.639887] #0: (____ptrval____) (rcu_node_0){....}, at:
rcu_spawn_gp_kthread+0x323/0x5f8
[ 4.639887] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc3-00084-gccf552b #1
[ 4.639887] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 4.639887] Call Trace:
[ 4.639887] dump_stack+0x64/0x87
[ 4.639887] ___might_sleep+0x164/0x17d
[ 4.639887] percpu_down_read+0x14/0xc0
[ 4.639887] __sched_setscheduler+0x38b/0x922
[ 4.639887] _sched_setscheduler+0x73/0x75
[ 4.639887] rcu_spawn_gp_kthread+0x397/0x5f8
[ 4.639887] ? rcu_init+0x14b7/0x14b7
[ 4.639887] do_one_initcall+0x163/0x3a5
[ 4.639887] ? _raw_write_unlock+0x30/0x5c
[ 4.639887] ? proc_register+0x16e/0x184
[ 4.639887] ? proc_create_seq_private+0x61/0x67
[ 4.639887] kernel_init_freeable+0x118/0x3b1
[ 4.639887] ? rest_init+0xf4/0xf4
[ 4.639887] kernel_init+0xa/0x160
[ 4.639887] ret_from_fork+0x35/0x40
[ 4.680077] smp: Bringing up secondary CPUs ...
[ 4.732217] x86: Booting SMP configuration:
[ 4.733318] .... node #0, CPUs: #1
[ 0.568677] kvm-clock: cpu 1, msr 38d3041, secondary cpu clock
[ 0.568677] masked ExtINT on CPU#1
[ 4.764393] KVM setup async PF for cpu 1
[ 4.766554] kvm-stealtime: cpu 1, msr 7a518080
[ 4.780405] smp: Brought up 1 node, 2 CPUs
[ 4.784126] smpboot: Max logical packages: 2
[ 4.786724] smpboot: Total of 2 processors activated (9047.64 BogoMIPS)
[ 4.803667] node 0 initialised, 435943 pages in 4ms
[ 4.818690] devtmpfs: initialized
[ 4.826294] x86/mm: Memory block size: 128MB
[ 4.843221] random: get_random_u32 called from bucket_table_alloc+0x158/0x17e with
crng_init=0
[ 4.880565] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns:
6370867519511994 ns
[ 4.899607] futex hash table entries: 512 (order: 4, 65536 bytes)
[ 4.916783] pinctrl core: initialized pinctrl subsystem
[ 4.936778] NET: Registered protocol family 16
[ 4.970448] cpuidle: using governor ladder
[ 4.977129] cpuidle: using governor menu
[ 4.997102] ACPI: bus type PCI registered
[ 5.005297] PCI: Using configuration type 1 for base access
[ 5.187196] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 5.287359] cryptd: max_cpu_qlen set to 1000
[ 5.584811] ACPI: Added _OSI(Module Device)
[ 5.586818] ACPI: Added _OSI(Processor Device)
[ 5.590013] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 5.593575] ACPI: Added _OSI(Processor Aggregator Device)
[ 5.596750] ACPI: Added _OSI(Linux-Dell-Video)
[ 5.599991] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[ 5.603577] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[ 5.642119] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 5.694974] ACPI: Interpreter enabled
[ 5.704163] ACPI: (supports S0 S3 S4 S5)
[ 5.710151] ACPI: Using IOAPIC for interrupt routing
[ 5.720669] PCI: Using host bridge windows from ACPI; if necessary, use
"pci=nocrs" and report a bug
[ 5.752189] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 5.902965] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 5.913605] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments HPX-Type3]
[ 5.931118] acpi PNP0A03:00: fail to add MMCONFIG information, can't access
extended PCI configuration space under this bridge.
[ 5.967167] PCI host bridge to bus 0000:00
[ 5.976776] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 5.986778] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 6.000112] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 6.016716] pci_bus 0000:00: root bus resource [mem 0x80000000-0xfebfffff window]
[ 6.026719] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
[ 6.043445] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 6.060730] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[ 6.080531] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[ 6.105307] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
[ 6.163444] pci 0000:00:01.1: reg 0x20: [io 0xc0c0-0xc0cf]
[ 6.203684] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 6.233998] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 6.250086] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 6.266779] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 6.289410] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[ 6.309240] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 6.333668] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 6.347240] pci 0000:00:01.3: quirk_piix4_acpi+0x0/0x144 took 39062 usecs
[ 6.366496] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
[ 6.400110] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
[ 6.443511] pci 0000:00:02.0: reg 0x18: [mem 0xfebf0000-0xfebf0fff]
[ 6.516783] pci 0000:00:02.0: reg 0x30: [mem 0xfebe0000-0xfebeffff pref]
[ 6.536880] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000
[ 6.566744] pci 0000:00:03.0: reg 0x10: [mem 0xfebc0000-0xfebdffff]
[ 6.596687] pci 0000:00:03.0: reg 0x14: [io 0xc000-0xc03f]
[ 6.690055] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
[ 6.723644] pci 0000:00:04.0: [1af4:1001] type 00 class 0x010000
[ 6.817324] pci 0000:00:04.0: reg 0x10: [io 0xc040-0xc07f]
[ 6.860049] pci 0000:00:04.0: reg 0x14: [mem 0xfebf1000-0xfebf1fff]
[ 6.976744] pci 0000:00:04.0: reg 0x20: [mem 0xfe000000-0xfe003fff 64bit pref]
[ 7.030560] pci 0000:00:05.0: [1af4:1001] type 00 class 0x010000
[ 7.066845] pci 0000:00:05.0: reg 0x10: [io 0xc080-0xc0bf]
[ 7.113352] pci 0000:00:05.0: reg 0x14: [mem 0xfebf2000-0xfebf2fff]
[ 7.193480] pci 0000:00:05.0: reg 0x20: [mem 0xfe004000-0xfe007fff 64bit pref]
[ 7.253717] pci 0000:00:06.0: [8086:25ab] type 00 class 0x088000
[ 7.286657] pci 0000:00:06.0: reg 0x10: [mem 0xfebf3000-0xfebf300f]
[ 7.374493] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 7.390376] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
To reproduce:
# build kernel
cd linux
cp config-5.2.0-rc3-00084-gccf552b .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks,
Rong Chen