lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 9 Feb 2018 21:52:18 +0800
From:   kernel test robot <fengguang.wu@...el.com>
To:     Trond Myklebust <trond.myklebust@...marydata.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>, lkp@...org
Subject: 90ea9f1b60: BUG:using__this_cpu_add()in_preemptible[#]code:kworker/u5


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

commit: 90ea9f1b60c679049619a79d9fc1557bc41c4973 ("Make the xprtiod workqueue unbounded.")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master

in testcase: fwq
with following parameters:

	nr_task: 100%
	samples: 100000ss
	iterations: 18x



on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 4G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+-----------------------------------------------------------+------------+------------+
|                                                           | 2275cde4cc | 90ea9f1b60 |
+-----------------------------------------------------------+------------+------------+
| boot_successes                                            | 6          | 4          |
| boot_failures                                             | 18         | 22         |
| invoked_oom-killer:gfp_mask=0x                            | 18         | 18         |
| Mem-Info                                                  | 18         | 18         |
| Out_of_memory:Kill_process                                | 18         | 18         |
| BUG:using__this_cpu_add()in_preemptible[#]code:kworker/u5 | 0          | 17         |
| RIP:__clear_user                                          | 0          | 1          |
+-----------------------------------------------------------+------------+------------+



[   31.962289] BUG: using __this_cpu_add() in preemptible [00000000] code: kworker/u5:0/31
[   31.967319] caller is xs_udp_data_receive_workfn+0x194/0x270
[   31.973166] CPU: 1 PID: 31 Comm: kworker/u5:0 Not tainted 4.15.0-rc8-00076-g90ea9f1 #2
[   31.976585] Workqueue: xprtiod xs_udp_data_receive_workfn
[   31.978951] Call Trace:
[   31.980060]  dump_stack+0x85/0xc1
[   31.981513]  check_preemption_disabled+0xce/0xe0
[   31.983556]  xs_udp_data_receive_workfn+0x194/0x270
[   31.985694]  process_one_work+0x318/0x620
[   31.987451]  worker_thread+0x20a/0x390
[   31.989108]  ? process_one_work+0x620/0x620
[   31.990941]  kthread+0x120/0x130
[   31.992368]  ? __kthread_bind_mask+0x60/0x60
[   31.994231]  ret_from_fork+0x24/0x30
[   31.997649] BUG: using __this_cpu_add() in preemptible [00000000] code: kworker/u5:0/31
[   32.001258] caller is xs_udp_data_receive_workfn+0x194/0x270
[   32.002451] CPU: 1 PID: 31 Comm: kworker/u5:0 Not tainted 4.15.0-rc8-00076-g90ea9f1 #2
[   32.004083] Workqueue: xprtiod xs_udp_data_receive_workfn
[   32.006377] Call Trace:
[   32.007480]  dump_stack+0x85/0xc1
[   32.008944]  check_preemption_disabled+0xce/0xe0
[   32.010961]  xs_udp_data_receive_workfn+0x194/0x270
[   32.013103]  process_one_work+0x318/0x620
[   32.014917]  worker_thread+0x20a/0x390
[   32.016557]  ? process_one_work+0x620/0x620
[   32.018390]  kthread+0x120/0x130
[   32.019830]  ? __kthread_bind_mask+0x60/0x60
[   32.021501]  ret_from_fork+0x24/0x30
[   32.079255] run-job /lkp/scheduled/vm-lkp-nex04-4G-4/fwq-100%-100000ss-18x-debian-x86_64-2016-08-31.cgz-90ea9f1b60c679049619a79d9fc1557bc41c4973-20180209-29266-1lryx4f-0.yaml
[   32.079267] 
[   32.150075] /usr/bin/curl -sSf http://inn:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/scheduled/vm-lkp-nex04-4G-4/fwq-100%25-100000ss-18x-debian-x86_64-2016-08-31.cgz-90ea9f1b60c679049619a79d9fc1557bc41c4973-20180209-29266-1lryx4f-0.yaml&job_state=running -o /dev/null
[   32.150087] 
[   32.368198] skip microcode check for virtual machine
[   32.368209] 
[   33.419647] 2018-02-09 21:32:40 ./t_fwq -n 100000 -w 18 -t 2
[   33.419657] 

Elapsed time: 40

#!/bin/bash

# To reproduce,
# 1) save job-script and this script (both are attached in 0day report email)
# 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH

kernel=$1

initrds=(
	/osimage/debian/debian-x86_64-2016-08-31.cgz
	/lkp/lkp/lkp-x86_64.cgz
	/osimage/deps/debian-x86_64-2016-08-31.cgz/lkp_2017-12-14.cgz
	/osimage/deps/debian-x86_64-2016-08-31.cgz/rsync-rootfs_2016-11-15.cgz
	/osimage/deps/debian-x86_64-2016-08-31.cgz/run-ipconfig_2016-11-15.cgz
	/osimage/pkg/debian-x86_64-2016-08-31.cgz/fwq-x86_64-fb459a1_2017-08-19.cgz
)

HTTP_PREFIX=https://github.com/0day-ci/lkp-qemu/raw/master
wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}"

{
	cat "${initrds[@]//*\//}"
	[[ $INSTALL_MOD_PATH ]] && (
		cd "$INSTALL_MOD_PATH"
		find lib | cpio -o -H newc --quiet | gzip
	)
	echo  job-script | cpio -o -H newc --quiet | gzip
} > initrd.img

qemu-img create -f qcow2 disk-vm-lkp-nex04-4G-4-0 256G
qemu-img create -f qcow2 disk-vm-lkp-nex04-4G-4-1 256G

kvm=(
	qemu-system-x86_64
	-enable-kvm
	-cpu host
	-kernel $kernel
	-initrd initrd.img
	-m 4096
	-smp 2
	-device e1000,netdev=net0
	-netdev user,id=net0,hostfwd=tcp::23233-:22
	-boot order=nc
	-no-reboot
	-watchdog i6300esb
	-watchdog-action debug
	-rtc base=localtime
	-drive file=disk-vm-lkp-nex04-4G-4-0,media=disk,if=virtio
	-drive file=disk-vm-lkp-nex04-4G-4-1,media=disk,if=virtio
	-serial stdio
	-display none
	-monitor null
)

append=(
	ip=::::vm-lkp-nex04-4G-4::dhcp
	root=/dev/ram0
	user=lkp
	job=/job-script
	ARCH=x86_64
	kconfig=x86_64-randconfig-b0-02091144
	branch=linux-next/master
	commit=90ea9f1b60c679049619a79d9fc1557bc41c4973
	BOOT_IMAGE=/pkg/linux/x86_64-randconfig-b0-02091144/gcc-7/90ea9f1b60c679049619a79d9fc1557bc41c4973/vmlinuz-4.15.0-rc8-00076-g90ea9f1
	max_uptime=3600
	RESULT_ROOT=/result/fwq/100%-100000ss-18x/vm-lkp-nex04-4G/debian-x86_64-2016-08-31.cgz/x86_64-randconfig-b0-02091144/gcc-7/90ea9f1b60c679049619a79d9fc1557bc41c4973/0
	result_service=tmpfs
	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


To reproduce:

        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,
lkp

View attachment "config-4.15.0-rc8-00076-g90ea9f1" of type "text/plain" (120529 bytes)

View attachment "job-script" of type "text/plain" (3971 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (17488 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ