Bug 1477998 - pdata_tools killed by SIGABRT after cache_restore --debug-override-metadata-version $bad_version
pdata_tools killed by SIGABRT after cache_restore --debug-override-metadata-v...
Status: VERIFIED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-persistent-data (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Joe Thornber
Jakub Krysl
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-03 08:26 EDT by Jakub Krysl
Modified: 2017-09-22 09:31 EDT (History)
6 users (show)

See Also:
Fixed In Version: device-mapper-persistent-data-0.7.2-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jakub Krysl 2017-08-03 08:26:44 EDT
Description of problem:
Running cache_restore with option "--debug-override-metadata-version" with specified wrong metadata version leads to SIGABRT.

Version-Release number of selected component (if applicable):
0.7.0-0.1.rc6.el7

How reproducible:
100%

Steps to Reproduce:
1.get valid metada input and output
2.cache_restore -i metadata -o metadata2 --debug-override-metadata-version $bad_version

Actual results:
[root@storageqe-21 cache]# cache_restore -i metadata -o metadata2 --debug-override-metadata-version 1
Restoring: [==================================================]   100%
[root@storageqe-21 cache]# cache_restore -i metadata -o metadata2 --debug-override-metadata-version 2
cache_restore: /usr/include/boost/optional/optional.hpp:631: boost::optional<T>::reference_type boost::optional<T>::get() [with T = long unsigned int; boost::optional<T>::reference_type = long unsigned int&]: Assertion `this->is_initialized()' failed.
Aborted (core dumped)

Expected results:
Either force restore or warning.

Additional info:
Aug  3 08:15:40 localhost abrt-hook-ccpp: Process 12534 (pdata_tools) of user 0 killed by SIGABRT - dumping core
Comment 2 Joe Thornber 2017-09-15 11:00:18 EDT
Fixed by recent changes.  Passing test here:

https://github.com/jthornber/thin-provisioning-tools/blob/master/functional-tests/cache-functional-tests.scm#L207

New release in next few days.
Comment 4 Jakub Krysl 2017-09-22 09:31:20 EDT
Fixed in device-mapper-persistent-data-0.7.2-1.el7


# cache_restore -i /tmp/metadata -o /dev/mapper/vgtest-swapvol --debug-override-metadata-version 2134654
Restoring: [==================================================]   100%
# cache_check /dev/mapper/vgtest-swapvol
examining superblock
  superblock is invalid
    version incorrect: 2134654

# cache_restore -i /tmp/metadata -o /dev/mapper/vgtest-swapvol --debug-override-metadata-version 1
Restoring: [==================================================]   100%
# cache_check /dev/mapper/vgtest-swapvol
examining superblock
examining mapping array
examining hint array
examining discard bitset

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