Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 3 product line. The current stable release is 3.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 116037

Summary: Existence of race condition in Linux SD driver that leads to a deadlock
Product: Red Hat Enterprise Linux 3 Reporter: Heather Conway <conway_heather>
Component: kernelAssignee: Larry Woodman <lwoodman>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: dledford, gary.mansell, peterm, petrides, poelstra, riel, tao
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2005-663 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-28 14:19:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 156320    
Attachments:
Description Flags
patch committed to rhel3 u6 none

Description Heather Conway 2004-02-17 19:24:34 UTC
Description of problem:
Linux sd driver has a race condition, which will lead to a deadlock. 
It is there on all linux versions that we support, but only shows up 
on RHEL 3.0 with PowerPath, since RedHat inroduced a package called 
devlabel with it. The race happens under the following conditions.

Thread #1 can call scsi_revalidatedisk(), while holding the 
kernel_flag (i.e. the big lock), and may do IO. This function will 
set the device_busy flag for the particular device. Thread#2 will 
come along, and attempt to open the device that is being revalidated. 
It will obtain the lock, since thread #1 releases before the call to 
schedule (). Thread #2 will then spin in the following while loop in 
sd_open() causing a deadlock, since thread#1 never reset the busy 
flag, and will never get a chance to do so.

while (rscsi_disks[target].device->busy) {
barrier();
cpu_relax();
}

This is a bug in LINUX. Somebody at Egenera also ran into this issue. 
Here's the link:

http://linux-kernel.skylab.org/20030406/msg00355.html



Version-Release number of selected component (if applicable):
kernel-source-2.4.21-9.EL

Comment 1 Rik van Riel 2004-02-17 19:39:27 UTC
Can you reproduce this problem without the proprietary powerpath module?

If not, I'm afraid there isn't much we can do without your help,
because the powerpath source code isn't available to us (under an
acceptable license).

Comment 2 Heather Conway 2004-02-21 18:57:10 UTC
I will request that the environment be replicated without PowerPath 
and will update the bugzilla as soon as I have an answer back.  
Thanks. 

Comment 3 Gary Mansell 2004-08-31 14:13:14 UTC
Is there still a problem with this on RHAS 3.0 v2.4.21 9.0.1.EL and
Powerpath 3.0.5?

Comment 4 Ernie Petrides 2005-06-17 00:10:09 UTC
Patch posted for review on 16-Jun-2005.

Comment 5 Ernie Petrides 2005-06-17 22:57:26 UTC
A fix for this problem has just been committed to the RHEL3 U6
patch pool this evening (in kernel version 2.4.21-32.9.EL).


Comment 10 Ernie Petrides 2005-09-12 20:47:01 UTC
Created attachment 118740 [details]
patch committed to rhel3 u6

Comment 12 Red Hat Bugzilla 2005-09-28 14:19:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-663.html