Discussion:
[bug] btrfs check --subvol-extents segfault
(too old to reply)
Chris Murphy
2014-09-16 21:33:05 UTC
Permalink
https://bugzilla.redhat.com/show_bug.cgi?id=1142421

kernel-3.17.0-0.rc5.git0.1.fc22.x86_64
btrfs-progs-3.16-1.fc21.x86_64

Steps to Reproduce:
1. mkfs.btrfs /dev/sdc
2. btrfs check --subvol-extents /dev/sdc

Results:
Segmentation fault (core dumped)

[ 632.749774] btrfs[692]: segfault at 0 ip 00007fc9963fdd77 sp 00007fff93450880 error 4 in libc-2.19.90.so[7fc9963c2000+1bd000]

Eric Sandeed writes in the bugzilla that this was broken by commit d34cbe76c723a05a14bbcfdc46e8ede789c3f1f9 which drops the requirement to specify a subvolid, but still does arg_strtou64(optarg) -> arg_strtou64(NULL) so it crashes.


Chris Murphy--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Eric Sandeen
2014-09-16 21:34:59 UTC
Permalink
Post by Chris Murphy
https://bugzilla.redhat.com/show_bug.cgi?id=1142421
kernel-3.17.0-0.rc5.git0.1.fc22.x86_64
btrfs-progs-3.16-1.fc21.x86_64
1. mkfs.btrfs /dev/sdc
2. btrfs check --subvol-extents /dev/sdc
Segmentation fault (core dumped)
[ 632.749774] btrfs[692]: segfault at 0 ip 00007fc9963fdd77 sp 00007fff93450880 error 4 in libc-2.19.90.so[7fc9963c2000+1bd000]
Eric Sandeed writes in the bugzilla that this was broken by commit
d34cbe76c723a05a14bbcfdc46e8ede789c3f1f9 which drops the requirement
to specify a subvolid, but still does arg_strtou64(optarg) ->
arg_strtou64(NULL) so it crashes.
Yeah, AFAICT (although it's not documented anywhere) the functionality is
*supposed* to take a subvolid as an argument.

The commit lets it pass w/ no args, but still does arg_strtou64(optarg) to get
the subvolid, and boom.

I think the commit just needs to be reverted, and then manpages updated &
testcases written...

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Qu Wenruo
2014-09-29 03:20:06 UTC
Permalink
Ping.

No response?

Thanks,
Qu
-------- Original Message --------
Subject: Re: [bug] btrfs check --subvol-extents segfault
=46rom: Eric Sandeen <***@redhat.com>
To: Chris Murphy <***@colorremedies.com>, Btrfs BTRFS=20
<linux-***@vger.kernel.org>
Date: 2014=E5=B9=B409=E6=9C=8817=E6=97=A5 05:34
https://bugzilla.redhat.com/show_bug.cgi?id=3D1142421
kernel-3.17.0-0.rc5.git0.1.fc22.x86_64
btrfs-progs-3.16-1.fc21.x86_64
1. mkfs.btrfs /dev/sdc
2. btrfs check --subvol-extents /dev/sdc
Segmentation fault (core dumped)
[ 632.749774] btrfs[692]: segfault at 0 ip 00007fc9963fdd77 sp 0000=
7fff93450880 error 4 in libc-2.19.90.so[7fc9963c2000+1bd000]
Eric Sandeed writes in the bugzilla that this was broken by commit
d34cbe76c723a05a14bbcfdc46e8ede789c3f1f9 which drops the requirement
to specify a subvolid, but still does arg_strtou64(optarg) ->
arg_strtou64(NULL) so it crashes.
Yeah, AFAICT (although it's not documented anywhere) the functionalit=
y is
*supposed* to take a subvolid as an argument.
The commit lets it pass w/ no args, but still does arg_strtou64(optar=
g) to get
the subvolid, and boom.
I think the commit just needs to be reverted, and then manpages updat=
ed &
testcases written...
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs=
" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Zygo Blaxell
2014-10-24 03:03:29 UTC
Permalink
I just stumbled across this bug a few hours ago.
It's still in btrfs-progs 3.17.
Post by Qu Wenruo
Ping.
No response?
Thanks,
Qu
-------- Original Message --------
Subject: Re: [bug] btrfs check --subvol-extents segfault
Date: 2014幎09月17日 05:34
Post by Eric Sandeen
Post by Chris Murphy
https://bugzilla.redhat.com/show_bug.cgi?id=1142421
kernel-3.17.0-0.rc5.git0.1.fc22.x86_64
btrfs-progs-3.16-1.fc21.x86_64
1. mkfs.btrfs /dev/sdc
2. btrfs check --subvol-extents /dev/sdc
Segmentation fault (core dumped)
[ 632.749774] btrfs[692]: segfault at 0 ip 00007fc9963fdd77 sp 00007fff93450880 error 4 in libc-2.19.90.so[7fc9963c2000+1bd000]
Eric Sandeed writes in the bugzilla that this was broken by commit
d34cbe76c723a05a14bbcfdc46e8ede789c3f1f9 which drops the requirement
to specify a subvolid, but still does arg_strtou64(optarg) ->
arg_strtou64(NULL) so it crashes.
Yeah, AFAICT (although it's not documented anywhere) the functionality is
*supposed* to take a subvolid as an argument.
The commit lets it pass w/ no args, but still does arg_strtou64(optarg) to get
the subvolid, and boom.
I think the commit just needs to be reverted, and then manpages updated &
testcases written...
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...