Description of problem: btrfs-show-super -a /dev/<not-btrfs> Version-Release number of selected component: btrfs-progs-3.12-1.fc20 Additional info: reporter: libreport-2.1.11 backtrace_rating: 4 cmdline: btrfs-show-super -a /dev/sda1 crash_function: btrfs_super_csum_size executable: /usr/sbin/btrfs-show-super kernel: 3.12.8-300.fc20.x86_64 runlevel: N 5 type: CCpp uid: 0 Truncated backtrace: Thread no. 1 (3 frames) #4 btrfs_super_csum_size at ctree.h:1969 #6 dump_superblock at btrfs-show-super.c:172 #7 load_and_dump_sb at btrfs-show-super.c:149
Created attachment 857830 [details] File: backtrace
Created attachment 857831 [details] File: cgroup
Created attachment 857832 [details] File: core_backtrace
Created attachment 857833 [details] File: dso_list
Created attachment 857834 [details] File: environ
Created attachment 857836 [details] File: limits
Created attachment 857837 [details] File: maps
Created attachment 857838 [details] File: open_fds
Created attachment 857839 [details] File: proc_pid_status
Created attachment 857840 [details] File: var_log_messages
btrfs-progs-3.14.1 has been pushed to Fedora 19 and 20 for testing. I frankly have no idea if this will resolve your bug or not, but if you test it and find that it does, please take the opportunity to close this bug. :) Thanks, -Eric
superblock: bytenr=274877906944, device=/dev/sdc2 --------------------------------------------------------- btrfs-show-super: ctree.h:1984: btrfs_super_csum_size: Assertion `!(t >= (sizeof(btrfs_csum_sizes) / sizeof((btrfs_csum_sizes)[0])))' failed. csum 0xAborted
sent a patch to the list to not print superblocks w/ bad magic, it should avoid most of the non-existent error handling ASSERT problems down this path.
This is now in the integration branch at http://repo.or.cz/w/btrfs-progs-unstable/devel.git/commit/9deac281a66cd3907dc86529a98467c4c46705ac btrfs-show-super: don't try to print not-superblocks If we point btrfs-show-super at a not-btrfs-device and try to print all superblocks, bad things are apt to happen: superblock: bytenr=274877906944, device=/dev/sdc2 --------------------------------------------------------- btrfs-show-super: ctree.h:1984: btrfs_super_csum_size: \ Assertion `!(t >= (sizeof(btrfs_csum_sizes) / sizeof((btrfs_csum_sizes)[0])))' failed. csum 0xAborted Don't try to print superblocks that don't look like superblocks, and add an "-f" (force) option to try anyway, if the user really wants to give it a shot. Fix some spelling & capitalization while we're at it. The manpage says that if any problem happens, 1 will be returned, but that's already not true today LOL, so I didn't bother to make it true when we detect bad sb magic, either... I figure it's worth continuing and trying all superblocks in case just one has a corrupt magic. Signed-off-by: Eric Sandeen <sandeen> [renamed -f to -F due to clash with existing option, converted relevant docs to asciidoc] Signed-off-by: David Sterba <dsterba> so I'll close this as UPSTREAM; if you really need it in a Fedora release before the next btrfs-progs rebase let me know, and I can spin up a build.