3b080b2564287be91605bfd1d5ee985696e61d3c in ubuntu_btrfs_kernel_fixes triggers system hang on i386
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
Fix Released
|
Undecided
|
Andrea Righi | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
SRU Justification:
[Impact]
* Parity page in btrfs raid56 is incorrectly unmapped, allowing to easily trigger a reference counter bug on i386 causing a kernel panic
* The fix unmaps the right rbio pages and adds the proper kunmap() call for the parity page
[Test Case]
* create a raid5 btrfs filesystem:
# mkfs.btrfs -m raid5 -d raid5 /dev/sdb /dev/sdc /dev/sdd /dev/sde
* mount it:
# mount /dev/sdb /mnt
* run btrfs scrub in a loop:
# while :; do btrfs scrub start -BR /mnt; done
[Fix]
kunmap(p_page) was completely left out, so we never
did an unmap for the p_page and the loop unmapping the rbio page was
iterating over the wrong number of stripes: unmapping should be done
with nr_data instead of rbio->real_stripes.
[Regression Potential]
* This is an upstream fix, tested on the affected platform. The bug is affecting only btrfs raid5/6 users on architectures where kunamp() is not a no-op (like i386). It is also a very small patch, so backport changes are minimal.
[Original bug report]
This issue was not spotted on AMD64
Reproduce rate: 100%
The following command is the key to trigger this:
btrfs scrub start -BR $MNT
Steps:
# (Install necessary packages)
# git clone --depth=1 git://kernel.
# TMP=/tmp/tmp MNT=/tmp/mnt
# mkdir -p $TMP; mkdir -p $MNT
# cd autotest-
# TMP=/tmp/tmp MNT=/tmp/mnt ./3b080b2564287
Trace:
[ 494.357824] ------------[ cut here ]------------
[ 494.357828] kernel BUG at /build/
[ 494.365079] invalid opcode: 0000 [#1] SMP
[ 494.369205] Modules linked in: cfg80211 intel_powerclamp ipmi_ssif gpio_ich coretemp kvm_intel kvm ipmi_si irqbypass input_leds joydev dcdbas intel_cstate ipmi_devintf sch_fq_codel shpchp i7core_edac lpc_ich ipmi_msghandler acpi_power_meter mac_hid ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_
[ 494.430188] CPU: 2 PID: 2093 Comm: kworker/u16:1 Not tainted 4.15.0-43-generic #46-Ubuntu
[ 494.438618] Hardware name: Dell Inc. PowerEdge R310/05XKKK, BIOS 1.11.0 09/18/2012
[ 494.446494] Workqueue: btrfs-endio-raid56 btrfs_endio_
[ 494.453657] EIP: kunmap_
[ 494.457571] EFLAGS: 00010246 CPU: 2
[ 494.461229] EAX: 00000115 EBX: fffff000 ECX: 00000001 EDX: 00000000
[ 494.467840] ESI: 00000004 EDI: 00000004 EBP: f4883e44 ESP: f4883e40
[ 494.474264] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 494.479931] CR0: 80050033 CR2: 005885e0 CR3: 0fe16000 CR4: 000006f0
[ 494.486353] Call Trace:
[ 494.488967] kunmap+0x3e/0x50
[ 494.492140] finish_
[ 494.497226] ? update_
[ 494.501528] validate_
[ 494.507527] raid56_
[ 494.513058] bio_endio+
[ 494.516574] ? end_workqueue_
[ 494.521435] end_workqueue_
[ 494.526139] normal_
[ 494.531087] btrfs_endio_
[ 494.536621] process_
[ 494.540799] worker_
[ 494.544628] kthread+0xf0/0x110
[ 494.547931] ? process_
[ 494.552282] ? kthread_
[ 494.557488] ? kthread_
[ 494.562701] ret_from_
[ 494.566441] Code: 2d ee ff 58 8b 5d fc c9 c3 90 8d b4 26 00 00 00 00 a1 80 d1 c4 cf 31 c9 3d 80 d1 c4 cf 0f 95 c1 eb bc 8d b4 26 00 00 00 00 0f 0b <0f> 0b 8d 74 26 00 66 66 66 66 90 55 89 e5 56 53 31 db e8 1f ef
[ 494.585751] EIP: kunmap_
[ 494.591688] ---[ end trace 5e6d708abb85eeba ]---
Follow up with CPU soft lockup.
Please find the attachment for the complete log.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-
ProcVersionSign
Uname: Linux 4.15.0-43-generic i686
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Jan 22 11:54 seq
crw-rw---- 1 root audio 116, 33 Jan 22 11:54 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: i386
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
Date: Tue Jan 22 11:54:49 2019
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
MachineType: Dell Inc. PowerEdge R310
PciMultimedia:
ProcFB: 0 mgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.173.3
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/18/2012
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.11.0
dmi.board.name: 05XKKK
dmi.board.vendor: Dell Inc.
dmi.board.version: A05
dmi.chassis.type: 23
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: PowerEdge R310
dmi.sys.vendor: Dell Inc.
Changed in ubuntu-kernel-tests: | |
assignee: | nobody → Andrea Righi (arighi) |
tags: | added: patch |
Changed in ubuntu-kernel-tests: | |
status: | New → In Progress |
Changed in linux (Ubuntu Disco): | |
status: | Confirmed → In Progress |
status: | In Progress → Confirmed |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Cosmic): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Bionic): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Disco): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Xenial): | |
status: | Confirmed → Fix Committed |
Changed in ubuntu-kernel-tests: | |
status: | In Progress → Fix Released |
This change was made by a bot.