swap storms kills interactive use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
Andrea Righi | ||
Focal |
Fix Released
|
High
|
Andrea Righi |
Bug Description
[Impact]
The i915 shrinker can make the system unresponsive and kill interactive performance by swapping out dirty objects to reclaim more memory.
[Test case]
The problem can be easily reproduced running an I/O intensive writer, for example:
$ dd if=/dev/zero of=/tmp/zero bs=1G count=32
When the system is running out of memory and the i915 shrinker is called we can experience noticeable lags in the normal interactive activities (mouse not responding for 5-10 seconds, screen not refreshing, etc.).
[Fix]
Avoid the lags by preventing to swap out dirty objects in the i915 shrinker (other cached objects can still be reclaimed).
[Regression potential]
The right fix would be to backport commit 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex"), available in v5.5+. However the backport is not trivial and the risk to introduce other bugs is high.
A simple change like this (it's basically a one-liner that removes a flag) can be a reasonable compromise to prevent the problem and avoid the risk of introducing other bugs.
[Original report]
Hello, several times since upgrading to focal from 19.04 I've found my computer entirely unresponsive for periods of twenty or thirty seconds. No mouse movement, no keyboard input, the screen output does not change.
My computer was using swap space and despite very slow writeout speeds well below what the NVME drive can handle, the computer was unusable.
I've captured some vmstat 1 output and top output that I started collecting during the event. (Normally one very long painful period is followed by several shorter periods of uselessness.)
Thanks
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.4.0-12-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu15
Architecture: amd64
Date: Wed Jan 29 23:44:05 2020
ProcEnviron:
TERM=rxvt-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: linux-signed-5.4
UpgradeStatus: Upgraded to focal on 2020-01-24 (5 days ago)
---
ProblemType: Bug
AlsaVersion: Advanced Linux Sound Architecture Driver Version k5.4.0-12-generic.
ApportVersion: 2.20.11-0ubuntu16
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
Card0.Amixer.info:
Card hw:0 'PCH'/'HDA Intel PCH at 0x2fe1028000 irq 145'
Mixer name : 'Realtek ALC285'
Components : 'HDA:10ec0285,
Controls : 53
Simple ctrls : 15
Card1.Amixer.info:
Card hw:1 'Audio'/'Generic ThinkPad Dock USB Audio at usb-0000:
Mixer name : 'USB Mixer'
Components : 'USB17ef:306f'
Controls : 9
Simple ctrls : 4
DistroRelease: Ubuntu 20.04
HibernationDevice: RESUME=none
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
MachineType: LENOVO 20KHCTO1WW
NonfreeKernelMo
Package: linux (not installed)
ProcEnviron:
TERM=rxvt-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.185
Tags: focal
Uname: Linux 5.4.0-12-generic x86_64
UpgradeStatus: Upgraded to focal on 2020-01-24 (5 days ago)
UserGroups: adm cdrom libvirt lpadmin plugdev sambashare sbuild sudo
_MarkForUpload: True
dmi.bios.date: 11/25/2019
dmi.bios.vendor: LENOVO
dmi.bios.version: N23ET69W (1.44 )
dmi.board.
dmi.board.name: 20KHCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40709 WIN
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: ThinkPad X1 Carbon 6th
dmi.product.name: 20KHCTO1WW
dmi.product.sku: LENOVO_
dmi.product.
dmi.sys.vendor: LENOVO
---
ProblemType: Bug
AlsaVersion: Advanced Linux Sound Architecture Driver Version k5.4.0-12-generic.
ApportVersion: 2.20.11-0ubuntu16
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
Card0.Amixer.info:
Card hw:0 'PCH'/'HDA Intel PCH at 0x2fe1028000 irq 145'
Mixer name : 'Realtek ALC285'
Components : 'HDA:10ec0285,
Controls : 53
Simple ctrls : 15
Card1.Amixer.info:
Card hw:1 'Audio'/'Generic ThinkPad Dock USB Audio at usb-0000:
Mixer name : 'USB Mixer'
Components : 'USB17ef:306f'
Controls : 9
Simple ctrls : 4
DistroRelease: Ubuntu 20.04
HibernationDevice: RESUME=none
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
MachineType: LENOVO 20KHCTO1WW
NonfreeKernelMo
Package: linux (not installed)
ProcEnviron:
TERM=rxvt-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.185
Tags: focal
Uname: Linux 5.4.0-12-generic x86_64
UpgradeStatus: Upgraded to focal on 2020-01-24 (5 days ago)
UserGroups: adm cdrom libvirt lpadmin plugdev sambashare sbuild sudo
_MarkForUpload: True
dmi.bios.date: 11/25/2019
dmi.bios.vendor: LENOVO
dmi.bios.version: N23ET69W (1.44 )
dmi.board.
dmi.board.name: 20KHCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40709 WIN
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: ThinkPad X1 Carbon 6th
dmi.product.name: 20KHCTO1WW
dmi.product.sku: LENOVO_
dmi.product.
dmi.sys.vendor: LENOVO
CVE References
affects: | linux-signed-5.4 (Ubuntu) → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu): | |
assignee: | nobody → Colin Ian King (colin-king) |
importance: | Undecided → High |
Changed in linux (Ubuntu): | |
assignee: | Colin Ian King (colin-king) → Andrea Righi (arighi) |
description: | updated |
Changed in linux (Ubuntu Focal): | |
status: | Confirmed → Fix Committed |
description: | updated |
tags: | added: ubuntu-certified |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1861359
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.