Dear people of linux-btrfs: Thank you for btrfs! It is a beautiful thing. I say that in spite of the fact that it seems to have failed and eaten some of my data.
I'm writing with two purposes: to get help and advice in recovering my data, to help debug the software. I was running linux 3.12.26 and btrfsprogs 3.14, and I started getting error messages like these in my syslog: syslog.7:Aug 16 02:32:35 spark kernel: [48524.140611] btrfs no csum found for inode 15537898 start 4096 It happened only for one of the three partitions on this SSD, and smartctl indicated no problem with the disk: SMART overall-health self-assessment test result: PASSED … Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed without error 00% 6406 - # 2 Extended captive Completed without error 00% 6405 - I upgraded my kernel to 3.16.1 and tried the various techniques suggested in https://btrfs.wiki.kernel.org/index.php/Btrfsck and https://btrfs.wiki.kernel.org/index.php/Problem_FAQ , including `btrfsck check --repair --init-csum-tree`. This didn't fix it. I made an image of the filesystem in case someone wants to diagnose it (78 MB), and I also a made a dd copy of the affected partition. The `btrfs restore` command aborts even though I've passed the -i flag. In fact, I see that on subsequent runs it aborts at different places. Looking at the source code (http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/tree/cmds-restore.c?id=c17d0a73c11d7cdbdf1582408ec6d168876160ea#n819) I don't see how -6 from decompress could cause it to stop when I have set `ignore_errors`, so next I ran it under valgrind. Aha. When it is run under valgrind it consistently stops (killing valgrind, in fact!) in the same way on every run. Here's the tail of stdout and stderr when it aborted when run under valgrind: Restoring ./sda6-btrfs-restore-3/@home/zooko/.mozilla/firefox/ltjwtkwe.ketotic.org/thumbnails/188888af64f6d2871b0f24e325d8a298.png Restoring ./sda6-btrfs-restofailed to inflate: -6 Full valgrind outputs from such a run is attached to this letter. I've spent a little time looking at the stack traces in the valgrind log, and I *guess* that there is corruption such that the decompression fails, and I guess it would be possible to make cmds-restore handle corrupted compressedtext better, so that it would end up skipping whatever files and directories were unrestorable due to corruption. However, I don't immediately see how to proceed. Regards, Zooko Wilcox-O'Hearn Founder, CEO, and Customer Support Rep https://LeastAuthority.com Freedom matters.
==5569== Memcheck, a memory error detector ==5569== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==5569== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==5569== Command: btrfs restore -v -v -v -i /dev/sda6 ./sda6-btrfs-restore-3 ==5569== Parent PID: 5566 ==5569== ==5569== Syscall param pwrite64(buf) points to uninitialised byte(s) ==5569== at 0x56ABD03: __pwrite_nocancel (syscall-template.S:81) ==5569== by 0x41F346: search_dir (cmds-restore.c:392) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x5ce3084 is 18,420 bytes inside a block of size 20,480 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x41EFC3: search_dir (cmds-restore.c:316) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== ==5569== Invalid read of size 1 ==5569== at 0x4C2F95E: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4388E6: read_extent_buffer (string3.h:51) ==5569== by 0x41ED6C: search_dir (cmds-restore.c:233) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== Address 0x5d11260 is 0 bytes after a block of size 4,224 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4381B7: alloc_extent_buffer (extent_io.c:574) ==5569== by 0x42B5D8: btrfs_find_create_tree_block (disk-io.c:133) ==5569== by 0x42CD00: read_tree_block (disk-io.c:265) ==5569== by 0x427407: read_node_slot (ctree.c:634) ==5569== by 0x42A1A5: btrfs_search_slot (ctree.c:1113) ==5569== by 0x41EA5A: search_dir (cmds-restore.c:567) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== ==5569== Invalid read of size 1 ==5569== at 0x4C2F950: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4388E6: read_extent_buffer (string3.h:51) ==5569== by 0x41ED6C: search_dir (cmds-restore.c:233) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== Address 0x5d11262 is 2 bytes after a block of size 4,224 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4381B7: alloc_extent_buffer (extent_io.c:574) ==5569== by 0x42B5D8: btrfs_find_create_tree_block (disk-io.c:133) ==5569== by 0x42CD00: read_tree_block (disk-io.c:265) ==5569== by 0x427407: read_node_slot (ctree.c:634) ==5569== by 0x42A1A5: btrfs_search_slot (ctree.c:1113) ==5569== by 0x41EA5A: search_dir (cmds-restore.c:567) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== ==5569== Invalid read of size 2 ==5569== at 0x4C2F7EF: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4388E6: read_extent_buffer (string3.h:51) ==5569== by 0x41ED6C: search_dir (cmds-restore.c:233) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== Address 0x5d4de70 is 0 bytes after a block of size 4,224 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4381B7: alloc_extent_buffer (extent_io.c:574) ==5569== by 0x42B5D8: btrfs_find_create_tree_block (disk-io.c:133) ==5569== by 0x42CD00: read_tree_block (disk-io.c:265) ==5569== by 0x427407: read_node_slot (ctree.c:634) ==5569== by 0x42A1A5: btrfs_search_slot (ctree.c:1113) ==5569== by 0x41EA5A: search_dir (cmds-restore.c:567) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== ==5569== Invalid read of size 2 ==5569== at 0x4C2F7E0: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4388E6: read_extent_buffer (string3.h:51) ==5569== by 0x41ED6C: search_dir (cmds-restore.c:233) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== Address 0x5d4de76 is 6 bytes after a block of size 4,224 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4381B7: alloc_extent_buffer (extent_io.c:574) ==5569== by 0x42B5D8: btrfs_find_create_tree_block (disk-io.c:133) ==5569== by 0x42CD00: read_tree_block (disk-io.c:265) ==5569== by 0x427407: read_node_slot (ctree.c:634) ==5569== by 0x42A1A5: btrfs_search_slot (ctree.c:1113) ==5569== by 0x41EA5A: search_dir (cmds-restore.c:567) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== ==5569== Invalid read of size 8 ==5569== at 0x4C2F790: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4388E6: read_extent_buffer (string3.h:51) ==5569== by 0x41ED6C: search_dir (cmds-restore.c:233) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== Address 0x5e0cf20 is 0 bytes after a block of size 4,224 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4381B7: alloc_extent_buffer (extent_io.c:574) ==5569== by 0x42B5D8: btrfs_find_create_tree_block (disk-io.c:133) ==5569== by 0x42CD00: read_tree_block (disk-io.c:265) ==5569== by 0x427407: read_node_slot (ctree.c:634) ==5569== by 0x42A1A5: btrfs_search_slot (ctree.c:1113) ==5569== by 0x41EA5A: search_dir (cmds-restore.c:567) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== ==5569== Invalid read of size 8 ==5569== at 0x4C2F79E: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4388E6: read_extent_buffer (string3.h:51) ==5569== by 0x41ED6C: search_dir (cmds-restore.c:233) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== Address 0x5e0cf28 is 8 bytes after a block of size 4,224 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x4381B7: alloc_extent_buffer (extent_io.c:574) ==5569== by 0x42B5D8: btrfs_find_create_tree_block (disk-io.c:133) ==5569== by 0x42CD00: read_tree_block (disk-io.c:265) ==5569== by 0x427407: read_node_slot (ctree.c:634) ==5569== by 0x42A1A5: btrfs_search_slot (ctree.c:1113) ==5569== by 0x41EA5A: search_dir (cmds-restore.c:567) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== ==5569== Invalid read of size 4 ==5569== at 0x41E394: decompress (cmds-restore.c:93) ==5569== by 0x41F291: search_dir (cmds-restore.c:378) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x64a4e6d is 20,477 bytes inside a block of size 20,480 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x41EF6A: search_dir (cmds-restore.c:309) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== ==5569== Invalid read of size 1 ==5569== at 0x548DDB6: lzo1x_decompress_safe (in /lib/x86_64-linux-gnu/liblzo2.so.2.0.0) ==5569== by 0x41E3BD: decompress (cmds-restore.c:122) ==5569== by 0x41F291: search_dir (cmds-restore.c:378) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x64a4e71 is 1 bytes after a block of size 20,480 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x41EF6A: search_dir (cmds-restore.c:309) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== ==5569== Invalid read of size 1 ==5569== at 0x548DFB0: lzo1x_decompress_safe (in /lib/x86_64-linux-gnu/liblzo2.so.2.0.0) ==5569== by 0x41E3BD: decompress (cmds-restore.c:122) ==5569== by 0x41F291: search_dir (cmds-restore.c:378) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x64a4e72 is 2 bytes after a block of size 20,480 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x41EF6A: search_dir (cmds-restore.c:309) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== ==5569== Invalid write of size 1 ==5569== at 0x548DFB6: lzo1x_decompress_safe (in /lib/x86_64-linux-gnu/liblzo2.so.2.0.0) ==5569== by 0x41E3BD: decompress (cmds-restore.c:122) ==5569== by 0x41F291: search_dir (cmds-restore.c:378) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x6b4d430 is 0 bytes after a block of size 131,072 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x41EFC3: search_dir (cmds-restore.c:316) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== ==5569== Invalid read of size 1 ==5569== at 0x548DFC1: lzo1x_decompress_safe (in /lib/x86_64-linux-gnu/liblzo2.so.2.0.0) ==5569== by 0x41E3BD: decompress (cmds-restore.c:122) ==5569== by 0x41F291: search_dir (cmds-restore.c:378) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x64a4e74 is 4 bytes after a block of size 20,480 alloc'd ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x41EF6A: search_dir (cmds-restore.c:309) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== ==5569== Invalid read of size 1 ==5569== at 0x548DFCA: lzo1x_decompress_safe (in /lib/x86_64-linux-gnu/liblzo2.so.2.0.0) ==5569== by 0x41E3BD: decompress (cmds-restore.c:122) ==5569== by 0x41F291: search_dir (cmds-restore.c:378) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x64a4ed6 is not stack'd, malloc'd or (recently) free'd ==5569== ==5569== Invalid read of size 1 ==5569== at 0x548E003: lzo1x_decompress_safe (in /lib/x86_64-linux-gnu/liblzo2.so.2.0.0) ==5569== by 0x41E3BD: decompress (cmds-restore.c:122) ==5569== by 0x41F291: search_dir (cmds-restore.c:378) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) ==5569== Address 0x64a4ed7 is not stack'd, malloc'd or (recently) free'd ==5569== --5569-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting --5569-- si_code=80; Faulting address: 0x0; sp: 0x802b99d70 valgrind: the 'impossible' happened: Killed by fatal signal ==5569== at 0x3805BA9A: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==5569== by 0x3805DA02: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==5569== by 0x38021535: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==5569== by 0x3802172B: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==5569== by 0x380218A2: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==5569== by 0x3809DC03: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==5569== by 0x380AC87C: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==5569== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5569== by 0x5943689: strdup (strdup.c:42) ==5569== by 0x41F80E: search_dir (cmds-restore.c:829) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x41FA03: search_dir (cmds-restore.c:895) ==5569== by 0x4205D6: cmd_restore (cmds-restore.c:1284) ==5569== by 0x403F57: main (btrfs.c:286) Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks.