Bug 112584 - reservation error code, corrupts request queue
reservation error code, corrupts request queue
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Tom Coughlan
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-23 12:21 EST by sheryl sage
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-11 21:08:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
2.6 version of aacraid with validated fix to request queue (74.53 KB, text/plain)
2004-02-20 18:10 EST, 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 15:49 EST, sheryl sage
no flags Details

  None (edit)
Description sheryl sage 2003-12-23 12:21:12 EST
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 18:08:49 EST
-----Original Message-----
From: Salyzyn, Mark [mailto:mark_salyzyn@adaptec.com]
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 18:10:48 EST
Created attachment 97890 [details]
2.6 version of aacraid with validated fix to request queue
Comment 3 sheryl sage 2004-02-26 15:49:00 EST
Created attachment 98085 [details]
Updated scsi queue fix to aacraid 1.1.2 for RHEL 3 Update 2 

'mark_salyzyn@adaptec.com' 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 08:06:01 EST
Setting state to modified as Ernie included into U2 on 2/29.
Comment 5 John Flanagan 2004-05-11 21:08:04 EDT
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.