FYI, we noticed the following commit (built with gcc-7):
commit: b0f464c9c862c0c912ac3fe1edf8a157517157d0 ("sched: Add task_struct pointer to
sched_class::set_curr_task")
https://github.com/digitalocean/linux-coresched coresched
in testcase: locktorture
with following parameters:
runtime: 300s
test: cpuhotplug
test-description: This torture test consists of creating a number of kernel threads which
acquire the lock and hold it for specific amount of time, thus simulating different
critical region behaviors.
test-url:
https://www.kernel.org/doc/Documentation/locking/locktorture.txt
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):
+------------------------------------------------------+--------+--------+
| | error: | error: |
+------------------------------------------------------+--------+--------+
| boot_successes | 5 | 10 |
| boot_failures | 1 | 16 |
| BUG:kernel_reboot-without-warning_in_test_stage | 1 | |
| WARNING:at_kernel/sched/sched.h:#pick_next_task_fair | 0 | 16 |
| RIP:pick_next_task_fair | 0 | 16 |
| WARNING:at_kernel/sched/sched.h:#sched_cpu_dying | 0 | 16 |
| RIP:sched_cpu_dying | 0 | 16 |
+------------------------------------------------------+--------+--------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp(a)intel.com>
[ 276.263169] WARNING: CPU: 0 PID: 11 at kernel/sched/sched.h:1719
pick_next_task_fair+0x754/0x780
[ 276.265858] Modules linked in: locktorture torture ppdev snd_pcm crct10dif_pclmul
crc32_pclmul crc32c_intel ghash_clmulni_intel snd_timer snd soundcore bochs_drm pcspkr
joydev ttm serio_raw drm_kms_helper drm ata_generic pata_acpi i2c_piix4 parport_pc floppy
parport qemu_fw_cfg
[ 276.272254] CPU: 0 PID: 11 Comm: migration/0 Not tainted 5.1.0-10881-gb0f464c #1
[ 276.274218] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 276.276415] RIP: 0010:pick_next_task_fair+0x754/0x780
[ 276.277773] Code: 48 0f af 85 18 01 00 00 48 83 c1 01 48 f7 f1 48 89 83 10 0a 00 00 e9
6a fa ff ff bf 02 00 00 00 e8 e1 33 ff ff e9 08 fa ff ff <0f> 0b e9 1d fb ff ff 80
3d e7 50 61 01 00 0f 85 30 fc ff ff e8 83
[ 276.282716] RSP: 0018:ffffbab3c0377d08 EFLAGS: 00010006
[ 276.284174] RAX: ffffffff90011dc0 RBX: ffffa0316be2aec0 RCX: ffffffff9064d0c0
[ 276.286075] RDX: ffffbab3c0377d90 RSI: 0000000000000001 RDI: ffffa0316be2aec0
[ 276.287968] RBP: ffffbab3c0377dd0 R08: 000000405290c768 R09: 0000000000000005
[ 276.289876] R10: ffffbab3c0377d48 R11: 000000000000138e R12: ffffffff9064d0c0
[ 276.291768] R13: ffffffff90011fc0 R14: ffffbab3c0377d90 R15: 0000000000000000
[ 276.293658] FS: 0000000000000000(0000) GS:ffffa0316be00000(0000)
knlGS:0000000000000000
[ 276.295803] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 276.297325] CR2: 00005608c15f8d60 CR3: 000000007efe0000 CR4: 00000000000006f0
[ 276.299238] Call Trace:
[ 276.301855] sched_cpu_dying+0x29a/0x3c0
[ 276.302925] ? sched_cpu_starting+0xd0/0xd0
[ 276.304034] cpuhp_invoke_callback+0x86/0x5d0
[ 276.305221] ? cpu_disable_common+0x1cf/0x1f0
[ 276.306375] take_cpu_down+0x60/0xa0
[ 276.307330] multi_cpu_stop+0x68/0xe0
[ 276.308308] ? cpu_stopper_thread+0x100/0x100
[ 276.309469] cpu_stopper_thread+0x94/0x100
[ 276.310591] ? smpboot_thread_fn+0x2f/0x1e0
[ 276.311725] ? smpboot_thread_fn+0x74/0x1e0
[ 276.312843] ? smpboot_thread_fn+0x14e/0x1e0
[ 276.313987] smpboot_thread_fn+0x149/0x1e0
[ 276.315077] ? sort_range+0x20/0x20
[ 276.316034] kthread+0x11e/0x140
[ 276.316903] ? kthread_park+0x90/0x90
[ 276.317889] ret_from_fork+0x35/0x40
[ 276.318851] ---[ end trace 4938a64101275eb2 ]---
To reproduce:
# build kernel
cd linux
cp config-5.1.0-10881-gb0f464c .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
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in
this email
Thanks,
lkp