Bug 2025367

Summary: Multiple concurrent lv refreshes fail
Product: Red Hat Enterprise Linux 8 Reporter: Germano Veit Michel <gveitmic>
Component: lvm2Assignee: David Teigland <teigland>
lvm2 sub component: Default / Unclassified QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: agk, cmarthal, heinzm, jbrassow, mcsontos, mgokhool, msnitzer, prajnoha, sfroemer, teigland, vjuranek, zkabelac
Version: 8.5Keywords: Triaged, ZStream
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.14-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2040514 (view as bug list) Environment:
Last Closed: 2022-05-10 15:22:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2020497, 2040514    

Description Germano Veit Michel 2021-11-22 00:37:11 UTC
Description of problem:

As seen in BZ2020497, there is an LVM bug which shows up when doing multiple concurrent refreshes of an already active an open LV:

Doing multiple of these triggers the issue:

$ lvchange --config 'devices {  preferred_names=["^/dev/mapper/"]  ignore_suspended_devices=1  write_cache_state=0  disable_after_error_count=3  filter=["a|^/dev/mapper/360014058e776cbadb02fd473edb913d2$|", "r|.*|"]  hints="none"  obtain_device_list_from_udev=0 } global {  locking_type=1  prioritise_write_locks=1  wait_for_locks=1  use_lvmetad=0  use_lvmpolld=1 } backup {  retain_min=50  retain_days=0 }' --refresh 2f93a595-a602-4bfc-b35e-9e78b89f27b4/b2ab8b07-a2aa-408a-a4b4-4cd64a7f0292; done

This bug is to track a 8.5.z request, as it is already fixed in 8.6/9 according to https://bugzilla.redhat.com/show_bug.cgi?id=2020497#c12

Version-Release number of selected component (if applicable):
lvm2-2.03.11-5.el8.x86_64
vdsm-4.40.80.6-1.el8ev.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Multiple concurrent lv refresh.

Actual results:
  Releasing activation in critical section.
  Releasing activation in critical section.
  libdevmapper exiting with 1 device(s) still suspended.
  device-mapper: resume ioctl on  (253:22) failed: Invalid argument
  Unable to resume 2f93a595--a602--4bfc--b35e--9e78b89f27b4-b2ab8b07--a2aa--408a--a4b4--4cd64a7f0292 (253:22).
  Failed to reactivate 2f93a595-a602-4bfc-b35e-9e78b89f27b4/b2ab8b07-a2aa-408a-a4b4-4cd64a7f0292.

Comment 4 David Teigland 2021-12-10 17:45:44 UTC
The fix is already included in the latest lvm builds, but pretending it didn't so that "the process" works to eventually get to zstream...

Comment 7 Corey Marthaler 2021-12-22 03:26:58 UTC
Running the loop mentioned above from multiple processes does not cause the refresh cmds to fail with the latest rpms. Marking Verified:Tested.

kernel-4.18.0-355.el8.kpq0    BUILT: Wed Dec 15 13:27:55 CST 2021
lvm2-2.03.14-2.el8    BUILT: Fri Dec 17 14:39:40 CST 2021
lvm2-libs-2.03.14-2.el8    BUILT: Fri Dec 17 14:39:40 CST 2021

[root@hayes-01 ~]# lvs | wc -l
908
[root@hayes-01 ~]# pvscan
  PV /dev/sdb1   VG snapper_thinp   lvm2 [<1.82 TiB / <1.82 TiB free]

while true; do lvchange --config 'devices {  preferred_names=["^/dev/mapper/"]  ignore_suspended_devices=1  write_cache_state=0  disable_after_error_count=3  filter=["a|^/dev/sdb1|", "r|.*|"]  hints="none"  obtain_device_list_from_udev=0 } global {  locking_type=1  prioritise_write_locks=1  wait_for_locks=1  use_lvmetad=0  use_lvmpolld=1 } backup {  retain_min=50  retain_days=0 }' --refresh snapper_thinp;

Comment 11 Corey Marthaler 2022-01-06 16:03:26 UTC
The loop test in comment #7 passes in the latest lvm2 build as well. Marking Verified.

kernel-4.18.0-355.el8.kpq0    BUILT: Wed Dec 15 13:27:55 CST 2021
lvm2-2.03.14-3.el8    BUILT: Tue Jan  4 14:54:16 CST 2022
lvm2-libs-2.03.14-3.el8    BUILT: Tue Jan  4 14:54:16 CST 2022

Comment 17 David Teigland 2022-01-25 15:21:12 UTC
I think the next step is to do a build, adding Marian.

Comment 20 errata-xmlrpc 2022-05-10 15:22:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2038

Comment 21 Red Hat Bugzilla 2023-09-15 01:50:07 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days