Re: RIP in btrfs with kernel 6.1.4

From: Filipe Manana
Date: Sun Feb 12 2023 - 12:16:16 EST


On Sun, Feb 12, 2023 at 2:13 PM Toralf Förster <toralf.foerster@xxxxxx> wrote:
>
>
>
> At a stable hardened Gentoo Linux server I got a month ago the RIP seen
> below.
>
>
> Just FWIW few hours before that RIP the BTRFS at my desktop (same OS,
> but older stable kernel v5.15.86 IIRC) got big problems (100% full
> despite that just about the half of 250 GB was used) - and I made the
> mistake of the months and trusts the btrfs repair tool - after that the
> fs could not even be found/mounted by the kernel.
>
>
> The server is an SMP PREEMPT_DYNAMIC Thu Feb 9 17:45:03 UTC 2023 x86_64
> AMD Ryzen 9 5950X 16-Core Processor AuthenticAMD GNU/Linux
> The client was an ThinkPad T440s with an i5
>
>
> Here is the RIP:
>
> Jan 12 09:52:07 mr-fox kernel: BTRFS warning (device nvme0n1p4): bad eb
> member end: ptr 0x3fe9 start 5994348707840 member offset 16382 size 8
> Jan 12 09:52:07 mr-fox kernel: general protection fault, probably for
> non-canonical address 0x142f000000000: 0000 [#1] PREEMPT SMP NOPTI
> Jan 12 09:52:07 mr-fox kernel: CPU: 19 PID: 6458 Comm: tar Tainted: G
> T 6.1.4 #10
> Jan 12 09:52:07 mr-fox kernel: Hardware name: ASUS System Product
> Name/Pro WS 565-ACE, BIOS 0502 01/15/2021
> Jan 12 09:52:07 mr-fox kernel: RIP: 0010:btrfs_get_64+0x11e/0x170
> Jan 12 09:52:07 mr-fox kernel: Code: 4a 8b 44 e5 70 48 2b 05 f0 cd c9 00
> 48 c1 f8 06 48 c1 e0 0c 48 03 05 f1 cd c9 00 81 eb f8 0f 00 00 74 13 31
> d2 89 d6 83 c2 01 <0f> b6 3c 30 40 88 3c 31 39 da 72 ef 48 8b 44 24 08
> e9 5b ff ff ff
> Jan 12 09:52:07 mr-fox kernel: RSP: 0018:ffff95c160b1fd48 EFLAGS: 00010202
> Jan 12 09:52:07 mr-fox kernel: RAX: 000142f000000000 RBX:
> 0000000000000006 RCX: ffff95c160b1fd52
> Jan 12 09:52:07 mr-fox kernel: RDX: 0000000000000001 RSI:
> 0000000000000000 RDI: 000000000000000a
> Jan 12 09:52:07 mr-fox kernel: RBP: ffff95c13d2c6a00 R08:
> 0000000000000000 R09: 0000000000000000
> Jan 12 09:52:07 mr-fox kernel: R10: 0000000000000000 R11:
> 0000000000000000 R12: 0000000000000004
> Jan 12 09:52:07 mr-fox kernel: R13: 0000000000000002 R14:
> 00000573ab068000 R15: 0000000000003fe9
> Jan 12 09:52:07 mr-fox kernel: FS: 00007fe568d167c0(0000)
> GS:ffff95dfaecc0000(0000) knlGS:0000000000000000
> Jan 12 09:52:07 mr-fox kernel: CS: 0010 DS: 0000 ES: 0000 CR0:
> 0000000080050033
> Jan 12 09:52:07 mr-fox kernel: CR2: 000055d1eacc94a8 CR3:
> 00000001347a4000 CR4: 0000000000750ee0
> Jan 12 09:52:07 mr-fox kernel: PKRU: 55555554
> Jan 12 09:52:07 mr-fox kernel: Call Trace:
> Jan 12 09:52:07 mr-fox kernel: <TASK>
> Jan 12 09:52:07 mr-fox kernel: btrfs_file_llseek+0x25d/0x670
> Jan 12 09:52:07 mr-fox kernel: ksys_lseek+0x73/0xc0
> Jan 12 09:52:07 mr-fox kernel: do_syscall_64+0x68/0xa0
> Jan 12 09:52:07 mr-fox kernel: entry_SYSCALL_64_after_hwframe+0x63/0xcd
> Jan 12 09:52:07 mr-fox kernel: RIP: 0033:0x7fe56940a1f7
> Jan 12 09:52:07 mr-fox kernel: Code: 00 00 90 89 c3 48 8b 05 27 5c 0d 00
> f7 db 64 89 18 48 c7 c0 ff ff ff ff eb b1 66 0f 1f 84 00 00 00 00 00 b8
> 08 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 f9 5b 0d 00 f7
> d8 64 89 02 48
> Jan 12 09:52:07 mr-fox kernel: RSP: 002b:00007fffef1a8348 EFLAGS:
> 00000202 ORIG_RAX: 0000000000000008
> Jan 12 09:52:07 mr-fox kernel: RAX: ffffffffffffffda RBX:
> 0000000000000000 RCX: 00007fe56940a1f7
> Jan 12 09:52:07 mr-fox kernel: RDX: 0000000000000003 RSI:
> 0000000000000000 RDI: 000000000000000b
> Jan 12 09:52:07 mr-fox kernel: RBP: 0000000000000000 R08:
> 000000000000000b R09: 000055d1eacc7c00
> Jan 12 09:52:07 mr-fox kernel: R10: 0ddfa64af0d29e4e R11:
> 0000000000000202 R12: 0000000000000000
> Jan 12 09:52:07 mr-fox kernel: R13: 000055d1eacad020 R14:
> 000055d1eacac030 R15: 0000000000000002
> Jan 12 09:52:07 mr-fox kernel: </TASK>
> Jan 12 09:52:07 mr-fox kernel: ---[ end trace 0000000000000000 ]---
> Jan 12 09:52:07 mr-fox kernel: RIP: 0010:btrfs_get_64+0x11e/0x170
> Jan 12 09:52:07 mr-fox kernel: Code: 4a 8b 44 e5 70 48 2b 05 f0 cd c9 00
> 48 c1 f8 06 48 c1 e0 0c 48 03 05 f1 cd c9 00 81 eb f8 0f 00 00 74 13 31
> d2 89 d6 83 c2 01 <0f> b6 3c 30 40 88 3c 31 39 da 72 ef 48 8b 44 24 08
> e9 5b ff ff ff
> Jan 12 09:52:07 mr-fox kernel: RSP: 0018:ffff95c160b1fd48 EFLAGS: 00010202
> Jan 12 09:52:07 mr-fox kernel: RAX: 000142f000000000 RBX:
> 0000000000000006 RCX: ffff95c160b1fd52
> Jan 12 09:52:07 mr-fox kernel: RDX: 0000000000000001 RSI:
> 0000000000000000 RDI: 000000000000000a
> Jan 12 09:52:07 mr-fox kernel: RBP: ffff95c13d2c6a00 R08:
> 0000000000000000 R09: 0000000000000000
> Jan 12 09:52:07 mr-fox kernel: R10: 0000000000000000 R11:
> 0000000000000000 R12: 0000000000000004
> Jan 12 09:52:07 mr-fox kernel: R13: 0000000000000002 R14:
> 00000573ab068000 R15: 0000000000003fe9
> Jan 12 09:52:07 mr-fox kernel: FS: 00007fe568d167c0(0000)
> GS:ffff95dfaecc0000(0000) knlGS:0000000000000000
> Jan 12 09:52:07 mr-fox kernel: CS: 0010 DS: 0000 ES: 0000 CR0:
> 0000000080050033
> Jan 12 09:52:07 mr-fox kernel: CR2: 000055d1eacc94a8 CR3:
> 00000001347a4000 CR4: 0000000000750ee0
> Jan 12 09:52:07 mr-fox kernel: PKRU: 55555554

This is a bug that was already fixed by this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f2e84ca60660402bd81d0859703567c59556e6a

And it landed in 6.1.5, see:
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.5

So just upgrade to a stable release > 6.1.4.


>
> --
> Toralf