Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: dce9cda69f013865602757be14a517609c83d066 ("[PATCH v2 10/13] sunrpc: add add sysfs directory per xprt under each xprt_switch")
url: https://github.com/0day-ci/linux/commits/Olga-Kornievskaia/create-sysfs-files-for-changing-IP-address/20210416-115341
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
in testcase: kernel-selftests
version: kernel-selftests-x86_64-cf9ae1bd-1_20210401
with following parameters:
group: bpf
ucode: 0xde
test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
on test machine: 4 threads Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz with 32G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>
kern :err : [ 41.883406] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:197
kern :err : [ 41.884103] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1111, name: mount.nfs
kern :warn : [ 41.884691] 1 lock held by mount.nfs/1111:
kern :warn : [ 41.885022] #0: ffff88887e2bdcd8 (&xps->xps_lock){+.+.}-{2:2}, at: xprt_switch_free (kbuild/src/consumer/include/linux/list.h:282 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:150 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:168)
kern :err : [ 41.885696] Preemption disabled at:
kern :err : [ 41.885699] 0x0
kern :warn : [ 41.886277] CPU: 1 PID: 1111 Comm: mount.nfs Not tainted 5.12.0-rc6-00064-gdce9cda69f01 #1
kern :warn : [ 41.886876] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 41.887616] Call Trace:
kern :warn : [ 41.887803] dump_stack (kbuild/src/consumer/lib/dump_stack.c:122)
kern :warn : [ 41.888061] ___might_sleep.cold (kbuild/src/consumer/kernel/sched/core.c:8329)
kern :warn : [ 41.888376] ? kobject_uevent_env (kbuild/src/consumer/include/linux/slab.h:554 kbuild/src/consumer/include/linux/slab.h:684 kbuild/src/consumer/lib/kobject_uevent.c:523)
kern :warn : [ 41.888694] kmem_cache_alloc_trace (kbuild/src/consumer/include/linux/kernel.h:96 kbuild/src/consumer/include/linux/sched/mm.h:197 kbuild/src/consumer/mm/slab.h:497 kbuild/src/consumer/mm/slub.c:2826 kbuild/src/consumer/mm/slub.c:2915 kbuild/src/consumer/mm/slub.c:2932)
kern :warn : [ 41.889035] kobject_uevent_env (kbuild/src/consumer/include/linux/slab.h:554 kbuild/src/consumer/include/linux/slab.h:684 kbuild/src/consumer/lib/kobject_uevent.c:523)
kern :warn : [ 41.889345] rpc_sysfs_xprt_switch_xprt_destroy (kbuild/src/consumer/net/sunrpc/sysfs.c:306)
kern :warn : [ 41.889744] xprt_switch_remove_xprt_locked (kbuild/src/consumer/net/sunrpc/xprtmultipath.c:71)
kern :warn : [ 41.890115] xprt_switch_free (kbuild/src/consumer/include/linux/spinlock.h:394 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:156 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:168)
kern :warn : [ 41.890399] rpc_new_client (kbuild/src/consumer/net/sunrpc/clnt.c:449)
kern :warn : [ 41.890691] rpc_create_xprt (kbuild/src/consumer/net/sunrpc/clnt.c:475)
kern :warn : [ 41.890981] ? rcu_read_lock_sched_held (kbuild/src/consumer/include/linux/lockdep.h:278 kbuild/src/consumer/kernel/rcu/update.c:125)
kern :warn : [ 41.891332] rpc_create (kbuild/src/consumer/net/sunrpc/clnt.c:596)
kern :warn : [ 41.891602] nfs_create_rpc_client (kbuild/src/consumer/fs/nfs/client.c:534)
kern :warn : [ 41.891938] nfs4_init_client (kbuild/src/consumer/fs/nfs/nfs4client.c:392) nfsv4
kern :warn : [ 41.892305] ? find_held_lock (kbuild/src/consumer/kernel/locking/lockdep.c:5003)
kern :warn : [ 41.892596] ? lock_release (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5532)
kern :warn : [ 41.892887] ? preempt_count_sub (kbuild/src/consumer/kernel/sched/core.c:4746 kbuild/src/consumer/kernel/sched/core.c:4743 kbuild/src/consumer/kernel/sched/core.c:4765)
kern :warn : [ 41.893192] ? _raw_spin_unlock (kbuild/src/consumer/arch/x86/include/asm/preempt.h:103 kbuild/src/consumer/include/linux/spinlock_api_smp.h:152 kbuild/src/consumer/kernel/locking/spinlock.c:183)
kern :warn : [ 41.893526] ? nfs_get_client (kbuild/src/consumer/fs/nfs/client.c:429)
kern :warn : [ 41.893832] ? lock_is_held_type (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5550)
kern :warn : [ 41.894151] nfs4_set_client (kbuild/src/consumer/fs/nfs/nfs4client.c:897) nfsv4
kern :warn : [ 41.894519] nfs4_create_server (kbuild/src/consumer/fs/nfs/nfs4client.c:1114 kbuild/src/consumer/fs/nfs/nfs4client.c:1162) nfsv4
kern :warn : [ 41.894907] nfs4_try_get_tree (kbuild/src/consumer/fs/nfs/nfs4super.c:226 (discriminator 3)) nfsv4
kern :warn : [ 41.895271] vfs_get_tree (kbuild/src/consumer/fs/super.c:1498)
kern :warn : [ 41.895536] path_mount (kbuild/src/consumer/fs/namespace.c:2903 kbuild/src/consumer/fs/namespace.c:3233)
kern :warn : [ 41.895806] do_mount (kbuild/src/consumer/fs/namespace.c:3246)
kern :warn : [ 41.896047] __x64_sys_mount (kbuild/src/consumer/fs/namespace.c:3456 kbuild/src/consumer/fs/namespace.c:3431 kbuild/src/consumer/fs/namespace.c:3431)
kern :warn : [ 41.896333] do_syscall_64 (kbuild/src/consumer/arch/x86/entry/common.c:46)
kern :warn : [ 41.896602] entry_SYSCALL_64_after_hwframe (kbuild/src/consumer/arch/x86/entry/entry_64.S:112)
kern :warn : [ 41.896980] RIP: 0033:0x7f9fbade6fea
kern :warn : [ 41.897251] Code: 48 8b 0d a9 0e 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 76 0e 0c 00 f7 d8 64 89 01 48
All code
========
0: 48 8b 0d a9 0e 0c 00 mov 0xc0ea9(%rip),%rcx # 0xc0eb0
7: f7 d8 neg %eax
9: 64 89 01 mov %eax,%fs:(%rcx)
c: 48 83 c8 ff or $0xffffffffffffffff,%rax
10: c3 retq
11: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
18: 00 00 00
1b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
20: 49 89 ca mov %rcx,%r10
23: b8 a5 00 00 00 mov $0xa5,%eax
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 76 0e 0c 00 mov 0xc0e76(%rip),%rcx # 0xc0eb0
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W
Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 76 0e 0c 00 mov 0xc0e76(%rip),%rcx # 0xc0e86
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 41.898589] RSP: 002b:00007ffc887b5ad8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
kern :warn : [ 41.899145] RAX: ffffffffffffffda RBX: 00007ffc887b5c30 RCX: 00007f9fbade6fea
kern :warn : [ 41.899663] RDX: 000055869073eb50 RSI: 000055869073eb70 RDI: 0000558690740880
kern :warn : [ 41.900182] RBP: 0000000000000000 R08: 0000558690741370 R09: 0000558690741960
kern :warn : [ 41.900699] R10: 0000000000000000 R11: 0000000000000206 R12: 00007ffc887b5c30
kern :warn : [ 41.901217] R13: 0000558690741160 R14: 0000000000000010 R15: 00007ffc887b5b40
kern :warn : [ 41.901895] =============================
kern :warn : [ 41.902201] [ BUG: Invalid wait context ]
kern :warn : [ 41.902505] 5.12.0-rc6-00064-gdce9cda69f01 #1 Tainted: G W
kern :warn : [ 41.903012] -----------------------------
kern :warn : [ 41.903315] mount.nfs/1111 is trying to lock:
kern :warn : [ 41.903647] ffffffff835a7e08 (uevent_sock_mutex){+.+.}-{3:3}, at: kobject_uevent_env (kbuild/src/consumer/lib/kobject_uevent.c:587)
kern :warn : [ 41.904306] other info that might help us debug this:
kern :warn : [ 41.904688] context-{4:4}
kern :warn : [ 41.904894] 1 lock held by mount.nfs/1111:
kern :warn : [ 41.905203] #0: ffff88887e2bdcd8 (&xps->xps_lock){+.+.}-{2:2}, at: xprt_switch_free (kbuild/src/consumer/include/linux/list.h:282 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:150 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:168)
kern :warn : [ 41.905853] stack backtrace:
kern :warn : [ 41.906078] CPU: 1 PID: 1111 Comm: mount.nfs Tainted: G W 5.12.0-rc6-00064-gdce9cda69f01 #1
kern :warn : [ 41.906762] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 41.907489] Call Trace:
kern :warn : [ 41.907672] dump_stack (kbuild/src/consumer/lib/dump_stack.c:122)
kern :warn : [ 41.907918] __lock_acquire.cold (kbuild/src/consumer/kernel/locking/lockdep.c:6385 kbuild/src/consumer/kernel/locking/lockdep.c:4612 kbuild/src/consumer/kernel/locking/lockdep.c:4850)
kern :warn : [ 41.908221] ? lock_is_held_type (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5550)
kern :warn : [ 41.908526] lock_acquire (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5512 kbuild/src/consumer/kernel/locking/lockdep.c:5475)
kern :warn : [ 41.908788] ? kobject_uevent_env (kbuild/src/consumer/lib/kobject_uevent.c:587)
kern :warn : [ 41.909106] __mutex_lock (kbuild/src/consumer/arch/x86/include/asm/atomic64_64.h:22 kbuild/src/consumer/include/asm-generic/atomic-instrumented.h:838 kbuild/src/consumer/include/asm-generic/atomic-long.h:29 kbuild/src/consumer/kernel/locking/mutex.c:101 kbuild/src/consumer/kernel/locking/mutex.c:142 kbuild/src/consumer/kernel/locking/mutex.c:951 kbuild/src/consumer/kernel/locking/mutex.c:1096)
kern :warn : [ 41.909367] ? kobject_uevent_env (kbuild/src/consumer/lib/kobject_uevent.c:587)
kern :warn : [ 41.909681] ? vsnprintf (kbuild/src/consumer/lib/vsprintf.c:2651)
kern :warn : [ 41.909944] ? kobject_uevent_env (kbuild/src/consumer/lib/kobject_uevent.c:587)
kern :warn : [ 41.910257] ? add_uevent_var (kbuild/src/consumer/lib/kobject_uevent.c:669)
kern :warn : [ 41.910543] ? kobject_uevent_env (kbuild/src/consumer/lib/kobject_uevent.c:587)
kern :warn : [ 41.910859] kobject_uevent_env (kbuild/src/consumer/lib/kobject_uevent.c:587)
kern :warn : [ 41.911164] rpc_sysfs_xprt_switch_xprt_destroy (kbuild/src/consumer/net/sunrpc/sysfs.c:306)
kern :warn : [ 41.911551] xprt_switch_remove_xprt_locked (kbuild/src/consumer/net/sunrpc/xprtmultipath.c:71)
kern :warn : [ 41.911916] xprt_switch_free (kbuild/src/consumer/include/linux/spinlock.h:394 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:156 kbuild/src/consumer/net/sunrpc/xprtmultipath.c:168)
kern :warn : [ 41.912195] rpc_new_client (kbuild/src/consumer/net/sunrpc/clnt.c:449)
kern :warn : [ 41.912477] rpc_create_xprt (kbuild/src/consumer/net/sunrpc/clnt.c:475)
kern :warn : [ 41.912758] ? rcu_read_lock_sched_held (kbuild/src/consumer/include/linux/lockdep.h:278 kbuild/src/consumer/kernel/rcu/update.c:125)
kern :warn : [ 41.913098] rpc_create (kbuild/src/consumer/net/sunrpc/clnt.c:596)
kern :warn : [ 41.913353] nfs_create_rpc_client (kbuild/src/consumer/fs/nfs/client.c:534)
kern :warn : [ 41.913675] nfs4_init_client (kbuild/src/consumer/fs/nfs/nfs4client.c:392) nfsv4
kern :warn : [ 41.914033] ? find_held_lock (kbuild/src/consumer/kernel/locking/lockdep.c:5003)
kern :warn : [ 41.914312] ? lock_release (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5532)
kern :warn : [ 41.914591] ? preempt_count_sub (kbuild/src/consumer/kernel/sched/core.c:4746 kbuild/src/consumer/kernel/sched/core.c:4743 kbuild/src/consumer/kernel/sched/core.c:4765)
kern :warn : [ 41.914891] ? _raw_spin_unlock (kbuild/src/consumer/arch/x86/include/asm/preempt.h:103 kbuild/src/consumer/include/linux/spinlock_api_smp.h:152 kbuild/src/consumer/kernel/locking/spinlock.c:183)
kern :warn : [ 41.915181] ? nfs_get_client (kbuild/src/consumer/fs/nfs/client.c:429)
kern :warn : [ 41.915472] ? lock_is_held_type (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5550)
kern :warn : [ 41.915777] nfs4_set_client (kbuild/src/consumer/fs/nfs/nfs4client.c:897) nfsv4
kern :warn : [ 41.916128] nfs4_create_server (kbuild/src/consumer/fs/nfs/nfs4client.c:1114 kbuild/src/consumer/fs/nfs/nfs4client.c:1162) nfsv4
kern :warn : [ 41.916500] nfs4_try_get_tree (kbuild/src/consumer/fs/nfs/nfs4super.c:226 (discriminator 3)) nfsv4
kern :warn : [ 41.916849] vfs_get_tree (kbuild/src/consumer/fs/super.c:1498)
kern :warn : [ 41.917105] path_mount (kbuild/src/consumer/fs/namespace.c:2903 kbuild/src/consumer/fs/namespace.c:3233)
kern :warn : [ 41.917361] do_mount (kbuild/src/consumer/fs/namespace.c:3246)
kern :warn : [ 41.917592] __x64_sys_mount (kbuild/src/consumer/fs/namespace.c:3456 kbuild/src/consumer/fs/namespace.c:3431 kbuild/src/consumer/fs/namespace.c:3431)
kern :warn : [ 41.917866] do_syscall_64 (kbuild/src/consumer/arch/x86/entry/common.c:46)
kern :warn : [ 41.918127] entry_SYSCALL_64_after_hwframe (kbuild/src/consumer/arch/x86/entry/entry_64.S:112)
kern :warn : [ 41.918490] RIP: 0033:0x7f9fbade6fea
kern :warn : [ 41.918752] Code: 48 8b 0d a9 0e 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 76 0e 0c 00 f7 d8 64 89 01 48
All code
========
0: 48 8b 0d a9 0e 0c 00 mov 0xc0ea9(%rip),%rcx # 0xc0eb0
7: f7 d8 neg %eax
9: 64 89 01 mov %eax,%fs:(%rcx)
c: 48 83 c8 ff or $0xffffffffffffffff,%rax
10: c3 retq
11: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
18: 00 00 00
1b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
20: 49 89 ca mov %rcx,%r10
23: b8 a5 00 00 00 mov $0xa5,%eax
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 76 0e 0c 00 mov 0xc0e76(%rip),%rcx # 0xc0eb0
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W
Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 76 0e 0c 00 mov 0xc0e76(%rip),%rcx # 0xc0e86
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 41.920062] RSP: 002b:00007ffc887b5ad8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
kern :warn : [ 41.920602] RAX: ffffffffffffffda RBX: 00007ffc887b5c30 RCX: 00007f9fbade6fea
kern :warn : [ 41.921108] RDX: 000055869073eb50 RSI: 000055869073eb70 RDI: 0000558690740880
kern :warn : [ 41.921613] RBP: 0000000000000000 R08: 0000558690741370 R09: 0000558690741960
kern :warn : [ 41.922120] R10: 0000000000000000 R11: 0000000000000206 R12: 00007ffc887b5c30
kern :warn : [ 41.922625] R13: 0000558690741160 R14: 0000000000000010 R15: 00007ffc887b5b40
user :notice: [ 44.386015] result_service: raw_upload, RESULT_MNT: /internal-lkp-server/result, RESULT_ROOT: /internal-lkp-server/result/kernel-selftests/bpf-ucode=0xde/lkp-kbl-nuc1/debian-10.4-x86_64-20200603.cgz/x86_64-rhel-8.3-kselftests/gcc-9/dce9cda69f013865602757be14a517609c83d066/3, TMP_RESULT_ROOT: /tmp/lkp/result
user :notice: [ 44.394739] run-job /lkp/jobs/scheduled/lkp-kbl-nuc1/kernel-selftests-bpf-ucode=0xde-debian-10.4-x86_64-20200603.cgz-dce9cda69f013865602757be14a517609c83d066-20210421-20224-daqu4n-2.yaml
user :notice: [ 45.630808] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/jobs/scheduled/lkp-kbl-nuc1/kernel-selftests-bpf-ucode=0xde-debian-10.4-x86_64-20200603.cgz-dce9cda69f013865602757be14a517609c83d066-20210421-20224-daqu4n-2.yaml&job_state=running -O /dev/null
user :notice: [ 45.633844] target ucode: 0xde
user :notice: [ 45.635658] current_version: de, target_version: de
user :notice: [ 45.641082] KERNEL SELFTESTS: linux_headers_dir is /usr/src/linux-headers-x86_64-rhel-8.3-kselftests-dce9cda69f013865602757be14a517609c83d066
user :notice: [ 61.004403] 2021-04-21 00:47:51 mount --bind /lib/modules/5.12.0-rc6-00064-gdce9cda69f01/kernel/lib /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-dce9cda69f013865602757be14a517609c83d066/lib
user :notice: [ 61.027826] 2021-04-21 00:47:51 sed -i s/default_timeout=45/default_timeout=300/ kselftest/runner.sh
user :notice: [ 61.110193] source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
user :notice: [ 61.114030] 2021-04-21 00:47:52 cp bpf/settings /kselftests/bpf/settings
user :notice: [ 61.115667] ping6 is /bin/ping6
user :notice: [ 61.123918] LKP SKIP bpf.test_tc_tunnel.sh
user :notice: [ 61.128107] LKP SKIP bpf.test_lwt_seg6local.sh
user :notice: [ 61.134365] 2021-04-21 00:47:52 /kselftests/run_kselftest.sh -c bpf
user :warn : [ 61.244132] kselftest: Running tests in bpf
user :notice: [ 61.248060] TAP version 13
user :notice: [ 61.250309] 1..37
user :notice: [ 61.259507] # selftests: bpf: test_verifier
user :notice: [ 61.290892] # #0/u invalid and of negative number OK
user :notice: [ 61.292926] # #0/p invalid and of negative number OK
user :notice: [ 61.294477] # #1/u invalid range check OK
user :notice: [ 61.296293] # #1/p invalid range check OK
user :notice: [ 61.299906] # #2/u check known subreg with unknown reg OK
user :notice: [ 61.303546] # #2/p check known subreg with unknown reg OK
user :notice: [ 61.306866] # #3/u valid map access into an array with a constant OK
kern :warn : [ 61.308679] ------------[ cut here ]------------
kern :warn : [ 61.309090] trace type BPF program uses run-time allocation
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml
bin/lkp run compatible-job.yaml
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation
Thanks,
Oliver Sang