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 1902515 - Calling release_metadata_snap causes device-mapper: space map common: ref count insert failed
Summary: Calling release_metadata_snap causes device-mapper: space map common: ref co...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Joe Thornber
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-29 21:08 UTC by bugzilla
Modified: 2022-05-29 07:27 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-29 07:27:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description bugzilla 2020-11-29 21:08:40 UTC
Description of problem:

A few days ago I ran a reserve_metadata_snap to do some large metadata dumps. During that time the metadata usage went from 85% to 98% so there was a large amount of new meta. When I ran release_metadata_snap the kernel started spewing errors, so many that I have organized them into counts to represent which ones are most common:

~]# dmesg | cut -c17-|sort |uniq -c | sort -n
     30 device-mapper: space map metadata: unable to allocate new metadata block
   1639 device-mapper: space map common: dm_tm_shadow_block() failed
  12793 device-mapper: space map common: ref count insert failed


Version-Release number of selected component (if applicable):

We are running Linux 4.19.93 on el7.8.  If this is a known issue that has been fixed and a RH kernel or upstream patch has not hit 4.19, then please link to the patch so we can apply it.

How reproducible:

Not sure.

Steps to Reproduce:
1. dmsetup message /dev/mapper/data-data--pool-tpool 0 reserve_metadata_snap
2. make a bunch of snapshots while doing parallel IO on multiple snapshots
3. wait a while
4. dmsetup message /dev/mapper/data-data--pool-tpool 0 release_metadata_snap

Actual results:

Lots of kernel messages, possibly metadata corruption.

Expected results:

Should just release the metadata snap


Additional info:

This document indicates: Documentation/device-mapper/thin-provisioning.txt
  Snapshots are created with another message to the pool.
  N.B.  If the origin device that you wish to snapshot is active, you
  must suspend it before creating the snapshot to avoid corruption.
  This is NOT enforced at the moment, so please be careful!

However, it does not mention that reserve/release_metadata_snap should be called while suspended.

This bug looks related, and supposes that metadata reserve/release might be invoked while suspending the pool, "But [Mike Snitzer] checked with Joe and he said that the suspend is only needed to get consistent usage info (and all mappings, associated with outstanding IO, on disk).  The thin-pool suspend isn't required to avoid crashes that were reported"
  https://bugzilla.redhat.com/show_bug.cgi?id=1286500

If reserve/release does need to operate while suspended then perhaps it would be a good idea to update documentation and provide a printk error when calling reserve/release so the user can be informed that suspend is necessary.

Comment 6 RHEL Program Management 2022-05-29 07:27:22 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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