System crash during a BTRFS maintenance task

This document (000019638) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 SP4 (SLES12 SP4) with kernel 4.12.14-95.48.1 or older.
SUSE Linux Enterprise Server 12 SP5 (SLES12 SP5) with kernel 4.12.14-122.17.1 or older.

Situation

During a BTRFS maintenance a kernel panic may happen.
If a kernel dump has been saved, the dmesg.txt in the crash directory (usually /var/crash/<date-time-of-crash>) contains at the bottom of the file messages similar to this one:
kernel BUG at ../fs/btrfs/relocation.c:4837! 
invalid opcode: 0000 [#1] SMP PTI
CPU: 1 PID: 30984 Comm: btrfs Not tainted 4.12.14-122.12-default #1 SLE12-SP5
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/17/2015
task: ffff939fa65a8840 task.stack: ffffa22307570000
RIP: 0010:btrfs_reloc_cow_block+0x29b/0x2c0 [btrfs]
RSP: 0018:ffffa22307573818 EFLAGS: 00010206
RAX: 0000000000000001 RBX: ffff93a3c8e42800 RCX: ffff939efd030040
RDX: 0000000000000001 RSI: ffff939f69fb0180 RDI: 000000454fd14000
RBP: ffff93a3c5c41000 R08: 0000000000000000 R09: 0000000000000004
R10: ffff939f1cbc3360 R11: 0000000000000002 R12: ffff939f62e8d7e8
R13: 0000000000000001 R14: ffff939f19593e10 R15: ffff93a3e0920001
FS:  00007f47f51cd8c0(0000) GS:ffff93a3e6e40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000043c5000 CR3: 00000004cc738000 CR4: 00000000000406e0
Call Trace:
 ? update_ref_for_cow+0x277/0x300 [btrfs]
 __btrfs_cow_block+0x330/0x5b0 [btrfs]
 btrfs_cow_block+0xe4/0x200 [btrfs]
 btrfs_search_slot+0x4b2/0x980 [btrfs]
 do_relocation+0x468/0x5d0 [btrfs]
 relocate_tree_blocks+0x55f/0x5b0 [btrfs]
 ? tree_insert+0x49/0x50 [btrfs]
 relocate_block_group+0x27f/0x6f0 [btrfs]
 btrfs_relocate_block_group+0x189/0x270 [btrfs]
 btrfs_relocate_chunk+0x49/0xf0 [btrfs]
 __btrfs_balance+0x7f0/0xb90 [btrfs]
 btrfs_balance+0x40f/0x690 [btrfs]
 btrfs_ioctl_balance+0x3e9/0x530 [btrfs]
 btrfs_ioctl+0x82b/0x2150 [btrfs]
 ? __handle_mm_fault+0xc7e/0xf40
 do_vfs_ioctl+0x92/0x5e0
 ? __audit_syscall_entry+0xac/0xf0
 ? syscall_trace_enter+0x1ac/0x290
  SyS_ioctl+0x74/0x80
 do_syscall_64+0x74/0x160
  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x7f47f4253407
RSP: 002b:00007ffda35aaae8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f47f4253407
RDX: 00007ffda35aab90 RSI: 00000000c4009420 RDI: 0000000000000004
RBP: 00007ffda35aab90 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000fa99fa0 R11: 0000000000000206 R12: 00007ffda35ab4f8
R13: 00007ffda35ab973 R14: 0000000000000001 R15: 0000000000000001



The line number at the following message may vary, depending on the kernel version:
kernel BUG at ../fs/btrfs/relocation.c:4837!

Resolution

This is a known problem and has been fixed with the following kernel release:

SLES12 SP4 - 4.12.14-95.51.1
SLES12 SP5 - 4.12.14-122.20.1

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019638
  • Creation Date: 03-Jun-2020
  • Modified Date:03-Jun-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center