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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201004125619.GN393@shao2-debian>
Date:   Sun, 4 Oct 2020 20:56:19 +0800
From:   kernel test robot <lkp@...el.com>
To:     Al Viro <viro@...IV.linux.org.uk>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Marc Zyngier <maz@...nel.org>, 0day robot <lkp@...el.com>,
        lkp@...ts.01.org
Subject: [ep_insert()] 9ee1cc5666: WARNING:possible_recursive_locking_detected

Greeting,

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

commit: 9ee1cc56661640a2ace2f7d0b52dec56b3573c53 ("[RFC PATCH 20/27] ep_insert(): we only need tep->mtx around the insertion itself")
url: https://github.com/0day-ci/linux/commits/Al-Viro/epoll-switch-epitem-pwqlist-to-single-linked-list/20201004-113938
base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git 22fbc037cd32e4e6771d2271b565806cfb8c134c

in testcase: rcuperf
version: 
with following parameters:

	runtime: 300s
	perf_type: srcud



on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G

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


+---------------------------------------------+------------+------------+
|                                             | 8d7a0bb9bb | 9ee1cc5666 |
+---------------------------------------------+------------+------------+
| boot_successes                              | 16         | 3          |
| boot_failures                               | 0          | 7          |
| WARNING:possible_recursive_locking_detected | 0          | 7          |
+---------------------------------------------+------------+------------+


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp@...el.com>


[   16.956306] WARNING: possible recursive locking detected
[   16.957162] 5.9.0-rc7-00161-g9ee1cc5666164 #1 Not tainted
[   16.958165] --------------------------------------------
[   16.959083] systemd/1 is trying to acquire lock:
[   16.959879] f6148434 (&ep->mtx){+.+.}-{3:3}, at: do_epoll_ctl+0x516/0x730
[   16.961051] 
[   16.961051] but task is already holding lock:
[   16.962000] f6148134 (&ep->mtx){+.+.}-{3:3}, at: epoll_mutex_lock+0xe/0x21
[   16.963207] 
[   16.963207] other info that might help us debug this:
[   16.964179]  Possible unsafe locking scenario:
[   16.964179] 
[   16.965106]        CPU0
[   16.965531]        ----
[   16.965976]   lock(&ep->mtx);
[   16.966487]   lock(&ep->mtx);
[   16.967005] 
[   16.967005]  *** DEADLOCK ***
[   16.967005] 
[   16.968023]  May be due to missing lock nesting notation
[   16.968023] 
[   16.969182] 2 locks held by systemd/1:
[   16.969815]  #0: c73ba5d4 (epmutex){+.+.}-{3:3}, at: epoll_mutex_lock+0xe/0x21
[   16.971187]  #1: f6148134 (&ep->mtx){+.+.}-{3:3}, at: epoll_mutex_lock+0xe/0x21
[   16.972573] 
[   16.972573] stack backtrace:
[   16.973177] CPU: 0 PID: 1 Comm: systemd Not tainted 5.9.0-rc7-00161-g9ee1cc5666164 #1
[   16.974433] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[   16.975668] Call Trace:
[   16.976068]  dump_stack+0x1b/0x1d
[   16.976560]  validate_chain+0x4ad/0x4f5
[   16.977206]  __lock_acquire+0x726/0x7bf
[   16.977882]  lock_acquire+0x1f3/0x273
[   16.978525]  ? do_epoll_ctl+0x516/0x730
[   16.979162]  ? lock_is_held+0xb/0xd
[   16.979754]  __mutex_lock+0x72/0x1d6
[   16.980362]  ? do_epoll_ctl+0x516/0x730
[   16.981009]  ? rcu_read_lock_sched_held+0x20/0x37
[   16.981802]  ? kmem_cache_alloc+0xed/0x11c
[   16.982461]  mutex_lock_nested+0x14/0x18
[   16.983148]  ? do_epoll_ctl+0x516/0x730
[   16.983821]  do_epoll_ctl+0x516/0x730
[   16.984457]  __ia32_sys_epoll_ctl+0x2b/0x4f
[   16.985178]  do_int80_syscall_32+0x27/0x34
[   16.985875]  entry_INT80_32+0x113/0x113
[   16.986505] EIP: 0xb7f5fa02
[   16.987002] Code: 95 01 00 05 25 36 02 00 83 ec 14 8d 80 e8 99 ff ff 50 6a 02 e8 1f ff 00 00 c7 04 24 7f 00 00 00 e8 7e 87 01 00 66 90 90 cd 80 <c3> 8d b6 00 00 00 00 8d bc 27 00 00 00 00 8b 1c 24 c3 8d b6 00 00
[   16.990076] EAX: ffffffda EBX: 00000004 ECX: 00000001 EDX: 00000009
[   16.991027] ESI: bfcb6050 EDI: 00000001 EBP: 00000001 ESP: bfcb6030
[   16.992078] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000246
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[  OK  ] Reached target Swap.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Created slice System Slice.
[   17.032119] _warn_unseeded_randomness: 199 callbacks suppressed
[   17.032127] random: get_random_u32 called from copy_process+0x216/0x1349 with crng_init=1
         Starting Load Kernel Modules...
         Mounting RPC Pipe File System...
[  OK  ] Reached target Slices.
[   17.040073] random: get_random_u32 called from arch_pick_mmap_layout+0x4d/0xd7 with crng_init=1
[   17.040077] random: get_random_u32 called from randomize_stack_top+0x1b/0x36 with crng_init=1
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
         Starting Journal Service...
         Starting Remount Root and Kernel File Systems...
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Mounted RPC Pipe File System.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting Load/Save Random Seed...
         Starting udev Coldplug all Devices...
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Preprocess NFS configuration...
         Mounting Configuration File System...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
[  OK  ] Mounted Configuration File System.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Preprocess NFS configuration.
[  OK  ] Started Apply Kernel Variables.
         Starting Raise network interfaces...
[  OK  ] Reached target NFS client services.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Raise network interfaces.


To reproduce:

        # build kernel
	cd linux
	cp config-5.9.0-rc7-00161-g9ee1cc5666164 .config
	make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 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,
lkp


View attachment "config-5.9.0-rc7-00161-g9ee1cc5666164" of type "text/plain" (147009 bytes)

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

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

View attachment "rcuperf" of type "text/plain" (415 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ