Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
BTRFS-errors only on kernels >=4.17
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 797

PostPosted: Tue Sep 11, 2018 11:15 am    Post subject: BTRFS-errors only on kernels >=4.17 Reply with quote

i run an up-to-date ~amd64-htpc-system. since upgrading the kernel to >4.17 the system would not run properly anymore, so i keep using 4.16.7 productively.
upon investigating this closer i found out that the younger kernels (4.18.6 now) produce btrfs-errors that do not occur when using the 4.16.7 kernel. it got so bad that when emerging something portage would not find the files, commands would not be executed etc. using 4.16.7 again the samt things worked flawlessly.

errors (dmesg) under 4.18.7:
Code:
SNIP
[   29.061725] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 1438725, flush 0, corrupt 0, gen 0
[   29.061774] attempt to access beyond end of device
[   29.061775] sda2: rw=0, want=113466360, limit=107426655
[   29.061777] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 1438726, flush 0, corrupt 0, gen 0
[   32.877529] attempt to access beyond end of device
[   32.877534] sda2: rw=2051, want=108620632, limit=107426655
[   32.887528] attempt to access beyond end of device
[   32.887534] sda2: rw=2051, want=108620696, limit=107426655
[   32.897527] attempt to access beyond end of device
[   32.897534] sda2: rw=2051, want=108621008, limit=107426655
hundreds of them!
SNIP


i ran fsck.btrfs from systemrescuecd - no errors.

i ran a btrfs scrub on 4.16.7: no errors
i ran a btrfs scrub on 4.18.6: many uncorrectable errors

i ran a btrfs balance on 4.16.7: finished
i ran a btrfs balance on 4.18.6: aborted

the disk is an SSD;
Code:
smartctl -x
reports "test passed." result: https://paste.pound-python.org/show/crfR4PJZahMDS8YG2bvb/
i did an fstrim a couple of times, did not change anything.

Code:
emerge --info
is here: https://paste.pound-python.org/show/9GKjRwaVGBo7f7w8Qlzb/

the system's pkgs are compiled in a chroot an a different host and emerged with -K but i am certain that this is not the issue here.
i do not understand what is wrong.

THX for your input!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 363

PostPosted: Tue Sep 11, 2018 1:16 pm    Post subject: Reply with quote

I run btrfs and those kernels as well...
Let me do a quick check
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 363

PostPosted: Tue Sep 11, 2018 2:14 pm    Post subject: Reply with quote

Nothing here.

Are you sure the 18 kernel has the same storage modules loaded?
The error sounds a bit like a misalignment.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 797

PostPosted: Wed Sep 12, 2018 10:09 am    Post subject: Reply with quote

BTRFS is compiled in statically. also, the data-disk which as also BTRFS shows no errors at all.
the kernel-configs are the same regarding filesystems and partitions (it's kind of a single-use box: HTPC; the kconfs do not change (much) but are only adapted in a kernel-upgrade).
meanwhile, the errors persist (scrub failed again, ...).
i think stuff that is unreadable under 4.18. becomes readable once it gets rewritten (eg by re-emerging a PKG) under 4.16.7.
it's a really strange situation. maybe i will try and repartition the whole disk.
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3613
Location: Hamburg

PostPosted: Wed Sep 12, 2018 11:18 am    Post subject: Reply with quote

Maitreya wrote:
Nothing here.

Are you sure the 18 kernel has the same storage modules loaded?
The error sounds a bit like a misalignment.
OTOH there's a handful BTRFS fixes in the stable queue: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/commit/?id=ad70271651307094d0bdcb440becdc2bca8fae75
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 797

PostPosted: Wed Sep 12, 2018 5:20 pm    Post subject: Reply with quote

well i'm really not a highly skilled filesystem or kernel developer, but at first glance there seems not be be anything related to my specific problems in these patches.
will these patches be included into gentoo-sources sometime?
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13028

PostPosted: Thu Sep 13, 2018 1:09 am    Post subject: Reply with quote

If the patches are released as part of a Linux stable kernel, then they will be available in the next gentoo-sources based on that kernel.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 797

PostPosted: Thu Sep 13, 2018 1:18 pm    Post subject: Reply with quote

might there be a(nother) solution to this problem?

just tried to send a snapshot of the subvol to a backup-disk under 4.18.7:
Code:
/mnt/2/SNAPSHOTS # btrfs send -v gentoo-chroot-2018-09-13-1536841984 | btrfs receive -v /mnt/1/       
At subvol gentoo-chroot-2018-09-13-1536841984
At subvol gentoo-chroot-2018-09-13-1536841984
receiving subvol gentoo-chroot-2018-09-13-1536841984 uuid=2afacf7f-c2a3-f64e-817b-652a5fa23d1e, stransid=170081
ERROR: send ioctl failed with -5: Input/output error
ERROR: unexpected EOF in stream

whereas under 4.16.7. it works flawlessly

i'd hate to restructure the whole disk and have the same problems occur again.
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 797

PostPosted: Sat Sep 15, 2018 12:31 pm    Post subject: Workaround Reply with quote

i re-structured the whole disk and created a new fs (from multi-partition-layout to just one btrfs-fs with subvols) and the errors "magically" disappeared. (in the meantime, btrfs-snaps created under 4.18 on the same disk would generate empty data-streams even when btrfs-sending them under booted systemrescuecd.)
i still do not understand this, but at least it works.
THX for your input!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum