Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: b77e315a96445e5f19a83546c73d2abbcedfa5db ("io_uring: avoid ring quiesce while
registering/unregistering eventfd")
linux-devel devel-catchup-20220206-211654
in testcase: trinity
version: trinity-static-x86_64-x86_64-1c734c75-1_2020-01-06
with following parameters:
runtime: 300s
test-description: Trinity is a linux system call fuzz tester.
test-url:
http://codemonkey.org.uk/projects/trinity/
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+------------------------------------------------------------+------------+------------+
| | 054f8098d9 | b77e315a96 |
+------------------------------------------------------------+------------+------------+
| WARNING:suspicious_RCU_usage | 0 | 12 |
| fs/io_uring.c:#suspicious_rcu_dereference_protected()usage | 0 | 12 |
+------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <oliver.sang(a)intel.com>
[ 442.754082][ T7] WARNING: suspicious RCU usage
[ 442.755607][ T7] 5.17.0-rc2-00169-gb77e315a9644 #1 Not tainted
[ 442.757434][ T7] -----------------------------
[ 442.758944][ T7] fs/io_uring.c:9421 suspicious rcu_dereference_protected() usage!
[ 442.761272][ T7]
[ 442.761272][ T7] other info that might help us debug this:
[ 442.761272][ T7]
[ 442.764360][ T7]
[ 442.764360][ T7] rcu_scheduler_active = 2, debug_locks = 1
[ 442.766863][ T7] 2 locks held by kworker/u2:1/7:
[ 442.768373][ T7] #0: ffff888100048f30 ((wq_completion)events_unbound){+.+.}-{0:0}, at:
process_one_work (arch/x86/include/asm/atomic64_64.h:34
include/linux/atomic/atomic-long.h:41 include/linux/atomic/atomic-instrumented.h:1280
kernel/workqueue.c:631 kernel/workqueue.c:658 kernel/workqueue.c:2278)
[ 442.771699][ T7] #1: ffffc90000043e50
((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_one_work
(arch/x86/include/asm/atomic64_64.h:34 include/linux/atomic/atomic-long.h:41
include/linux/atomic/atomic-instrumented.h:1280 kernel/workqueue.c:631
kernel/workqueue.c:658 kernel/workqueue.c:2278)
[ 442.775227][ T7]
[ 442.775227][ T7] stack backtrace:
[ 442.777250][ T7] CPU: 0 PID: 7 Comm: kworker/u2:1 Not tainted
5.17.0-rc2-00169-gb77e315a9644 #1
[ 442.780127][ T7] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.12.0-1 04/01/2014
[ 442.783010][ T7] Workqueue: events_unbound io_ring_exit_work
[ 442.784990][ T7] Call Trace:
[ 442.786120][ T7] <TASK>
[ 442.787197][ T7] dump_stack_lvl (lib/dump_stack.c:108)
[ 442.788669][ T7] dump_stack (lib/dump_stack.c:114)
[ 442.790028][ T7] lockdep_rcu_suspicious (kernel/locking/lockdep.c:6564)
[ 442.791808][ T7] io_eventfd_unregister (fs/io_uring.c:9421 (discriminator 5))
[ 442.793402][ T7] io_ring_ctx_free (fs/io_uring.c:9437 fs/io_uring.c:9492)
[ 442.794954][ T7] io_ring_exit_work (fs/io_uring.c:9669)
[ 442.796474][ T7] ? io_uring_del_tctx_node (fs/io_uring.c:9581)
[ 442.798191][ T7] process_one_work (arch/x86/include/asm/jump_label.h:27
include/linux/jump_label.h:212 include/trace/events/workqueue.h:108
kernel/workqueue.c:2312)
[ 442.799764][ T7] ? process_one_work (kernel/workqueue.c:2397)
[ 442.801266][ T7] worker_thread (include/linux/list.h:292 kernel/workqueue.c:2455)
[ 442.802712][ T7] ? process_one_work (kernel/workqueue.c:2397)
[ 442.804217][ T7] kthread (kernel/kthread.c:377)
[ 442.805543][ T7] ? kthread_complete_and_exit (kernel/kthread.c:332)
[ 442.807280][ T7] ret_from_fork (arch/x86/entry/entry_64.S:301)
[ 442.808639][ T7] </TASK>
[ 459.159532][ T1106] futex_wake_op: trinity-c0 tries to shift op by -1; fix this
program
[ 472.545875][ T1240] futex_wake_op: trinity-c2 tries to shift op by -1; fix this
program
[ 473.540073][ T1106] =======================================================
[ 473.540073][ T1106] WARNING: The mand mount option has been deprecated and
[ 473.540073][ T1106] and is ignored by this kernel. Remove the mand
[ 473.540073][ T1106] option from the mount to silence this warning.
[ 473.540073][ T1106] =======================================================
[ 477.899160][ T1273] futex_wake_op: trinity-c0 tries to shift op by 1216; fix this
program
[ 481.172151][ T1305] futex_wake_op: trinity-c1 tries to shift op by 32; fix this
program
[ 482.235708][ T1351] futex_wake_op: trinity-c2 tries to shift op by -1131; fix this
program
[ 511.130182][ T1576] trinity-c2 (1576): attempted to duplicate a private mapping with
mremap. This is not supported.
[ 517.575042][ T1637] futex_wake_op: trinity-c0 tries to shift op by 290; fix this
program
[ 529.915814][ T1688] Invalid ELF header len 1
[ 553.563843][ T2070] mmap: trinity-c0 (2070): VmData 15699968 exceed data ulimit 1.
Update limits or use boot option ignore_rlimit_data.
[ 604.346182][ T2590] futex_wake_op: trinity-c3 tries to shift op by -1; fix this
program
[ 636.036421][ T2929] Unable to find swap-space signature
[ 648.671070][ T3072] Unable to find swap-space signature
[ 648.763689][ T3072] futex_wake_op: trinity-c0 tries to shift op by -1; fix this
program
[ 657.578846][ T3225] Unable to find swap-space signature
[ 667.641713][ T3279] futex_wake_op: trinity-c1 tries to shift op by -2; fix this
program
[ 703.959704][ T3725] Unable to find swap-space signature
[ 721.396457][ T467] hwclock: can't open '/dev/misc/rtc': No such file or
directory
[ 721.694925][ T3999] Unable to find swap-space signature
[ 723.832302][ T4055] Unable to find swap-space signature
[ 729.678335][ T436] sysrq: Emergency Sync
[ 729.680680][ T61] Emergency Sync complete
[ 729.682262][ T436] sysrq: Resetting
Kboot worker: lkp-worker34
Elapsed time: 780
kvm=(
qemu-system-x86_64
-enable-kvm
-cpu SandyBridge
-kernel $kernel
-initrd initrd-vm-snb-157.cgz
-m 16384
-smp 2
-device e1000,netdev=net0
-netdev user,id=net0,hostfwd=tcp::32032-:22
-boot order=nc
-no-reboot
-watchdog i6300esb
-watchdog-action debug
-rtc base=localtime
-serial stdio
-display none
-monitor null
)
append=(
ip=::::vm-snb-157::dhcp
root=/dev/ram0
RESULT_ROOT=/result/trinity/300s/vm-snb/yocto-x86_64-minimal-20190520.cgz/x86_64-randconfig-a002-20220131/gcc-9/b77e315a96445e5f19a83546c73d2abbcedfa5db/3
BOOT_IMAGE=/pkg/linux/x86_64-randconfig-a002-20220131/gcc-9/b77e315a96445e5f19a83546c73d2abbcedfa5db/vmlinuz-5.17.0-rc2-00169-gb77e315a9644
branch=axboe-block/for-next
job=/job-script
user=lkp
ARCH=x86_64
kconfig=x86_64-randconfig-a002-20220131
commit=b77e315a96445e5f19a83546c73d2abbcedfa5db
vmalloc=128M
initramfs_async=0
page_owner=on
max_uptime=2100
result_service=tmpfs
selinux=0
debug
apic=debug
sysrq_always_enabled
rcupdate.rcu_cpu_stall_timeout=100
net.ifnames=0
printk.devkmsg=on
panic=-1
softlockup_panic=1
nmi_watchdog=panic
oops=panic
load_ramdisk=2
prompt_ramdisk=0
drbd.minor_count=8
systemd.log_level=err
ignore_loglevel
console=tty0
earlyprintk=ttyS0,115200
console=ttyS0,115200
vga=normal
rw
rcuperf.shutdown=0
watchdog_thresh=240
)
"${kvm[@]}" -append "${append[*]}"
To reproduce:
# build kernel
cd linux
cp config-5.17.0-rc2-00169-gb77e315a9644 .config
make HOSTCC=gcc-9 CC=gcc-9 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage
modules
make HOSTCC=gcc-9 CC=gcc-9 ARCH=x86_64 INSTALL_MOD_PATH=<mod-install-dir>
modules_install
cd <mod-install-dir>
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached
in this email
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/lkp@lists.01.org Intel Corporation
Thanks,
Oliver Sang