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.
Description of problem:
Running thin_rmap from file that won't pass thin_check (block out of bounds) leads to segmentation fault. This file can even be random existing one.
[root@storageqe-21 thin]# thin_check /tmp/metadata_repair
examining superblock
examining devices tree
examining mapping tree
checking space map counts
[root@storageqe-21 thin]# thin_rmap --region 0..-1 /tmp/metadata_repair
data 0..3 -> thin(1) 0..3
data 3..19 -> thin(1) 8..24
data 19..20 -> thin(1) 128..129
data 20..21 -> thin(1) 191..192
data 21..24 -> thin(2) 0..3
data 24..40 -> thin(2) 8..24
data 40..41 -> thin(2) 128..129
data 41..42 -> thin(2) 191..192
data 42..45 -> thin(3) 0..3
data 45..61 -> thin(3) 8..24
data 61..62 -> thin(3) 128..129
data 62..63 -> thin(3) 191..192
data 63..66 -> thin(4) 0..3
data 66..82 -> thin(4) 8..24
data 82..83 -> thin(4) 128..129
data 83..84 -> thin(4) 191..192
data 84..87 -> thin(5) 0..3
data 87..103 -> thin(5) 8..24
data 103..104 -> thin(5) 128..129
data 104..105 -> thin(5) 191..192
data 105..108 -> thin(6) 0..3
data 108..124 -> thin(6) 8..24
data 124..125 -> thin(6) 128..129
data 125..126 -> thin(6) 191..192
data 126..129 -> thin(7) 0..3
data 129..145 -> thin(7) 8..24
data 145..146 -> thin(7) 128..129
data 146..147 -> thin(7) 191..192
data 147..150 -> thin(8) 0..3
data 150..166 -> thin(8) 8..24
data 166..167 -> thin(8) 128..129
data 167..168 -> thin(8) 191..192
data 168..171 -> thin(9) 0..3
data 171..187 -> thin(9) 8..24
data 187..188 -> thin(9) 128..129
data 188..189 -> thin(9) 191..192
data 189..192 -> thin(10) 0..3
data 192..208 -> thin(10) 8..24
data 208..209 -> thin(10) 128..129
data 209..210 -> thin(10) 191..192
[root@storageqe-21 thin]# thin_rmap --region 0..-1 /tmp/metadata
Segmentation fault (core dumped)
[root@storageqe-21 thin]# thin_check /tmp/metadata
examining superblock
superblock is corrupt
block out of bounds (0 >= 0)
Version-Release number of selected component (if applicable):
device-mapper-persistent-data-0.7.0-0.1.rc6.el7
How reproducible:
100%
Steps to Reproduce:
1.thin_rmap $RANDOM_EXISTING_FILE
Actual results:
Segmentation fault (core dumped)
Expected results:
warning saying wrong metadata
Additional info:
The segmentation fault itself is fixed in device-mapper-persistent-data-0.7.3-1.el7, but it is missing newline at the end of "Metadata is not large enough for superblock.".
# thin_check PURPOSE
Metadata device/file too small. Is this binary metadata?
# thin_rmap --region 0..-1 PURPOSE
Metadata is not large enough for superblock.# thin_rmap --region 0..-1 PURPOSE
Metadata is not large enough for superblock.#
Joe, should I create a new BZ for the missing newline char or can you fix it in this one? Thanks
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://access.redhat.com/errata/RHEA-2018:0776
Comment 10Red Hat Bugzilla
2023-09-15 00:03:13 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days
Description of problem: Running thin_rmap from file that won't pass thin_check (block out of bounds) leads to segmentation fault. This file can even be random existing one. [root@storageqe-21 thin]# thin_check /tmp/metadata_repair examining superblock examining devices tree examining mapping tree checking space map counts [root@storageqe-21 thin]# thin_rmap --region 0..-1 /tmp/metadata_repair data 0..3 -> thin(1) 0..3 data 3..19 -> thin(1) 8..24 data 19..20 -> thin(1) 128..129 data 20..21 -> thin(1) 191..192 data 21..24 -> thin(2) 0..3 data 24..40 -> thin(2) 8..24 data 40..41 -> thin(2) 128..129 data 41..42 -> thin(2) 191..192 data 42..45 -> thin(3) 0..3 data 45..61 -> thin(3) 8..24 data 61..62 -> thin(3) 128..129 data 62..63 -> thin(3) 191..192 data 63..66 -> thin(4) 0..3 data 66..82 -> thin(4) 8..24 data 82..83 -> thin(4) 128..129 data 83..84 -> thin(4) 191..192 data 84..87 -> thin(5) 0..3 data 87..103 -> thin(5) 8..24 data 103..104 -> thin(5) 128..129 data 104..105 -> thin(5) 191..192 data 105..108 -> thin(6) 0..3 data 108..124 -> thin(6) 8..24 data 124..125 -> thin(6) 128..129 data 125..126 -> thin(6) 191..192 data 126..129 -> thin(7) 0..3 data 129..145 -> thin(7) 8..24 data 145..146 -> thin(7) 128..129 data 146..147 -> thin(7) 191..192 data 147..150 -> thin(8) 0..3 data 150..166 -> thin(8) 8..24 data 166..167 -> thin(8) 128..129 data 167..168 -> thin(8) 191..192 data 168..171 -> thin(9) 0..3 data 171..187 -> thin(9) 8..24 data 187..188 -> thin(9) 128..129 data 188..189 -> thin(9) 191..192 data 189..192 -> thin(10) 0..3 data 192..208 -> thin(10) 8..24 data 208..209 -> thin(10) 128..129 data 209..210 -> thin(10) 191..192 [root@storageqe-21 thin]# thin_rmap --region 0..-1 /tmp/metadata Segmentation fault (core dumped) [root@storageqe-21 thin]# thin_check /tmp/metadata examining superblock superblock is corrupt block out of bounds (0 >= 0) Version-Release number of selected component (if applicable): device-mapper-persistent-data-0.7.0-0.1.rc6.el7 How reproducible: 100% Steps to Reproduce: 1.thin_rmap $RANDOM_EXISTING_FILE Actual results: Segmentation fault (core dumped) Expected results: warning saying wrong metadata Additional info: