* btrfs device stats /dev/mapper/ext4 SEGV
@ 2013-08-10 9:07 Russell Coker
2013-08-10 13:56 ` Chris Samuel
0 siblings, 1 reply; 3+ messages in thread
From: Russell Coker @ 2013-08-10 9:07 UTC (permalink / raw)
To: linux-btrfs
http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-progs.git
I can repeatedly get the following SEGV from running "btrfs device stats" on a
device node for an Ext3/4 filesystem. This happens with the version of the
code downloaded from the above GIT repository as well as with an older
version. Obviously the command in question is not going to do anything useful
when run against a non-BTRFS filesystem, but it should do something other than
crash.
Program received signal SIGSEGV, Segmentation fault.
0x000000000045842d in get_fs_info (path=0x7fffffffce60 "/boot",
fi_args=0x7fffffffe6c0, di_ret=0x7fffffffe6b8) at utils.c:1560
1560 fi_args->max_id = fs_devices_mnt->latest_devid;
(gdb) bt
#0 0x000000000045842d in get_fs_info (path=0x7fffffffce60 "/boot",
fi_args=0x7fffffffe6c0, di_ret=0x7fffffffe6b8) at utils.c:1560
#1 0x0000000000408576 in cmd_dev_stats (argc=2, argv=0x7fffffffec78)
at cmds-device.c:331
#2 0x0000000000404177 in handle_command_group (grp=0x684660, argc=2,
argv=0x7fffffffec78) at btrfs.c:154
#3 0x0000000000408830 in cmd_device (argc=3, argv=0x7fffffffec70)
at cmds-device.c:410
#4 0x000000000040450e in main (argc=3, argv=0x7fffffffec70) at btrfs.c:296
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: btrfs device stats /dev/mapper/ext4 SEGV
2013-08-10 9:07 btrfs device stats /dev/mapper/ext4 SEGV Russell Coker
@ 2013-08-10 13:56 ` Chris Samuel
2013-08-12 2:55 ` Anand Jain
0 siblings, 1 reply; 3+ messages in thread
From: Chris Samuel @ 2013-08-10 13:56 UTC (permalink / raw)
To: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 847 bytes --]
On Sat, 10 Aug 2013 07:07:50 PM Russell Coker wrote:
> I can repeatedly get the following SEGV from running "btrfs device stats" on
> a device node for an Ext3/4 filesystem. This happens with the version of
> the code downloaded from the above GIT repository as well as with an older
> version. Obviously the command in question is not going to do anything
> useful when run against a non-BTRFS filesystem, but it should do something
> other than crash.
The code calls btrfs_read_dev_super() on that filesystem, but it looks like the
checks are failing to detect it as not btrfs. :-(
I can reproduce the crash here too with ext3 and XFS filesystems.
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 482 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: btrfs device stats /dev/mapper/ext4 SEGV
2013-08-10 13:56 ` Chris Samuel
@ 2013-08-12 2:55 ` Anand Jain
0 siblings, 0 replies; 3+ messages in thread
From: Anand Jain @ 2013-08-12 2:55 UTC (permalink / raw)
To: Chris Samuel; +Cc: linux-btrfs
On 08/10/2013 09:56 PM, Chris Samuel wrote:
> On Sat, 10 Aug 2013 07:07:50 PM Russell Coker wrote:
>
>> I can repeatedly get the following SEGV from running "btrfs device stats" on
>> a device node for an Ext3/4 filesystem. This happens with the version of
>> the code downloaded from the above GIT repository as well as with an older
>> version. Obviously the command in question is not going to do anything
>> useful when run against a non-BTRFS filesystem, but it should do something
>> other than crash.
>
> The code calls btrfs_read_dev_super() on that filesystem, but it looks like the
> checks are failing to detect it as not btrfs. :-(
>
> I can reproduce the crash here too with ext3 and XFS filesystems.
There are quite a number of bug similar to this (that was
reported to the mainling list here, but hard to search now)
which is all triggered by using the backup super block invariably.
v6: access to backup superblock
http://permalink.gmane.org/gmane.comp.file-systems.btrfs/24746
provided fix. But it needs rebase, if you could
goback in git this patch might apply nicely for testing.
Thanks, Anand
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-12 2:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-10 9:07 btrfs device stats /dev/mapper/ext4 SEGV Russell Coker
2013-08-10 13:56 ` Chris Samuel
2013-08-12 2:55 ` Anand Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).