Bug 1006059 - thin_check hangs if given a non existent dump file to restore from
thin_check hangs if given a non existent dump file to restore from
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: device-mapper-persistent-data (Show other bugs)
6.5
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Joe Thornber
yanfu,wang
:
Depends On: 966264
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-09 18:32 EDT by Corey Marthaler
Modified: 2013-11-21 18:00 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 966264
Environment:
Last Closed: 2013-11-21 18:00:12 EST
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 Corey Marthaler 2013-09-09 18:32:45 EDT
Exists in rhel6.5 as well (device-mapper-persistent-data-0.2.6-1.el6).

+++ This bug was initially created as a clone of Bug #966264 +++

Description of problem:
[root@qalvm-01 ~]# lvs -a -o +devices
  LV           VG            Attr      LSize  Pool Origin Data%  Devices
  POOL         snapper_thinp twi-a-tz-  1.00g               0.00 POOL_tdata(0)
  [POOL_tdata] snapper_thinp Twi-aot--  1.00g                    /dev/vdh1(0)
  [POOL_tmeta] snapper_thinp ewi-aot--  4.00m                    /dev/vde1(0)
  origin       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other1       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other2       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other3       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other4       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other5       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  restore      snapper_thinp Vwi-a-tz-  1.00g POOL origin   0.00

[root@qalvm-01 ~]# strace thin_restore -i file_that_doesnt_exist -o /dev/mapper/snapper_thinp-POOL_tmeta
[...]
open("/dev/mapper/snapper_thinp-POOL_tmeta", O_RDWR) = 3
open("file_that_doesnt_exist", O_RDONLY) = -1 ENOENT (No such file or directory)
[HANGS]

Version-Release number of selected component (if applicable):
3.8.0-0.40.el7.x86_64

lvm2-2.02.99-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013
lvm2-libs-2.02.99-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013
lvm2-cluster-2.02.99-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013
device-mapper-1.02.78-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013
device-mapper-libs-1.02.78-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013
device-mapper-event-1.02.78-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013
device-mapper-event-libs-1.02.78-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013
cmirror-2.02.99-0.34.el7    BUILT: Thu May 16 19:28:08 CDT 2013


How reproducible:
Everytime
Comment 2 Joe Thornber 2013-09-16 08:49:08 EDT
Fixed upstream in v0.2.7
Comment 4 Heinz Mauelshagen 2013-09-17 09:42:17 EDT
v0.2.7 build to be dispatched.
Comment 6 yanfu,wang 2013-10-08 03:44:54 EDT
Verified on device-mapper-persistent-data-0.2.7-1.el6:
# strace thin_restore -i file_that_doesnt_exist -o /dev/mapper/snapper_thinp-pool_tmeta 
execve("/usr/sbin/thin_restore", ["thin_restore", "-i", "file_that_doesnt_exist", "-o", "/dev/mapper/snapper_thinp-pool_t"...], [/* 37 vars */]) = 0
brk(0)                                  = 0xcea000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8423fb000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=45894, ...}) = 0
mmap(NULL, 45894, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc8423ef000
close(3)                                = 0
open("/usr/lib64/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360c\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=987096, ...}) = 0
mmap(NULL, 3166648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc841ed7000
mprotect(0x7fc841fbf000, 2097152, PROT_NONE) = 0
mmap(0x7fc8421bf000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe8000) = 0x7fc8421bf000
mmap(0x7fc8421c8000, 82360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc8421c8000
close(3)                                = 0
open("/lib64/libexpat.so.1", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320<\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=165264, ...}) = 0
mmap(NULL, 2260432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc841caf000
mprotect(0x7fc841cd5000, 2093056, PROT_NONE) = 0
mmap(0x7fc841ed4000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7fc841ed4000
close(3)                                = 0
open("/lib64/libm.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p>\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596264, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8423ee000
mmap(NULL, 2633912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc841a2b000
mprotect(0x7fc841aae000, 2093056, PROT_NONE) = 0
mmap(0x7fc841cad000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x82000) = 0x7fc841cad000
close(3)                                = 0
open("/lib64/libgcc_s.so.1", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20)\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=90880, ...}) = 0
mmap(NULL, 2186584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc841815000
mprotect(0x7fc84182b000, 2093056, PROT_NONE) = 0
mmap(0x7fc841a2a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7fc841a2a000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\356\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1921216, ...}) = 0
mmap(NULL, 3750152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc841481000
mprotect(0x7fc84160c000, 2093056, PROT_NONE) = 0
mmap(0x7fc84180b000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x7fc84180b000
mmap(0x7fc841810000, 18696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc841810000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8423ed000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8423eb000
arch_prctl(ARCH_SET_FS, 0x7fc8423eb720) = 0
mprotect(0x7fc84180b000, 16384, PROT_READ) = 0
mprotect(0x7fc841cad000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8423ea000
mprotect(0x7fc8421bf000, 28672, PROT_READ) = 0
mprotect(0x7fc8423fc000, 4096, PROT_READ) = 0
munmap(0x7fc8423ef000, 45894)           = 0
brk(0)                                  = 0xcea000
brk(0xd0b000)                           = 0xd0b000
stat("/dev/mapper/snapper_thinp-pool_tmeta", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 6), ...}) = 0
open("/dev/mapper/snapper_thinp-pool_tmeta", O_RDONLY) = 3
ioctl(3, BLKGETSIZE64, 0x7fff6d98c620)  = 0
close(3)                                = 0
stat("/dev/mapper/snapper_thinp-pool_tmeta", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 6), ...}) = 0
open("/dev/mapper/snapper_thinp-pool_tmeta", O_RDWR) = 3
stat("file_that_doesnt_exist", 0x7fff6d98cac0) = -1 ENOENT (No such file or directory)
write(2, "Couldn't stat file", 18Couldn't stat file)      = 18
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
[root@storageqe-17 ~]# echo $?
1
Comment 7 errata-xmlrpc 2013-11-21 18:00:12 EST
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.

http://rhn.redhat.com/errata/RHEA-2013-1696.html

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