RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1884689 - libblockdev exec routines lead to deadlock or infinite loop
Summary: libblockdev exec routines lead to deadlock or infinite loop
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libblockdev
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Vojtech Trefny
QA Contact: guazhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-02 16:44 UTC by Tomáš Bžatek
Modified: 2021-09-06 15:29 UTC (History)
2 users (show)

Fixed In Version: libblockdev-2.24-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:42:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tomáš Bžatek 2020-10-02 16:44:40 UTC
Several deficiencies in the libblockdev utils/exec code were found upstream, potentially leading to deadlock or an infinite loop. Tests demonstrating the issues are available.

Fixed upstream: https://github.com/storaged-project/libblockdev/pull/572


Steps to reproduce:
 1. create and activate 400 or more LVM snapshots
 2. start udisksd, observe infinite loop

Since UDisks and possibly other tools use this libblockdev functionality, it's only a matter of time until this issue demonstrates on the client side.

Comment 3 guazhang@redhat.com 2020-11-23 07:44:22 UTC
Hi,

I can not reproduce the bug with libblockdev-2.24-2.el8, Could you please provides more details.


test steps:


pvcreate  /dev/sdb
vgcreate   myvol  /dev/sdb
lvcreate -L 200G  -n  date  myvol
mkfs.xfs /dev/myvol/date
mkdir -p test
mount   /dev/myvol/date test
for i in {1..400};do
    touch test/txt$i
    lvcreate  -L 10M  -p  r  -s  -n  datesnap$i  /dev/myvol/date
done
systemctl restart udisks2

Comment 4 Vojtech Trefny 2020-11-23 12:50:38 UTC
UDisks should still work but you should see stuck lvm processes and UDisks threads waiting for output on the system. I'm changing the needinfo to Tomáš, he might provide a more detailed reproducer.

Btw. we also added a good regression test for this bug, so it might be enough to check that "test_exec_buffer_bloat" passed in the gating.

Comment 5 Tomáš Bžatek 2020-11-26 16:53:29 UTC
You need to have the `lvm2` module activated in UDisks. Use
> gdbus call -y -d org.freedesktop.UDisks2 -o /org/freedesktop/UDisks2/Manager -m org.freedesktop.UDisks2.Manager.EnableModule -- lvm2 true

to enable it.

Then you can use either your reproducer or find inspiration in my loadtests: https://github.com/storaged-project/udisks/pull/814

Please note the issue is not lvm2-specific and certain tools may trigger that as well (we've had reports about dumpe2fs calls AFAIR).

Comment 6 guazhang@redhat.com 2020-11-30 01:41:45 UTC
Thanks for the guide.

Don't hit the bug with fixed package, move to verified.

Comment 8 errata-xmlrpc 2021-05-18 15:42:31 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 (libblockdev 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-2021:1820


Note You need to log in before you can comment on or make changes to this bug.