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]
Message-ID: <202210141000.82ed2dad-oliver.sang@intel.com>
Date:   Fri, 14 Oct 2022 12:08:59 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Dmytro Shytyi <dmytro@...tyi.net>
CC:     <lkp@...ts.01.org>, <lkp@...el.com>, <netdev@...r.kernel.org>,
        <mptcp@...ts.linux.dev>, Dmytro Shytyi <dmytro@...tyi.net>
Subject: [selftests]  3efff6806f:
 WARNING:possible_circular_locking_dependency_detected


Greeting,

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

commit: 3efff6806f8800dae23fc085980418fdb4a8a89e ("[RFC PATCH mptcp-next v14 5/5] selftests: mptcp: mptfo Initiator/Listener")
url: https://github.com/intel-lab-lkp/linux/commits/Dmytro-Shytyi/mptcp-Fast-Open-Mechanism/20221011-063449
base: https://github.com/multipath-tcp/mptcp_net-next.git export
patch link: mptcp.lists.linux.dev   https://lore.kernel.org/mptcp/20221010221809.1792-6-dmytro@shytyi.net
patch subject: [RFC PATCH mptcp-next v14 5/5] selftests: mptcp: mptfo Initiator/Listener

in testcase: kernel-selftests
version: kernel-selftests-x86_64-75776cf2-1_20221008
with following parameters:

	group: mptcp

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) Xeon(R) CPU E3-1225 v5 @ 3.30GHz (Skylake) with 16G 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 <oliver.sang@...el.com>
| Link: https://lore.kernel.org/r/202210141000.82ed2dad-oliver.sang@intel.com


[  115.581354][ T5877]
[  115.583561][ T5877] ======================================================
[  115.590453][ T5877] WARNING: possible circular locking dependency detected
[  115.597348][ T5877] 6.0.0-02790-g3efff6806f88 #3 Tainted: G S
[  115.604502][ T5877] ------------------------------------------------------
[  115.611391][ T5877] mptcp_connect/5877 is trying to acquire lock:
[  115.617501][ T5877] ffff888174afc130 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_wait_for_connect+0x259/0x340
[  115.627108][ T5877]
[  115.627108][ T5877] but task is already holding lock:
[  115.634357][ T5877] ffff88810d289930 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: inet_wait_for_connect+0x259/0x340
[  115.644127][ T5877]
[  115.644127][ T5877] which lock already depends on the new lock.
[  115.644127][ T5877]
[  115.654411][ T5877]
[  115.654411][ T5877] the existing dependency chain (in reverse order) is:
[  115.663302][ T5877]
[  115.663302][ T5877] -> #1 (k-sk_lock-AF_INET){+.+.}-{0:0}:
[  115.670987][ T5877]        __lock_acquire+0xafe/0x1800
[  115.676150][ T5877]        lock_acquire+0x194/0x500
[  115.681042][ T5877]        lock_sock_nested+0x37/0x100
[  115.686196][ T5877]        sk_setsockopt+0xd23/0x2980
[  115.691268][ T5877]        mptcp_setsockopt_sol_socket+0x9e/0x440
[  115.697384][ T5877]        __sys_setsockopt+0x199/0x500
[  115.702623][ T5877]        __x64_sys_setsockopt+0xb9/0x180
[  115.708120][ T5877]        do_syscall_64+0x5c/0xc0
[  115.712923][ T5877]        entry_SYSCALL_64_after_hwframe+0x5e/0xc8
[  115.719207][ T5877]
[  115.719207][ T5877] -> #0 (sk_lock-AF_INET){+.+.}-{0:0}:
[  115.726735][ T5877]        check_prev_add+0x15e/0x2100
[  115.731884][ T5877]        validate_chain+0xab0/0xe40
[  115.736952][ T5877]        __lock_acquire+0xafe/0x1800
[  115.742098][ T5877]        lock_acquire+0x194/0x500
[  115.746988][ T5877]        lock_sock_nested+0x37/0x100
[  115.752140][ T5877]        inet_wait_for_connect+0x259/0x340
[  115.757816][ T5877]        __inet_stream_connect+0x27b/0x900
[  115.763493][ T5877]        tcp_sendmsg_fastopen+0x350/0x680
[  115.769083][ T5877]        mptcp_sendmsg+0x2a2/0x1880
[  115.774148][ T5877]        sock_sendmsg+0xe1/0x140
[  115.778953][ T5877]        __sys_sendto+0x1c1/0x2c0
[  115.783852][ T5877]        __x64_sys_sendto+0xdc/0x1c0
[  115.789007][ T5877]        do_syscall_64+0x5c/0xc0
[  115.793813][ T5877]        entry_SYSCALL_64_after_hwframe+0x5e/0xc8
[  115.800098][ T5877]
[  115.800098][ T5877] other info that might help us debug this:
[  115.800098][ T5877]
[  115.810225][ T5877]  Possible unsafe locking scenario:
[  115.810225][ T5877]
[  115.817570][ T5877]        CPU0                    CPU1
[  115.822810][ T5877]        ----                    ----
[  115.828052][ T5877]   lock(k-sk_lock-AF_INET);
[  115.832510][ T5877]                                lock(sk_lock-AF_INET);
[  115.839318][ T5877]                                lock(k-sk_lock-AF_INET);
[  115.846306][ T5877]   lock(sk_lock-AF_INET);
[  115.850592][ T5877]
[  115.850592][ T5877]  *** DEADLOCK ***
[  115.850592][ T5877]
[  115.858619][ T5877] 1 lock held by mptcp_connect/5877:
[  115.863773][ T5877]  #0: ffff88810d289930 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: inet_wait_for_connect+0x259/0x340
[  115.873983][ T5877]
[  115.873983][ T5877] stack backtrace:
[  115.879741][ T5877] CPU: 1 PID: 5877 Comm: mptcp_connect Tainted: G S                 6.0.0-02790-g3efff6806f88 #3
[  115.890113][ T5877] Hardware name: HP HP Z238 Microtower Workstation/8183, BIOS N51 Ver. 01.63 10/05/2017
[  115.899702][ T5877] Call Trace:
[  115.902854][ T5877]  <TASK>
[  115.905663][ T5877]  dump_stack_lvl+0x45/0x5d
[  115.910033][ T5877]  check_noncircular+0x26c/0x340
[  115.914840][ T5877]  ? print_circular_bug+0x200/0x200
[  115.919908][ T5877]  ? alloc_chain_hlocks+0x22f/0x780
[  115.924982][ T5877]  check_prev_add+0x15e/0x2100
[  115.929617][ T5877]  validate_chain+0xab0/0xe40
[  115.934160][ T5877]  ? check_prev_add+0x2100/0x2100
[  115.939064][ T5877]  __lock_acquire+0xafe/0x1800
[  115.943703][ T5877]  lock_acquire+0x194/0x500
[  115.948063][ T5877]  ? inet_wait_for_connect+0x259/0x340
[  115.953395][ T5877]  ? rcu_read_unlock+0x40/0x40
[  115.958026][ T5877]  ? lock_downgrade+0x100/0x100
[  115.962747][ T5877]  ? mark_held_locks+0x9e/0x100
[  115.967468][ T5877]  ? lock_is_held_type+0x9b/0x140
[  115.972366][ T5877]  lock_sock_nested+0x37/0x100
[  115.976999][ T5877]  ? inet_wait_for_connect+0x259/0x340
[  115.982329][ T5877]  inet_wait_for_connect+0x259/0x340
[  115.987485][ T5877]  ? inet_listen+0x500/0x500
[  115.991944][ T5877]  ? __init_waitqueue_head+0x180/0x180
[  115.997277][ T5877]  ? mptcp_accept+0x4c0/0x4c0
[  116.001827][ T5877]  ? lock_is_held_type+0x9b/0x140
[  116.006725][ T5877]  __inet_stream_connect+0x27b/0x900
[  116.011877][ T5877]  tcp_sendmsg_fastopen+0x350/0x680
[  116.016944][ T5877]  ? __local_bh_enable_ip+0xa2/0x100
[  116.022096][ T5877]  ? trace_hardirqs_on+0x3c/0x140
[  116.026990][ T5877]  mptcp_sendmsg+0x2a2/0x1880
[  116.031530][ T5877]  ? __might_fault+0xbc/0x180
[  116.036076][ T5877]  ? __lock_release+0x102/0x540
[  116.040800][ T5877]  ? lock_downgrade+0x100/0x100
[  116.045517][ T5877]  ? __mptcp_push_pending+0x6c0/0x6c0
[  116.050758][ T5877]  ? __might_fault+0xbc/0x180
[  116.055299][ T5877]  ? inet_send_prepare+0x3c0/0x3c0
[  116.060295][ T5877]  sock_sendmsg+0xe1/0x140
[  116.064583][ T5877]  __sys_sendto+0x1c1/0x2c0
[  116.068958][ T5877]  ? __ia32_sys_getpeername+0xc0/0xc0
[  116.074192][ T5877]  ? ksys_read+0x184/0x200
[  116.078480][ T5877]  ? rcu_read_lock_sched_held+0x43/0x80
[  116.083902][ T5877]  ? kfree+0x314/0x500
[  116.087842][ T5877]  ? ksys_read+0x184/0x200
[  116.092129][ T5877]  ? __ia32_sys_pwrite64+0x200/0x200
[  116.097308][ T5877]  __x64_sys_sendto+0xdc/0x1c0
[  116.101937][ T5877]  ? syscall_enter_from_user_mode+0x21/0xc0
[  116.107698][ T5877]  do_syscall_64+0x5c/0xc0
[  116.111980][ T5877]  ? lockdep_hardirqs_on_prepare+0x19e/0x380
[  116.118434][ T5877]  ? do_syscall_64+0x69/0xc0
[  116.122894][ T5877]  ? do_syscall_64+0x69/0xc0
[  116.127346][ T5877]  ? lockdep_hardirqs_on_prepare+0x19e/0x380
[  116.133806][ T5877]  entry_SYSCALL_64_after_hwframe+0x5e/0xc8
[  116.139569][ T5877] RIP: 0033:0x7f2ada797456
[  116.143856][ T5877] Code: 79 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 11 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 72 c3 90 41 54 48 83 ec 30 44 89 4c 24 2c 4c
[  116.163350][ T5877] RSP: 002b:00007ffe1f4d8528 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
[  116.171639][ T5877] RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f2ada797456
[  116.179488][ T5877] RDX: 0000000000002000 RSI: 00007ffe1f4d8590 RDI: 0000000000000005
[  116.187336][ T5877] RBP: 0000000000000106 R08: 0000558bb88aa2d0 R09: 0000000000000010
[  116.195182][ T5877] R10: 0000000020000000 R11: 0000000000000246 R12: 0000000000002000
[  116.203033][ T5877] R13: 0000558bb76cad9b R14: 0000558bb76cada4 R15: 0000558bb88aa2a0
[  116.210882][ T5877]  </TASK>



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
        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://01.org/lkp



View attachment "config-6.0.0-02790-g3efff6806f88" of type "text/plain" (168544 bytes)

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

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

View attachment "kernel-selftests" of type "text/plain" (38594 bytes)

View attachment "job.yaml" of type "text/plain" (5463 bytes)

View attachment "reproduce" of type "text/plain" (248 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ