FYI, we noticed the following commit (built with gcc-7):
commit: b7d48fb89aa672ee3acaac2864a3bfda81606ef1 ("sched: Add task_struct pointer to
sched_class::set_curr_task")
https://kernel.googlesource.com/pub/scm/linux/kernel/git/peterz/queue.git sched/core
in testcase: rcutorture
with following parameters:
runtime: 300s
test: cpuhotplug
torture_type: srcud
test-description: rcutorture is rcutorture kernel module load/unload test.
test-url:
https://www.kernel.org/doc/Documentation/RCU/torture.txt
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 4G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+------------------------------------------------------+------------+------------+
| | 0f922d0d29 | b7d48fb89a |
+------------------------------------------------------+------------+------------+
| boot_successes | 0 | 0 |
| boot_failures | 8 | 8 |
| BUG:kernel_reboot-without-warning_in_test_stage | 8 | |
| WARNING:at_kernel/sched/sched.h:#pick_next_task_fair | 0 | 8 |
| RIP:pick_next_task_fair | 0 | 8 |
| WARNING:at_kernel/sched/sched.h:#sched_cpu_dying | 0 | 8 |
| RIP:sched_cpu_dying | 0 | 8 |
+------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
[ 38.967800] WARNING: CPU: 1 PID: 15 at kernel/sched/sched.h:1754
pick_next_task_fair+0x758/0x780
[ 38.971162] Modules linked in: rcutorture torture intel_rapl_msr intel_rapl_common
crct10dif_pclmul crc32_pclmul crc32c_intel bochs_drm ghash_clmulni_intel drm_vram_helper
ppdev ttm snd_pcm snd_timer snd drm_kms_helper soundcore pcspkr drm joydev serio_raw
parport_pc floppy parport qemu_fw_cfg ata_generic i2c_piix4 pata_acpi
[ 38.978871] CPU: 1 PID: 15 Comm: migration/1 Not tainted
5.3.0-rc1-00087-gb7d48fb89aa672 #1
[ 38.980246] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 38.981631] RIP: 0010:pick_next_task_fair+0x758/0x780
[ 38.982468] Code: 48 0f af 85 18 01 00 00 48 83 c1 01 48 f7 f1 48 89 83 10 0a 00 00 e9
66 fa ff ff bf 02 00 00 00 e8 8d 3a ff ff e9 04 fa ff ff <0f> 0b e9 19 fb ff ff 80
3d 65 5e 61 01 00 0f 85 30 fc ff ff e8 bf
[ 38.985513] RSP: 0000:ffffb98c8008bcf8 EFLAGS: 00010002
[ 38.986376] RAX: ffffffffa2011e00 RBX: ffff8b7ffbb2b3c0 RCX: ffffffffa264d540
[ 38.987544] RDX: ffffb98c8008bd80 RSI: 0000000000000001 RDI: ffff8b7ffbb2b3c0
[ 38.988728] RBP: ffffb98c8008bdc0 R08: 0000000912a90774 R09: 0000000000000004
[ 38.989913] R10: ffffb98c8008bd38 R11: 0000000000000003 R12: ffff8b7ffbb2b3c0
[ 38.991079] R13: ffffffffa264d540 R14: ffffb98c8008bd80 R15: 0000000000000000
[ 38.992251] FS: 0000000000000000(0000) GS:ffff8b7ffbb00000(0000)
knlGS:0000000000000000
[ 38.993579] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 38.994522] CR2: 000000005788d734 CR3: 000000007e104000 CR4: 00000000000406e0
[ 38.995689] Call Trace:
[ 38.996124] ? sched_cpu_starting+0xf0/0xf0
[ 38.996823] sched_cpu_dying+0x2a9/0x430
[ 38.997484] ? sched_cpu_starting+0xf0/0xf0
[ 38.998231] cpuhp_invoke_callback+0x86/0x5d0
[ 38.998957] ? cpu_disable_common+0x217/0x230
[ 38.999684] take_cpu_down+0x60/0xb0
[ 39.000283] multi_cpu_stop+0x6b/0x100
[ 39.000909] ? stop_machine_yield+0x10/0x10
[ 39.001612] cpu_stopper_thread+0x94/0x100
[ 39.002293] ? smpboot_thread_fn+0x2f/0x1e0
[ 39.002988] ? smpboot_thread_fn+0x74/0x1e0
[ 39.003683] ? smpboot_thread_fn+0x14e/0x1e0
[ 39.004393] smpboot_thread_fn+0x149/0x1e0
[ 39.005073] ? sort_range+0x20/0x20
[ 39.005662] kthread+0x11e/0x140
[ 39.006203] ? kthread_park+0xa0/0xa0
[ 39.006814] ret_from_fork+0x35/0x40
[ 39.007411] ---[ end trace baf171d5e73cc4a2 ]---
To reproduce:
# build kernel
cd linux
cp config-5.3.0-rc1-00087-gb7d48fb89aa672 .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig prepare modules_prepare 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