Re: [jlayton:tmpfs] [shmem] 1dbf9cad31: WARNING:inconsistent_lock_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Apr 9, 2023, at 10:53 PM, kernel test robot <oliver.sang@xxxxxxxxx> wrote:
> 
> 
> Hello,
> 
> kernel test robot noticed "WARNING:inconsistent_lock_state" on:
> 
> commit: 1dbf9cad3182c9decb9aba874dfd3f3f7f5dcf61 ("shmem: stable directory cookies")
> https://git.kernel.org/cgit/linux/kernel/git/jlayton/linux.git tmpfs
> 
> in testcase: kernel-selftests
> version: kernel-selftests-x86_64-60acb023-1_20230329
> with following parameters:
> 
> group: sgx
> 
> 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
> 
> 
> compiler: gcc-11
> test machine: 16 threads 1 sockets Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz (Coffee Lake) with 32G memory
> 
> (please refer to attached dmesg/kmsg for entire log/backtrace)
> 
> 
> If you fix the issue, kindly add following tag
> | Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> | Link: https://lore.kernel.org/oe-lkp/202304101018.4e0ba3fd-oliver.sang@xxxxxxxxx
> 
> 
> [   38.672635][    C0] WARNING: inconsistent lock state
> [   38.677619][    C0] 6.3.0-rc5-00001-g1dbf9cad3182 #1 Not tainted
> [   38.683656][    C0] --------------------------------
> [   38.688647][    C0] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
> [   38.695368][    C0] systemd/1 [HC0[0]:SC1[1]:HE0:SE0] takes:
> [ 38.701058][ C0] ffff888877549bd8 (&xa->xa_lock#3){+.?.}-{2:2}, at: xa_destroy (lib/xarray.c:2214) 
> [   38.709532][    C0] {SOFTIRQ-ON-W} state was registered at:
> [ 38.715131][ C0] __lock_acquire (kernel/locking/lockdep.c:5010) 
> [ 38.719875][ C0] lock_acquire (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5671 kernel/locking/lockdep.c:5634) 
> [ 38.724339][ C0] _raw_spin_lock (include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) 
> [ 38.728812][ C0] shmem_doff_add (include/linux/xarray.h:965 mm/shmem.c:2943) 
> [ 38.733376][ C0] shmem_mknod (mm/shmem.c:3014) 
> [ 38.737676][ C0] vfs_mknod (fs/namei.c:3916) 
> [ 38.741885][ C0] devtmpfs_work_loop (drivers/base/devtmpfs.c:228 drivers/base/devtmpfs.c:393 drivers/base/devtmpfs.c:408) 
> [ 38.746876][ C0] devtmpfsd (devtmpfs.c:?) 
> [ 38.750913][ C0] kthread (kernel/kthread.c:376) 
> [ 38.754950][ C0] ret_from_fork (arch/x86/entry/entry_64.S:314) 
> [   38.759333][    C0] irq event stamp: 3472493
> [ 38.763625][ C0] hardirqs last enabled at (3472492): kasan_quarantine_put (arch/x86/include/asm/irqflags.h:42 (discriminator 1) arch/x86/include/asm/irqflags.h:77 (discriminator 1) arch/x86/include/asm/irqflags.h:135 (discriminator 1) mm/kasan/quarantine.c:242 (discriminator 1)) 
> [ 38.773551][ C0] hardirqs last disabled at (3472493): _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:108 kernel/locking/spinlock.c:162) 
> [ 38.783580][ C0] softirqs last enabled at (3471804): __do_softirq (arch/x86/include/asm/preempt.h:27 kernel/softirq.c:415 kernel/softirq.c:600) 
> [ 38.792916][ C0] softirqs last disabled at (3472447): __irq_exit_rcu (kernel/softirq.c:445 kernel/softirq.c:650) 
> [   38.802453][    C0]
> [   38.802453][    C0] other info that might help us debug this:
> [   38.810393][    C0]  Possible unsafe locking scenario:
> [   38.810393][    C0]
> [   38.817760][    C0]        CPU0
> [   38.820931][    C0]        ----
> [   38.824096][    C0]   lock(&xa->xa_lock#3);
> [   38.828306][    C0]   <Interrupt>
> [   38.831644][    C0]     lock(&xa->xa_lock#3);
> [   38.836027][    C0]
> [   38.836027][    C0]  *** DEADLOCK ***
> [   38.836027][    C0]
> [   38.844049][    C0] 1 lock held by systemd/1:
> [ 38.848459][ C0] #0: ffffffff84b2b740 (rcu_callback){....}-{0:0}, at: rcu_do_batch (include/linux/rcupdate.h:327 kernel/rcu/tree.c:2107) 
> [   38.857460][    C0]
> [   38.857460][    C0] stack backtrace:
> [   38.863234][    C0] CPU: 0 PID: 1 Comm: systemd Not tainted 6.3.0-rc5-00001-g1dbf9cad3182 #1
> [   38.871704][    C0] Hardware name: Intel Corporation Mehlow UP Server Platform/Moss Beach Server, BIOS CNLSE2R1.R00.X188.B13.1903250419 03/25/2019
> [   38.884840][    C0] Call Trace:
> [   38.888010][    C0]  <IRQ>
> [ 38.890738][ C0] dump_stack_lvl (lib/dump_stack.c:108) 
> [ 38.895121][ C0] mark_lock_irq (kernel/locking/lockdep.c:3934 kernel/locking/lockdep.c:3976 kernel/locking/lockdep.c:4179) 
> [ 38.899596][ C0] ? print_usage_bug+0x660/0x660 
> [ 38.905015][ C0] ? stack_trace_save (kernel/stacktrace.c:123) 
> [ 38.909748][ C0] ? filter_irq_stacks (kernel/stacktrace.c:114) 
> [ 38.914565][ C0] ? is_bpf_text_address (include/linux/rcupdate.h:332 include/linux/rcupdate.h:806 kernel/bpf/core.c:721) 
> [ 38.919648][ C0] ? lock_release (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5691) 
> [ 38.924117][ C0] ? save_trace (kernel/locking/lockdep.c:586) 
> [ 38.928440][ C0] mark_lock+0x4ce/0xac0 
> [ 38.933183][ C0] ? mark_lock_irq (kernel/locking/lockdep.c:4594) 
> [ 38.937830][ C0] mark_usage (kernel/locking/lockdep.c:4530) 
> [ 38.941956][ C0] __lock_acquire (kernel/locking/lockdep.c:5010) 
> [ 38.946603][ C0] ? mark_lock_irq (kernel/locking/lockdep.c:4594) 
> [ 38.951247][ C0] ? slab_free_freelist_hook (mm/slub.c:1807) 
> [ 38.956668][ C0] ? mark_usage (kernel/locking/lockdep.c:4914) 
> [ 38.961057][ C0] ? __irq_exit_rcu (kernel/softirq.c:445 kernel/softirq.c:650) 
> [ 38.965786][ C0] ? irq_exit_rcu (kernel/softirq.c:664) 
> [ 38.970086][ C0] ? sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1107 (discriminator 14)) 
> [ 38.975775][ C0] ? mark_usage (kernel/locking/lockdep.c:4560) 
> [ 38.980160][ C0] lock_acquire (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5671 kernel/locking/lockdep.c:5634) 
> [ 38.984544][ C0] ? xa_destroy (lib/xarray.c:2214) 
> [ 38.988843][ C0] ? lock_release (kernel/locking/lockdep.c:5637) 
> [ 38.993398][ C0] ? mark_usage (kernel/locking/lockdep.c:4914) 
> [ 38.997819][ C0] _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162) 
> [ 39.002900][ C0] ? xa_destroy (lib/xarray.c:2214) 
> [ 39.007192][ C0] xa_destroy (lib/xarray.c:2214) 
> [ 39.011312][ C0] ? xas_free_nodes (lib/xarray.c:2208) 
> [ 39.016048][ C0] ? lock_release (kernel/locking/lockdep.c:5637) 
> [ 39.020607][ C0] ? kmem_cache_free (mm/slub.c:3787 mm/slub.c:3809) 
> [ 39.025460][ C0] shmem_free_in_core_inode (mm/shmem.c:2989 mm/shmem.c:4061) 
> [ 39.030712][ C0] rcu_do_batch (include/linux/rcupdate.h:332 kernel/rcu/tree.c:2114) 
> [ 39.035099][ C0] ? rcu_check_gp_kthread_starvation (kernel/rcu/tree.c:2051) 
> [ 39.041300][ C0] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4599 kernel/locking/lockdep.c:4530) 
> [ 39.047762][ C0] ? note_gp_changes (arch/x86/include/asm/irqflags.h:42 (discriminator 1) arch/x86/include/asm/irqflags.h:77 (discriminator 1) arch/x86/include/asm/irqflags.h:135 (discriminator 1) kernel/rcu/tree.c:1234 (discriminator 1)) 
> [ 39.052579][ C0] rcu_core (kernel/rcu/tree.c:2374) 
> [ 39.056616][ C0] __do_softirq (arch/x86/include/asm/jump_label.h:27 include/linux/jump_label.h:207 include/trace/events/irq.h:142 kernel/softirq.c:572) 
> [ 39.060996][ C0] __irq_exit_rcu (kernel/softirq.c:445 kernel/softirq.c:650) 
> [ 39.065551][ C0] irq_exit_rcu (kernel/softirq.c:664) 
> [ 39.069674][ C0] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1107 (discriminator 14)) 
> [   39.075188][    C0]  </IRQ>
> [   39.078013][    C0]  <TASK>
> [ 39.080833][ C0] asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:645) 
> [ 39.086690][ C0] RIP: 0010:_raw_spin_unlock_irqrestore (kernel/locking/spinlock.c:195) 
> [ 39.092983][ C0] Code: 89 f3 48 8b 74 24 10 48 83 c7 18 e8 81 e6 a6 fd 48 89 ef e8 e9 4e a7 fd 80 e7 02 74 06 e8 ef 70 cb fd fb 65 ff 0d 3f b3 75 7c <5b> 5d c3 0f 1f 40 00 f3 0f 1e fa 0f 1f 44 00 00 55 48 89 fd 65 ff
> All code
> ========
>   0: 89 f3                 mov    %esi,%ebx
>   2: 48 8b 74 24 10        mov    0x10(%rsp),%rsi
>   7: 48 83 c7 18           add    $0x18,%rdi
>   b: e8 81 e6 a6 fd        callq  0xfffffffffda6e691
>  10: 48 89 ef              mov    %rbp,%rdi
>  13: e8 e9 4e a7 fd        callq  0xfffffffffda74f01
>  18: 80 e7 02              and    $0x2,%bh
>  1b: 74 06                 je     0x23
>  1d: e8 ef 70 cb fd        callq  0xfffffffffdcb7111
>  22: fb                    sti    
>  23: 65 ff 0d 3f b3 75 7c decl   %gs:0x7c75b33f(%rip)        # 0x7c75b369
>  2a:* 5b                    pop    %rbx <-- trapping instruction
>  2b: 5d                    pop    %rbp
>  2c: c3                    retq   
>  2d: 0f 1f 40 00           nopl   0x0(%rax)
>  31: f3 0f 1e fa           endbr64 
>  35: 0f 1f 44 00 00        nopl   0x0(%rax,%rax,1)
>  3a: 55                    push   %rbp
>  3b: 48 89 fd              mov    %rdi,%rbp
>  3e: 65                    gs
>  3f: ff                    .byte 0xff
> 
> Code starting with the faulting instruction
> ===========================================
>   0: 5b                    pop    %rbx
>   1: 5d                    pop    %rbp
>   2: c3                    retq   
>   3: 0f 1f 40 00           nopl   0x0(%rax)
>   7: f3 0f 1e fa           endbr64 
>   b: 0f 1f 44 00 00        nopl   0x0(%rax,%rax,1)
>  10: 55                    push   %rbp
>  11: 48 89 fd              mov    %rdi,%rbp
>  14: 65                    gs
>  15: ff                    .byte 0xff
> 
> 
> To reproduce:
> 
>        git clone https://github.com/intel/lkp-tests.git
>        cd lkp-tests
>        sudo bin/lkp install job.yaml           # job file is attached in this email

The above step fails on my Fedora 37 system:

...
Dependencies resolved.
Nothing to do.
Complete!
Use: /home/cel/lkp-tests/distro/installer/fedora install alsa-lib-devel attr binutils-devel bison compat-readline5-devel conntrack dwarves ebtables elfutils-devel ethtool file flex fuse fuse-devel g++ gcc glibc-common glibc-devel glibc-static glibc-devel.i686 glibc-static.i686 glibc.i686 glibc.x86_64 iperf3 iproute iptables iputils ipvsadm jq kernel-headers keyutils-libs-devel lib32gcc-dev libbpf-dev libc6-x32 libcap-devel libcap-ng-devel libdrm-devel libgcc.i686 libhugetlbfs-dev libmnl-devel libmount-devel libpci3 libx32asan5 libx32atomic1 libx32gcc1 libx32gcc-dev libx32gomp1 libx32itm1 libx32quadmath0 libx32ubsan1 linux-libc-dev-amd64-cross llvm-devel make netsniff-ng net-tools nftables nmap-ncat numactl-devel openssl-devel openvswitch-common openvswitch-switch perf pesign pkgconfig popt popt-devel python3 python3-scapy python-docutils rsync sendip socat sudo tcpdump traceroute util-linux wireshark xz zlib-devel autoconf automake bc binutils-devel compat-readline5-devel elfutils-devel gettext libbpf-dev libmnl-devel libnl3-devel libpcap-devel libpci-dev libtool m4 openssl-devel pkgconfig popt-devel systemd systemd-devel systemd-libs  Last metadata expiration check: 1:45:19 ago on Mon 10 Apr 2023 10:06:05 AM EDT.
Package alsa-lib-devel-1.2.8-2.fc37.x86_64 is already installed.
Package attr-2.5.1-5.fc37.x86_64 is already installed.
Package binutils-devel-2.38-25.fc37.x86_64 is already installed.
Package bison-3.8.2-3.fc37.x86_64 is already installed.
Package conntrack-tools-1.4.6-4.fc37.x86_64 is already installed.
Package dwarves-1.24-1.fc37.x86_64 is already installed.
Package iptables-nft-1.8.8-4.fc37.x86_64 is already installed.
Package elfutils-devel-0.189-1.fc37.x86_64 is already installed.
Package ethtool-2:6.2-1.fc37.x86_64 is already installed.
Package file-5.42-4.fc37.x86_64 is already installed.
Package flex-2.6.4-11.fc37.x86_64 is already installed.
Package fuse-devel-2.9.9-15.fc37.x86_64 is already installed.
Package gcc-c++-12.2.1-4.fc37.x86_64 is already installed.
Package gcc-12.2.1-4.fc37.x86_64 is already installed.
Package glibc-common-2.36-9.fc37.x86_64 is already installed.
Package glibc-devel-2.36-9.fc37.x86_64 is already installed.
Package glibc-devel-2.36-9.fc37.i686 is already installed.
Package glibc-static-2.36-9.fc37.x86_64 is already installed.
Package glibc-static-2.36-9.fc37.i686 is already installed.
Package glibc-devel-2.36-9.fc37.i686 is already installed.
Package glibc-static-2.36-9.fc37.i686 is already installed.
Package glibc-2.36-9.fc37.i686 is already installed.
Package glibc-2.36-9.fc37.x86_64 is already installed.
Package iproute-5.18.0-2.fc37.x86_64 is already installed.
Package iptables-nft-1.8.8-4.fc37.x86_64 is already installed.
Package iputils-20221126-1.fc37.x86_64 is already installed.
Package jq-1.6-14.fc37.x86_64 is already installed.
Package kernel-headers-6.1.5-200.fc37.x86_64 is already installed.
Package keyutils-libs-devel-1.6.1-5.fc37.x86_64 is already installed.
No match for argument: lib32gcc-dev
No match for argument: libbpf-dev
No match for argument: libc6-x32
Package libcap-devel-2.48-5.fc37.x86_64 is already installed.
Package libcap-ng-devel-0.8.3-3.fc37.x86_64 is already installed.
Package libgcc-12.2.1-4.fc37.i686 is already installed.
No match for argument: libhugetlbfs-dev
Package libmnl-devel-1.0.5-1.fc37.x86_64 is already installed.
Package libmount-devel-2.38.1-1.fc37.x86_64 is already installed.
No match for argument: libpci3
No match for argument: libx32asan5
No match for argument: libx32atomic1
No match for argument: libx32gcc1
No match for argument: libx32gcc-dev
No match for argument: libx32gomp1
No match for argument: libx32itm1
No match for argument: libx32quadmath0
No match for argument: libx32ubsan1
No match for argument: linux-libc-dev-amd64-cross
Package make-1:4.3-11.fc37.x86_64 is already installed.
Package net-tools-2.0-0.64.20160912git.fc37.x86_64 is already installed.
Package nftables-1:1.0.4-3.fc37.x86_64 is already installed.
Package nmap-ncat-3:7.93-1.fc37.x86_64 is already installed.
Package numactl-devel-2.0.14-6.fc37.x86_64 is already installed.
Package openssl-devel-1:3.0.8-1.fc37.x86_64 is already installed.
No match for argument: openvswitch-common
No match for argument: openvswitch-switch
Package perf-6.2.6-200.fc37.x86_64 is already installed.
Package pkgconf-pkg-config-1.8.0-3.fc37.x86_64 is already installed.
Package popt-1.19-1.fc37.x86_64 is already installed.
Package popt-devel-1.19-1.fc37.x86_64 is already installed.
Package python3-3.11.2-1.fc37.x86_64 is already installed.
Package python3-docutils-0.18.1-2.fc37.noarch is already installed.
Package rsync-3.2.7-1.fc37.x86_64 is already installed.
No match for argument: sendip
Package sudo-1.9.13-1.p2.fc37.x86_64 is already installed.
Package tcpdump-14:4.99.3-1.fc37.x86_64 is already installed.
Package traceroute-3:2.1.2-1.fc37.x86_64 is already installed.
Package util-linux-2.38.1-1.fc37.x86_64 is already installed.
Package xz-5.4.1-1.fc37.x86_64 is already installed.
Package zlib-devel-1.2.12-5.fc37.x86_64 is already installed.
Package autoconf-2.71-4.fc37.noarch is already installed.
Package automake-1.16.5-9.fc37.noarch is already installed.
Package bc-1.07.1-16.fc37.x86_64 is already installed.
Package gettext-0.21.1-1.fc37.x86_64 is already installed.
Package libnl3-devel-3.7.0-2.fc37.x86_64 is already installed.
No match for argument: libpci-dev
Package libtool-2.4.7-2.fc37.x86_64 is already installed.
Package m4-1.4.19-4.fc37.x86_64 is already installed.
Package systemd-251.14-2.fc37.x86_64 is already installed.
Package systemd-devel-251.14-2.fc37.x86_64 is already installed.
Package systemd-libs-251.14-2.fc37.x86_64 is already installed.
Error: Unable to find a match: lib32gcc-dev libbpf-dev libc6-x32 libhugetlbfs-dev libpci3 libx32asan5 libx32atomic1 libx32gcc1 libx32gcc-dev libx32gomp1 libx32itm1 libx32quadmath0 libx32ubsan1 linux-libc-dev-amd64-cross openvswitch-common openvswitch-switch sendip libpci-dev
Cannot install some packages of kernel-selftests depends
[cel@manet lkp-tests]$

These missing packages appear to be Debian packages.


>        bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
>        sudo bin/lkp run generated-yaml-file
> 
>        # if come across any failure that blocks the test,
>        # please remove ~/.lkp and /lkp dir to run from a clean state.
> 
> 
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests
> 
> 
> <config-6.3.0-rc5-00001-g1dbf9cad3182><job-script.txt><dmesg.xz><kernel-selftests.txt><job.yaml><reproduce.txt>

--
Chuck Lever







[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux