Red Hat Bugzilla – Bug 1006059
thin_check hangs if given a non existent dump file to restore from
Last modified: 2013-11-21 18:00:12 EST
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
Fixed upstream in v0.2.7
https://github.com/jthornber/thin-provisioning-tools/commit/7ce306cb6d42dbce6712d9cb93ddd717521720cb
v0.2.7 build to be dispatched.
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
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