Re: BTRFS kernel error on mounted partition. Partition has errors detected but not repaired by btrfs-check.

2015-09-22 Thread Sylvain Joyeux
Output of first btrfs check --repair (also removed all "bad metadata
..." messages). (TL;DR: The repair failed with "Error: could not find
btree root extent for root 1406")

squidock# ./btrfs check --repair /dev/sdc1
enabling repair mode
Checking filesystem on /dev/sdc1
UUID: 14ea871f-1e47-49b3-9f9b-4ded4f510b0b
checking extents
ref mismatch on [315025031168 16384] extent item 0, found 1
repair deleting extent record: key 315025031168 169 1
adding new tree backref on start 315025031168 len 16384 parent 0 root 1406
Backref 315025031168 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [315025031168 16384]
owner ref check failed [315025031168 16384]
ref mismatch on [315025096704 16384] extent item 0, found 1
repair deleting extent record: key 315025096704 169 1
adding new tree backref on start 315025096704 len 16384 parent 0 root 1406
Backref 315025096704 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [315025096704 16384]
owner ref check failed [315025096704 16384]
Backref 320658194432 parent 2 root 2 not found in extent tree
Backref 320658194432 root 2 not referenced back 0x1dfd480
Incorrect global backref count on 320658194432 found 1 wanted 0
backpointer mismatch on [320658194432 16384]
Backref 330021388288 parent 2 root 2 not found in extent tree
Backref 330021388288 root 2 not referenced back 0x1ce34d0
Incorrect global backref count on 330021388288 found 1 wanted 0
backpointer mismatch on [330021388288 16384]
ref mismatch on [334835515392 16384] extent item 0, found 1
repair deleting extent record: key 334835515392 169 1
adding new tree backref on start 334835515392 len 16384 parent 0 root 1406
Backref 334835515392 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334835515392 16384]
owner ref check failed [334835515392 16384]
ref mismatch on [334838005760 16384] extent item 0, found 1
repair deleting extent record: key 334838005760 169 1
adding new tree backref on start 334838005760 len 16384 parent 0 root 1406
Backref 334838005760 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334838005760 16384]
owner ref check failed [334838005760 16384]
ref mismatch on [334840741888 16384] extent item 0, found 1
repair deleting extent record: key 334840741888 169 1
adding new tree backref on start 334840741888 len 16384 parent 0 root 1406
Backref 334840741888 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334840741888 16384]
owner ref check failed [334840741888 16384]
ref mismatch on [334844133376 16384] extent item 0, found 1
repair deleting extent record: key 334844133376 169 1
adding new tree backref on start 334844133376 len 16384 parent 0 root 1406
Backref 334844133376 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334844133376 16384]
owner ref check failed [334844133376 16384]
ref mismatch on [334854930432 16384] extent item 13, found 14
repair deleting extent record: key 334854930432 169 1
adding new tree backref on start 334854930432 len 16384 parent 0 root 1442
adding new tree backref on start 334854930432 len 16384 parent 0 root 1441
adding new tree backref on start 334854930432 len 16384 parent 0 root 1438
adding new tree backref on start 334854930432 len 16384 parent 0 root 1437
adding new tree backref on start 334854930432 len 16384 parent 0 root 1436
adding new tree backref on start 334854930432 len 16384 parent 0 root 1434
adding new tree backref on start 334854930432 len 16384 parent 0 root 1433
adding new tree backref on start 334854930432 len 16384 parent 0 root 1423
adding new tree backref on start 334854930432 len 16384 parent 0 root 1422
adding new tree backref on start 334854930432 len 16384 parent 0 root 1418
adding new tree backref on start 334854930432 len 16384 parent 0 root 1414
adding new tree backref on start 334854930432 len 16384 parent 0 root 1410
adding new tree backref on start 334854930432 len 16384 parent 0 root 1395
adding new tree backref on start 334854930432 len 16384 parent 0 root 1406
Backref 334854930432 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334854930432 16384]
ref mismatch on [334861041664 16384] extent item 0, found 1
repair deleting extent record: key 334861041664 169 1
adding new tree backref on start 334861041664 len 16384 parent 0 root 1406
Backref 334861041664 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334861041664 16384]
owner ref check failed [334861041664 16384]
ref mismatch on [334864269312 16384] extent item 0, found 1
repair deleting extent record: key 334864269312 169 1
adding new tree backref on start 334864269312 len 16384 parent 0 root 1406
Backref 334864269312 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334864269312 16384]
owner ref check failed [334864269312 16384]
ref mismatch on [338452496384 16384] extent item 0, found 1
repair deleting extent record: key 338452496384 169 1
adding new tree backref on start 338452496384 len

Re: BTRFS kernel error on mounted partition. Partition has errors detected but not repaired by btrfs-check.

2015-09-22 Thread Sylvain Joyeux
> Not attached to this email. :) Can you just put the text inline?

Damn. Here they are.

For the record, I felt dumb since the original files (from a week ago)
were using btrfs-progs 3.19 (I thought I was using 4.2). "Luckily" it
happened again today on another drive, so I'm sending this instead. I
can at least say that it is becoming a very recurring problem for me
(3 times in a single week, and on 2 different drives). The drive from
today is a USB drive (WD my passport Ultra, is USB a problem ?) on
which I only transfer snapshots with send/receive. The other drive is
a SATA drive (Seagate) on which I both transfer snapshots and work (I
have VMs on it, marked with NOCOW).

The kernel is an ubuntu-provided vanilla kernel, no Ubuntu patches
applied. I can now say that the symptom appeared while running on this
kernel (which obviously does not mean that it did not happen already
on 4.2 ...)

I'm going to re-run --repair to see if 4.2 would fix those.

uname -a

Linux squidock 4.0.7-040007-generic #201507031036 SMP Fri Jul 3
10:37:58 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

btrfs-check: I removed all the "bad metadata [] crossing stripe
boundary" - of which there were many.

Checking filesystem on /dev/sdc1
UUID: 14ea871f-1e47-49b3-9f9b-4ded4f510b0b
checking extents
ref mismatch on [315025031168 16384] extent item 0, found 1
Backref 315025031168 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [315025031168 16384]
owner ref check failed [315025031168 16384]
ref mismatch on [315025096704 16384] extent item 0, found 1
Backref 315025096704 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [315025096704 16384]
owner ref check failed [315025096704 16384]
ref mismatch on [334835515392 16384] extent item 0, found 1
Backref 334835515392 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334835515392 16384]
owner ref check failed [334835515392 16384]
ref mismatch on [334838005760 16384] extent item 0, found 1
Backref 334838005760 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334838005760 16384]
owner ref check failed [334838005760 16384]
ref mismatch on [334840741888 16384] extent item 0, found 1
Backref 334840741888 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334840741888 16384]
owner ref check failed [334840741888 16384]
ref mismatch on [334844133376 16384] extent item 0, found 1
Backref 334844133376 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334844133376 16384]
owner ref check failed [334844133376 16384]
ref mismatch on [334854930432 16384] extent item 13, found 14
Backref 334854930432 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334854930432 16384]
ref mismatch on [334861041664 16384] extent item 0, found 1
Backref 334861041664 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334861041664 16384]
owner ref check failed [334861041664 16384]
ref mismatch on [334864269312 16384] extent item 0, found 1
Backref 334864269312 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [334864269312 16384]
owner ref check failed [334864269312 16384]
ref mismatch on [338452496384 16384] extent item 0, found 1
Backref 338452496384 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [338452496384 16384]
owner ref check failed [338452496384 16384]
ref mismatch on [338463244288 16384] extent item 0, found 1
Backref 338463244288 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [338463244288 16384]
owner ref check failed [338463244288 16384]
ref mismatch on [338483609600 16384] extent item 0, found 1
Backref 338483609600 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [338483609600 16384]
owner ref check failed [338483609600 16384]
ref mismatch on [338518589440 16384] extent item 5, found 6
Backref 338518589440 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [338518589440 16384]
ref mismatch on [338518671360 16384] extent item 0, found 1
Backref 338518671360 parent 1406 root 1406 not found in extent tree
backpointer mismatch on [338518671360 16384]
owner ref check failed [338518671360 16384]
Errors found in extent allocation tree or chunk allocation
checking free space cache
checking fs roots
warning line 3597
checking csums
checking root refs
found 325603717524 bytes used err is 0
total csum bytes: 303756628
total tree bytes: 14641364992
total fs tree bytes: 13830225920
total extent tree bytes: 478543872
btree space waste bytes: 2715556361
file data blocks allocated: 10396334755840
 referenced 1929183850496
btrfs-progs v4.2


dmesg:

[ 2403.689854] [ cut here ]
[ 2403.689881] WARNING: CPU: 0 PID: 8190 at
/home/kernel/COD/linux/fs/btrfs/extent-tree.c:5968
__btrfs_free_extent+0xb63/0xbf0 [btrfs]()
[ 2403.689882] Modules linked in: ctr ccm msr binfmt_misc bnep
bbswitch(OE) nls_iso8859_1 ses enclosure arc4 intel_ra

Re: BTRFS kernel error on mounted partition. Partition has errors detected but not repaired by btrfs-check.

2015-09-22 Thread Hugo Mills
On Tue, Sep 22, 2015 at 08:55:05AM -0300, Sylvain Joyeux wrote:
> Hi
> 
> Hopefully, third time's the charm ... this time I'm subscribed.
> 
> (NB: sorry if you got this twice, but it did not appear in the ML
> archives so I'm assuming it never reached the ML ...)
> 
> I am in the situation where a partition has errors, detected by
> btrfs-check but not repaired by it. Mounting the partition causes
> always the same kernel errors to be reported on dmesg.
> 
> I get these errors with a 4.2 kernel and btrfs-progs 4.2. The
> partition has been used on a mixture of 4.0.7 and 4.2 kernels (I have
> to reboot on 4.0 when I need to use the NVidia card), and I really am
> unable to pinpoint whether it happened first on 4.0 or 4.2...
> 
> I use this partition mostly as a target for btrfs send / btrfs receive
> - type backups (synchronization of snapper-based snapshotting), and
> really did nothing fancy beyond that (which, well, is in itself
> fancy). So, no big deal for now for me, I just thought that a
> non-repairable corrupted filesystems could be of interest.
> 
> Attached:
>  - the output of btrfs check. btrfs check --repair does not fix them.
>  - the dmesg output with the kernel errors

   Not attached to this email. :) Can you just put the text inline?
It's more likely to be picked up by the mail archivers, and it's
generally easier to view and comment on.

   Hugo.

> I can provide the partition image as created by btrfs-image, but it's
> 230MB in size, don't know where to put it
> 
> Note: since it was a week or so ago, I reinitialized the partition,
> and just got the exact same problem today. The only thing a bit out of
> the ordinary about this partition is that it is mounted in two
> different places, and that I have some VMs on it, and am using the
> nocow attribute on the VM files.
> 
> Regards,
> Sylvain

-- 
Hugo Mills | "Can I offer you anything? Tea? Seedcake? Glass of
hugo@... carfax.org.uk | Amontillado?"
http://carfax.org.uk/  |
PGP: E2AB1DE4  |   Mrs Gillyflower, Doctor Who


signature.asc
Description: Digital signature


Re: BTRFS kernel error on mounted partition. Partition has errors detected but not repaired by btrfs-check.

2015-09-22 Thread Sylvain Joyeux
Hi

Hopefully, third time's the charm ... this time I'm subscribed.

(NB: sorry if you got this twice, but it did not appear in the ML
archives so I'm assuming it never reached the ML ...)

I am in the situation where a partition has errors, detected by
btrfs-check but not repaired by it. Mounting the partition causes
always the same kernel errors to be reported on dmesg.

I get these errors with a 4.2 kernel and btrfs-progs 4.2. The
partition has been used on a mixture of 4.0.7 and 4.2 kernels (I have
to reboot on 4.0 when I need to use the NVidia card), and I really am
unable to pinpoint whether it happened first on 4.0 or 4.2...

I use this partition mostly as a target for btrfs send / btrfs receive
- type backups (synchronization of snapper-based snapshotting), and
really did nothing fancy beyond that (which, well, is in itself
fancy). So, no big deal for now for me, I just thought that a
non-repairable corrupted filesystems could be of interest.

Attached:
 - the output of btrfs check. btrfs check --repair does not fix them.
 - the dmesg output with the kernel errors

I can provide the partition image as created by btrfs-image, but it's
230MB in size, don't know where to put it

Note: since it was a week or so ago, I reinitialized the partition,
and just got the exact same problem today. The only thing a bit out of
the ordinary about this partition is that it is mounted in two
different places, and that I have some VMs on it, and am using the
nocow attribute on the VM files.

Regards,
Sylvain
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html