Bug 1562228 - VDO statistics code path sleeps while holding a spin lock
Summary: VDO statistics code path sleeps while holding a spin lock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kmod-kvdo
Version: 7.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Thomas Jaskiewicz
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks: 1567742
TreeView+ depends on / blocked
 
Reported: 2018-03-29 20:22 UTC by Thomas Jaskiewicz
Modified: 2021-09-03 12:05 UTC (History)
5 users (show)

Fixed In Version: 6.1.1.40
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1567742 (view as bug list)
Environment:
Last Closed: 2018-10-30 09:39:22 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3094 0 None None None 2018-10-30 09:39:50 UTC

Description Thomas Jaskiewicz 2018-03-29 20:22:30 UTC
Description of problem:

The VDO code that implements the sysfs nodes that read statistics (i.e. /sys/kvdo/vdo0/statistics/*) all hold a spin lock and call a method that gathers the statistics.  This gathering method always sends a message to another thread and waits for the thread to send back a reply, and the waiting always sleeps.  But sleeping is not allowed while holding a spin lock.


Version-Release number of selected component (if applicable):
6.1.0.154

How reproducible:
always takes spin lock and sleeps, but it takes multiple simultaneous calls to cause very bad effects.

Steps to Reproduce:

Unsure - this was discovered in the source code code

Actual results:


Expected results:


Additional info:

It is possible that throwing a lot of processes doing "/sys/kvdo/vdo0/statistics/*" simultaneously would show a problem.  But it is most reasonable to do the standard sanity testing after this is fixed.

The simplest fix is to take out the spin lock and replace it with a mutex.

Comment 4 Andy Walsh 2018-04-10 19:55:34 UTC
The bug was merged back to version 6.1.1.40.

Comment 12 Jakub Krysl 2018-07-03 13:31:33 UTC
Sanity testing found no regressions on:
RHEL-7.6-20180626.0
kernel-3.10.0-915.el7
kmod-vdo-6.1.1.99-1.el7
vdo-6.1.1.99-2.el7

Comment 14 errata-xmlrpc 2018-10-30 09:39:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3094


Note You need to log in before you can comment on or make changes to this bug.