Bug 1562228 - VDO statistics code path sleeps while holding a spin lock
Summary: VDO statistics code path sleeps while holding a spin lock
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kmod-kvdo
Version: 7.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Thomas Jaskiewicz
QA Contact: Jakub Krysl
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:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1567742 (view as bug list)
Last Closed: 2018-10-30 09:39:22 UTC
Target Upstream Version:

Attachments (Terms of Use)

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):

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

Comment 12 Jakub Krysl 2018-07-03 13:31:33 UTC
Sanity testing found no regressions on:

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.


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