Skip to contentSkip to conversation

New: Locking API testsuite fails "mixed read-lock/lock-write ABBA" rlock on kernels >=4.14.x

Bug 203647 [email protected] 1 participant 8 messages May 19, 2019 – Jul 16, 2019

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=203647

Bug ID: 203647
Summary: Locking API testsuite fails "mixed
read-lock/lock-write ABBA" rlock on kernels >=4.14.x
Product: Platform Specific/Hardware
Version: 2.5
Kernel Version: 5.1.3
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: PPC-64
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Created attachment 282831
--> https://bugzilla.kernel.org/attachment.cgi?id=282831&action=edit
dmesg (5.1.3, G5 11,2)

Probably this test fails on ppc64 since it is around. Kernel 4.9.x passes all tests, since it does not seem to contain "mixed read-lock/lock-write ABBA".

Machine is a PowerMac G5 11,2 running Gentoo Linux ppc64, Big Endian, 4 KiB pagesize.

[    0.002051] ------------------------
[    0.002065] | Locking API testsuite:
[    0.002079]
----------------------------------------------------------------------------
[    0.002111]                                  | spin |wlock |rlock |mutex |
wsem | rsem |
[    0.002142]  
--------------------------------------------------------------------------
[    0.002179]                      A-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.007366]                  A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.012471]              A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.017598]              A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.022740]          A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.027912]          A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.033083]          A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.038269]                     double unlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.043319]                   initialize held:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.048379]  
--------------------------------------------------------------------------
[    0.048411]               recursive read-lock:             |  ok  |         
   |  ok  |
[    0.049894]            recursive read-lock #2:             |  ok  |         
   |  ok  |
[    0.051375]             mixed read-write-lock:             |  ok  |         
   |  ok  |
[    0.052859]             mixed write-read-lock:             |  ok  |         
   |  ok  |
[    0.054333]   mixed read-lock/lock-write ABBA:             |FAILED|         
   |  ok  |
[    0.055802]    mixed read-lock/lock-read ABBA:             |  ok  |         
   |  ok  |
[    0.057290]  mixed write-lock/lock-write ABBA:             |  ok  |         
   |  ok  |
[    0.058771]  

--------------------------------------------------------------------------

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 203647] Locking API testsuite fails "mixed read-lock/lock-write ABBA" rlock on kernels >=4.14.x

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=203647

--- Comment #2 from Erhard F. ([email protected]) --- Created attachment 282835
--> https://bugzilla.kernel.org/attachment.cgi?id=282835&action=edit
dmesg (4.19.44, G5 11,2)

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 203647] Locking API testsuite fails "mixed read-lock/lock-write ABBA" rlock on kernels >=4.14.x

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=203647

--- Comment #3 from Erhard F. ([email protected]) --- Created attachment 282837
--> https://bugzilla.kernel.org/attachment.cgi?id=282837&action=edit
dmesg (4.14.120, G5 11,2)

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 203647] Locking API testsuite fails "mixed read-lock/lock-write ABBA" rlock on kernels >=4.14.x

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=203647

--- Comment #4 from Erhard F. ([email protected]) --- Created attachment 282839
--> https://bugzilla.kernel.org/attachment.cgi?id=282839&action=edit
dmesg (4.9.177, G5 11,2)

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#5 lore raw

[Bug 203647] Locking API testsuite fails "mixed read-lock/lock-write ABBA" rlock on kernels >=4.14.x

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=203647

--- Comment #5 from Erhard F. ([email protected]) --- Created attachment 282841
--> https://bugzilla.kernel.org/attachment.cgi?id=282841&action=edit
kernel .config (5.1.3, G5 11,2)

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#6 lore raw

[Bug 203647] Locking API testsuite fails "mixed read-lock/lock-write ABBA" rlock on kernels >=4.14.x

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=203647

Michael Ellerman ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |DOCUMENTED

--- Comment #6 from Michael Ellerman ([email protected]) --- This appears to be working as expected, which I admit is a little confusing.

The key thing is that at the end you see, eg:

  [    0.179788] Good, all 261 testcases passed! |

See the commit that added the test:

https://git.kernel.org/torvalds/c/e91498589746

locking/lockdep/selftests: Add mixed read-write ABBA tests

Currently lockdep has limited support for recursive readers, add a few mixed read-write ABBA selftests to show the extend of these limitations.

And in the code:

        print_testname("mixed read-lock/lock-write ABBA");
        pr_cont("             |");
        dotest(rlock_ABBA1, FAILURE, LOCKTYPE_RWLOCK);
#ifdef CONFIG_PROVE_LOCKING
        /*
         * Lockdep does indeed fail here, but there's nothing we can do about
         * that now.  Don't kill lockdep for it.
         */
        unexpected_testcase_failures--;

#endif

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#7 lore raw

[Bug 203647] Locking API testsuite fails "mixed read-lock/lock-write ABBA" rlock on kernels >=4.14.x

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=203647

Anatoly Pugachev ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #7 from Anatoly Pugachev ([email protected]) --- it's the same for sparc64:

`

[    0.000020] PROMLIB: Sun IEEE Boot Prom 'OBP 4.38.12 2018/03/28 14:54'
[    0.000032] PROMLIB: Root node compatible: sun4v
[    0.000080] Linux version 5.2.0-10808-g9637d517347e (mator@ttip) (gcc
version 8.3.0 (Debian 8.3.0-7)) #1080 SMP Tue Jul 16 10:46:19 MSK 2019
[    0.000386] printk: bootconsole [earlyprom0] enabled
[    0.000441] ARCH: SUN4V
...
[    0.451068]  memory used by lock dependency info: 3855 kB
[    0.451104]  per task-struct memory footprint: 1920 bytes
[    0.451140] ------------------------
[    0.451167] | Locking API testsuite:
[    0.451194]
----------------------------------------------------------------------------
[    0.451244]                                  | spin |wlock |rlock |mutex |
wsem | rsem |
[    0.451294]  
--------------------------------------------------------------------------
[    0.451350]                      A-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.454281]                  A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.457443]              A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.460744]              A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.464032]          A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.467545]          A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.471009]          A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.474475]                     double unlock:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.477425]                   initialize held:  ok  |  ok  |  ok  |  ok  | 
ok  |  ok  |  ok  |
[    0.480301]  
--------------------------------------------------------------------------
[    0.480352]               recursive read-lock:             |  ok  |         
   |  ok  |
[    0.481247]            recursive read-lock #2:             |  ok  |         
   |  ok  |
[    0.482120]             mixed read-write-lock:             |  ok  |         
   |  ok  |
[    0.482998]             mixed write-read-lock:             |  ok  |         
   |  ok  |
[    0.483878]   mixed read-lock/lock-write ABBA:             |FAILED|         
   |  ok  |
[    0.484755]    mixed read-lock/lock-read ABBA:             |  ok  |         
   |  ok  |
[    0.485676]  mixed write-lock/lock-write ABBA:             |  ok  |         
   |  ok  |
[    0.486597]  

--------------------------------------------------------------------------
`

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.