Simultaneous creation and teardown of separate loops causes udev softlock
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
What I expected to happen: Loops can be successfully created and removed from multiple different threads without any adverse effects
What happened instead: Udev processes ended up in D state, which soft locked the system (unable to reboot without resorting to "echo b > /proc/sysrq-
The use case that this was originally reproduced on required frequent setup and teardown of loops in order to persist and access various snapshots of backup files. Through various methods of analysis, we were able to create a script that recreates the bad behavior relatively quickly (see attachment testudevLoopOnl
We captured some stack traces from a locked up system, and found that many of the calls were originating from loop.c. Investigating that file (specifically lo_setup and lo_release functions) showed that the 4.4 usage of mutexes is different from earlier versions of the kernel package (4.4.0.142.148), which doesn't exhibit this same behavior. It's also different from the 4.15 version of the kernel package, which also does not exhibit the same (incorrect) behavior.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version k4.4.0-148-generic.
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/hwC0D0', '/dev/snd/
Card0.Amixer.info: Error: [Errno 2] No such file or directory
Card0.Amixer.
Card1.Amixer.info: Error: [Errno 2] No such file or directory
Card1.Amixer.
DistroRelease: Ubuntu 16.04
IwConfig: Error: [Errno 2] No such file or directory
MachineType: Gigabyte Technology Co., Ltd. H97N
NonfreeKernelMo
Package: linux (not installed)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.157.21
RfKill: Error: [Errno 2] No such file or directory
Tags: xenial
Uname: Linux 4.4.0-148-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
_MarkForUpload: True
dmi.bios.date: 06/10/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F1
dmi.board.
dmi.board.name: H97N
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: H97N
dmi.product.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
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 1834693
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.