Bug 204569 - segfault 'btrfs fi usage' on two device btrfs seed+sprout volume
Summary: segfault 'btrfs fi usage' on two device btrfs seed+sprout volume
Status: CLOSED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: BTRFS virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-13 16:37 UTC by Chris Murphy
Modified: 2020-03-24 02:39 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.2.8-200.fc30.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments
strace output (9.95 KB, text/plain)
2019-08-13 16:38 UTC, Chris Murphy
Details
gdb output (5.11 KB, text/plain)
2019-08-13 17:06 UTC, Chris Murphy
Details

Description Chris Murphy 2019-08-13 16:37:41 UTC
btrfs-progs v5.2.1

btrfs fi show does work:
Label: 'first'  uuid: f7638175-ecf8-44be-bf71-a12891603dfb
        Total devices 2 FS bytes used 841.10GiB
        devid    2 size 1024.00GiB used 882.00GiB path /dev/mapper/first
        devid    3 size 698.62GiB used 2.06GiB path /dev/mapper/sdc

devid2 is the seed
devid3 is the sprout

Mount options
/dev/mapper/first on /mnt/first type btrfs (rw,noatime,seclabel,space_cache=v2,subvolid=5,subvol=/)

btrfs fi usage /mnt/first crashes
Comment 1 Chris Murphy 2019-08-13 16:38:18 UTC
Created attachment 284369 [details]
strace output
Comment 2 Chris Murphy 2019-08-13 16:38:45 UTC
dmesg shows only these two lines at the time of the command

[126052.599013] btrfs[14847]: segfault at 7ffe5e1e1018 ip 000000000046db14 sp 00007ffe5e1df1a0 error 4 in btrfs[40c000+7c000]
[126052.599034] Code: 28 48 c7 40 08 00 00 00 00 48 8b 74 24 08 48 89 70 18 48 8b 74 24 10 48 01 70 08 48 83 c3 20 48 3b 5c 24 18 0f 84 12 ff ff ff <48> 8b 2b 41 8b 0e 85 c9 7e 95 49 8b 17 8d 41 ff 48 c1 e0 05 48 8d
Comment 3 Chris Murphy 2019-08-13 17:06:11 UTC
Created attachment 284371 [details]
gdb output
Comment 4 Marcos Souza 2020-03-23 15:34:31 UTC
(In reply to Chris Murphy from comment #0)
> btrfs-progs v5.2.1
> 
> btrfs fi show does work:
> Label: 'first'  uuid: f7638175-ecf8-44be-bf71-a12891603dfb
>         Total devices 2 FS bytes used 841.10GiB
>         devid    2 size 1024.00GiB used 882.00GiB path /dev/mapper/first
>         devid    3 size 698.62GiB used 2.06GiB path /dev/mapper/sdc
> 
> devid2 is the seed
> devid3 is the sprout
> 
> Mount options
> /dev/mapper/first on /mnt/first type btrfs
> (rw,noatime,seclabel,space_cache=v2,subvolid=5,subvol=/)
> 
> btrfs fi usage /mnt/first crashes

I tried to reproduce this issue with kernel 5.6-rc6 while using btrfs-progs 5.2.1, and so far I couldn't reproduce. Can you still reproduce this behavior?

What I did was:

mkfs.btrfs -f disk1
mount disk1 /mnt
btrfs -S 1 disk
btrfs device add disk2 /mnt
btrfs fi usage /mnt

Did you used a differente procedure? Thanks!
Comment 5 Chris Murphy 2020-03-24 02:39:35 UTC
Can't reproduce with btrfs-progs-5.4-2.fc32.x86_64. I'll assume fixed.

Note You need to log in before you can comment on or make changes to this bug.