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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171029141855.GE17621@yexl-desktop>
Date:   Sun, 29 Oct 2017 22:18:55 +0800
From:   kernel test robot <xiaolong.ye@...el.com>
To:     Byungchul Park <byungchul.park@....com>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        "H. Peter Anvin" <hpa@...or.com>, tipbuild@...or.com, lkp@...org
Subject: [lkp-robot] [locking/lockdep]  2dcd5adfb7:
 WARNING:possible_circular_locking_dependency_detected


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

commit: 2dcd5adfb7401b762ddbe4b86dcacc2f3de6b97b ("locking/lockdep: Remove the BROKEN flag from CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS")
https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git locking/core

in testcase: boot

on test machine: qemu-system-i386 -enable-kvm -m 256M

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


+-------------------------------------------------------+------------+------------+
|                                                       | d141babe42 | 2dcd5adfb7 |
+-------------------------------------------------------+------------+------------+
| boot_successes                                        | 20         | 0          |
| boot_failures                                         | 0          | 20         |
| WARNING:possible_circular_locking_dependency_detected | 0          | 20         |
| BUG:kernel_hang_in_test_stage                         | 0          | 16         |
+-------------------------------------------------------+------------+------------+



[    4.442653] WARNING: possible circular locking dependency detected
[    4.443206] 4.14.0-rc6-00050-g2dcd5ad #1 Not tainted
[    4.443648] ------------------------------------------------------
[    4.444200] kworker/0:1/15 is trying to acquire lock:
[    4.444661]  (ww_class_mutex){+.+.}, at: [<b110af92>] test_abba_work+0x3b/0x167
[    4.445354] 
[    4.445354] but now in release context of a crosslock acquired at the following:
[    4.446160]  ((completion)&abba.b_ready){+.+.}, at: [<b1baf438>] wait_for_common+0x1b/0x2b
[    4.446899] 
[    4.446899] which lock already depends on the new lock.
[    4.446899] 
[    4.447622] 
[    4.447622] the existing dependency chain (in reverse order) is:
[    4.448297] 
[    4.448297] -> #1 ((completion)&abba.b_ready){+.+.}:
[    4.448912]        save_stack_trace+0x1e/0x2e
[    4.449336]        __lock_acquire+0x1554/0x1ea3
[    4.449797]        save_trace+0x0/0xfc
[    4.450156]        lock_acquire+0x25f/0x368
[    4.450414]        wait_for_common+0x1b/0x2b
[    4.450414]        __wait_for_common+0x72/0x44b
[    4.450414]        wait_for_common+0x1b/0x2b
[    4.450414]        mark_held_locks+0x98/0xcb
[    4.450414]        schedule_timeout+0x0/0x129
[    4.450414]        trace_hardirqs_on_caller+0x353/0x3ac
[    4.450414]        wait_for_common+0x1b/0x2b
[    4.450414]        wait_for_completion+0x1d/0x2c
[    4.450414]        test_abba+0x180/0x351
[    4.450414]        test_abba_work+0x0/0x167
[    4.450414]        test_abba+0x14c/0x351
[    4.450414]        complete+0x1d/0x95
[    4.450414]        ww_acquire_fini+0x20/0xca
[    4.450414]        test_aa+0x161/0x17a
[    4.450414]        test_aa+0x4d/0x17a
[    4.450414]        test_ww_mutex_init+0x17f/0x694
[    4.450414]        _raw_spin_unlock_irqrestore+0xbb/0x13e
[    4.450414]        add_device_randomness+0x29d/0x368
[    4.450414]        test_ww_mutex_init+0x0/0x694
[    4.450414]        do_one_initcall+0x108/0x279
[    4.450414]        do_early_param+0xee/0x1a1
[    4.450414]        kernel_init_freeable+0x2b6/0x494
[    4.450414]        kernel_init_freeable+0x2b6/0x494
[    4.450414]        kernel_init_freeable+0x2ed/0x494
[    4.450414]        kernel_init+0x0/0x231
[    4.450414]        kernel_init+0x13/0x231
[    4.450414]        ret_from_fork+0x19/0x30
[    4.450414] 
[    4.450414] -> #0 (ww_class_mutex){+.+.}:
[    4.450414]        test_abba_work+0x3b/0x167
[    4.450414] 
[    4.450414] other info that might help us debug this:
[    4.450414] 
[    4.450414]  Possible unsafe locking scenario by crosslock:
[    4.450414] 
[    4.450414]        CPU0                    CPU1
[    4.450414]        ----                    ----
[    4.450414]   lock(ww_class_mutex);
[    4.450414]   lock((completion)&abba.b_ready);
[    4.450414]                                lock(ww_class_mutex);
[    4.450414]                                unlock((completion)&abba.b_ready);
[    4.450414] 
[    4.450414]  *** DEADLOCK ***
[    4.450414] 
[    4.450414] 5 locks held by kworker/0:1/15:
[    4.450414]  #0:  ("events"){+.+.}, at: [<b10b18cc>] process_one_work+0x210/0x9bd
[    4.450414]  #1:  ((&abba.work)){+.+.}, at: [<b10b18cc>] process_one_work+0x210/0x9bd
[    4.450414]  #2:  (ww_class_acquire){+.+.}, at: [<b110af7b>] test_abba_work+0x24/0x167
[    4.450414]  #3:  (ww_class_mutex){+.+.}, at: [<b110af92>] test_abba_work+0x3b/0x167
[    4.450414]  #4:  (&x->wait#6){....}, at: [<b10edca2>] complete+0x1d/0x95
[    4.450414] 
[    4.450414] stack backtrace:
[    4.450414] CPU: 0 PID: 15 Comm: kworker/0:1 Not tainted 4.14.0-rc6-00050-g2dcd5ad #1
[    4.450414] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[    4.450414] Workqueue: events test_abba_work
[    4.450414] Call Trace:
[    4.450414]  ? dump_stack+0x1a0/0x240
[    4.450414]  ? print_circular_bug+0x5b7/0x5d0
[    4.450414]  ? check_prev_add+0xaf/0x448
[    4.450414]  ? lock_commit_crosslock+0x660/0x6ac
[    4.450414]  ? debug_locks_off_graph_unlock+0x35/0x35
[    4.450414]  ? complete+0x35/0x95
[    4.450414]  ? test_abba_work+0x57/0x167
[    4.450414]  ? process_one_work+0x47f/0x9bd
[    4.450414]  ? worker_thread+0x371/0x594
[    4.450414]  ? kthread+0x1f3/0x206
[    4.450414]  ? mod_delayed_work_on+0xf1/0xf1
[    4.450414]  ? list_del_init+0x63/0x63
[    4.450414]  ? ret_from_fork+0x19/0x30
[    4.981673] tsc: Refined TSC clocksource calibration: 2925.995 MHz
[    4.982283] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2a2d2f8b9e6, max_idle_ns: 440795279943 ns
[   10.597299] rcu-perf:--- Start of test: nreaders=0 nwriters=1 verbose=1 shutdown=1
[   10.598377] rcu-torture: Creating rcu_perf_shutdown task
[   10.613441] rcu-torture: Creating rcu_perf_writer task
[   10.623613] rcu-perf: rcu_perf_writer task started
[   11.164456] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[   11.165375] zbud: loaded
[   11.165887] ntfs: driver 2.1.32 [Flags: R/O DEBUG].
[   11.225456] gfs2: GFS2 installed
[   11.234806] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[   11.235535] io scheduler noop registered (default)
[   11.235973] io scheduler mq-deadline registered


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

View attachment "config-4.14.0-rc6-00050-g2dcd5ad" of type "text/plain" (94249 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ