Bug 112584 - reservation error code, corrupts request queue
Summary: reservation error code, corrupts request queue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tom Coughlan
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-23 17:21 UTC by sheryl sage
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-12 01:08:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
2.6 version of aacraid with validated fix to request queue (74.53 KB, text/plain)
2004-02-20 23:10 UTC, sheryl sage
no flags Details
Updated scsi queue fix to aacraid 1.1.2 for RHEL 3 Update 2 (8.58 KB, text/plain)
2004-02-26 20:49 UTC, sheryl sage
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:188 0 normal SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 3 Update 2 2004-05-11 04:00:00 UTC

Description sheryl sage 2003-12-23 17:21:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
There is bug in aacraid module, in function "aac_scsi_cmd()". Due to 
this request queue is getting corrupted.  


int aac_scsi_cmd(Scsi_Cmnd * scsicmd)
{

 	 default:
                   /*
                    *      Unhandled commands
                   */
                   printk(KERN_WARNING "Unhandled SCSI Command:
 	 	  0x%x.\n", scsicmd->cmnd[0]);
                  scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE
 			<< 8 | CHECK_CONDITION;
                  set_sense((u8 *) &sense_data[cid],
                        SENKEY_ILLEGAL, SENCODE_INVALID_COMMAND,
                  ASENCODE_INVALID_COMMAND, 0, 0, 0, 0);
                  __aac_io_done(scsicmd);
                  return -1;
 }
 
In the above function, if it receives Reservation command, then it is
treating it as Unhandled command. So it came to the default case,  
and the error handling code is causing the problem.

There are two error handing codes:

1. It is setting the sense code to SENKEY_ILLEGAL, and is calling
    "__aac_io_done()". With this the command is retried in function
    "scsi_io_completion()" (i.e the request is again put into the 
queue)
 
2. It is also returning -1, so the caller(scsi_dispatch_cmd())is 
again retrying by putting the request in the queue again.


So the same request is added two times in the request queue, and is
causing the corruption of the re

Comment 1 sheryl sage 2004-02-20 23:08:49 UTC
-----Original Message-----
From: Salyzyn, Mark [mark_salyzyn]
Sent: Friday, January 30, 2004 2:28 PM
To: Sheryl Sage
Cc: Buddhi Madhav; Neelakandan Panchaksharam
Subject: RE: linux reservation issue aac_scsi_cmd() function in 
aacraid 


This is an old driver you are using. You will find the current aacraid
driver we ship with our products enclosed (has been submitted `badly' 
to
the 2.4 tree, correctly to the ac tree, and is merged into the 2.6 
tree,
but is missing from aging distributions).

The problem may be multiple; the result code was incorrect (needed to 
be
shifted one bit over), sense data is not getting into the scsi layer's
sense buffer, *and* the exit code was incorrect. I hope this solves 
the
problem, but will investigate on Monday the assertion that the
ILLEGAL_REQUEST causes a retry in the scsi layer.

Sincerely -- Mark Salyzyn


Comment 2 sheryl sage 2004-02-20 23:10:48 UTC
Created attachment 97890 [details]
2.6 version of aacraid with validated fix to request queue

Comment 3 sheryl sage 2004-02-26 20:49:00 UTC
Created attachment 98085 [details]
Updated scsi queue fix to aacraid 1.1.2 for RHEL 3 Update 2 

'mark_salyzyn' created.
veritas cluster server engineering team has done QA and test on this patch.  It
has been clean on all TCs.

Comment 4 Tim Burke 2004-03-01 13:06:01 UTC
Setting state to modified as Ernie included into U2 on 2/29.


Comment 5 John Flanagan 2004-05-12 01:08:04 UTC
An errata 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-2004-188.html



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