occam ~ # gdb mkfs.btrfs GNU gdb (Gentoo 7.7 p1) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://bugs.gentoo.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from mkfs.btrfs...Reading symbols from /usr/lib64/debug//sbin/mkfs.btrfs.debug...done. done. (gdb) run --features extref /dev/sdb10 Starting program: /sbin/mkfs.btrfs --features extref /dev/sdb10 warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? Program received signal SIGSEGV, Segmentation fault. strlen () at ../sysdeps/x86_64/strlen.S:106 106 ../sysdeps/x86_64/strlen.S: No such file or directory. (gdb) From btrfs-progs-v3.14.1/mkfs.c: lines 1278-1281: while(1) { int c; c = getopt_long(ac, av, "A:b:fl:n:s:m:d:L:O:r:VMK", long_options, &option_index); lines 339-355: static struct option long_options[] = { { "alloc-start", 1, NULL, 'A'}, { "byte-count", 1, NULL, 'b' }, { "force", 0, NULL, 'f' }, { "leafsize", 1, NULL, 'l' }, { "label", 1, NULL, 'L'}, { "metadata", 1, NULL, 'm' }, { "mixed", 0, NULL, 'M' }, { "nodesize", 1, NULL, 'n' }, { "sectorsize", 1, NULL, 's' }, { "data", 1, NULL, 'd' }, { "version", 0, NULL, 'V' }, { "rootdir", 1, NULL, 'r' }, { "nodiscard", 0, NULL, 'K' }, { "features", 0, NULL, 'O' }, { NULL, 0, NULL, 0} };
Created attachment 378786 [details, diff] btrfs-progs-3.14.1-fix-mkfs-btrfs-segfault-with.patch This issue is resolved[1] upstream, attaching the patch for easy reference.
Oops, forgot link. 1: https://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit?id=af0d2f88959d41488a83df4237e0c1f4c65836ed
It looks like this is resolved in 3.14.2.
+*btrfs-progs-3.14.2 (19 Jun 2014) + + 19 Jun 2014; Mike Gilbert <floppym@gentoo.org> +btrfs-progs-3.14.2.ebuild, + btrfs-progs-9999.ebuild: + Version bump.