Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
There was a race while two or more snapper commands were about to mount (or unmount) same filesystem snapshot on same snapper configured filesystem. Usually the race occurred while first command created 'post' type snapshot on a snapper config with allowed background comparison and the second command was trying to access the very same snapshot. Only the LVM2 thin provisioning backend with arbitrary filesystem on top was affected.
As an impact of that race occasionally snapper 'status' command initiated right after the other command triggering background comparison failed with following error message:
# snapper -c my_config status 1..2
Failure (error.mount_snapshot)
With the current fix the mount and umount operations are serialised properly via mutex per each snapper config (configured LVM2 backend).
DescriptionBruno Goncalves
2015-09-11 13:49:21 UTC
Description of problem:
Failed to create snaphost on RHEL-7.2 Snapshot#2 on aarch64
snapper -c bugtest status <number1>..<number2>
Failure (error.mount_snapshot).
Version-Release number of selected component (if applicable):
snapper-0.1.7-10.el7.aarch64
kernel-4.2.0-0.19.el7.aarch64
How reproducible:
it seems easily reproducible on aarch64
Steps to Reproduce:
1. Create thinp volume
# lvcreate -L5G -T rhel_hp-moonshot-02-c03/pool -V 30G --name thin_lv
2. Create a FS on the device and mount it
# mkfs.xfs -f /dev/mapper/rhel_hp--moonshot--02--c03-thin_lv
# mkdir /mnt/test
# mount /dev/mapper/rhel_hp--moonshot--02--c03-thin_lv /mnt/test
3. Add new user and create snapper config
# useradd -m dummy_a
# chown dummy_a:dummy_a /mnt/test
# snapper -c bugtest create-config -f "lvm(xfs)" /mnt/test
# su - dummy_a
4. Run the reproducer from bz#1229353
# for i in $(seq 1 800000); do mkdir ./dir_$i; touch ./dir_$i/file_$i; done
# exit
# snapper -c bugtest list
5. Create snapshoty
# snapper -c bugtest create -t pre -p
<number1>
# snapper -c bugtest list
# su - dummy_a
# chmod -R g-w /mnt/test
# exit
# snapper -c bugtest create -t post --pre-num <number1> -p
<number2>
# snapper -c bugtest status <number1>..<number2>
Failure (error.mount_snapshot).
Sigh...there's a race in snapper daemon.
Background job doesn't hold a lock while mounting snapshot. The "status" thread tests whether snapshot is mounted and gets negative result. While trying to mount the snapshot the second "background" thread already mounted the snapshot and "status" thread obviously fails with -EBUSY.
As a workaround you may add a short sleep between last two commands:
snapper -c bugtest create -t post --pre-num <number1> -p
<number2>
--- >sleep 1
snapper -c bugtest status <number1>..<number2>
The problem happens sometimes when trying to get snapshot status.
# snapper -c bugtest list
Type | # | Pre # | Date | User | Cleanup | Description | Userdata
-------+---+-------+------------------------------+------+---------+-------------+---------
single | 0 | | | root | | current |
single | 1 | | Fri 12 Aug 2016 02:33:35 EDT | root | | |
pre | 2 | | Fri 12 Aug 2016 02:33:36 EDT | root | | |
post | 3 | 2 | Fri 12 Aug 2016 02:33:36 EDT | root | | |
# snapper -c bugtest status 2..3
Failure (error.mount_snapshot).
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, 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://rhn.redhat.com/errata/RHBA-2016-2481.html