Bug 196375 - MTX load commands fail
Summary: MTX load commands fail
Status: CLOSED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: Other (show other bugs)
Hardware: Intel Linux
: P1 high
Assignee: Tools.Other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-14 23:22 UTC by evan
Modified: 2018-06-27 20:22 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.12rc0 and up
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Patch fixing this issue (2.56 KB, patch)
2017-07-27 12:59 UTC, Jason Tibbitts
Details | Diff

Description evan 2017-07-14 23:22:16 UTC
After upgrading to 4.12rc0 (also tested on all RC's 4.12, and 4.13 git), the following mtx commands fail on an ML6000 with LTO5 FC drive attached to a qlogic 2462 HBA.  Running Ubuntu Server 16.04

mtx -f /dev/sg19 load 16 0
Loading media from Storage Element 16 into drive 0...mtx: Request Sense: Long Report=yes
mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=0 (Unknown?!)
mtx: Request Sense: Sense Key=No Sense
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 00
mtx: Request Sense: Additional Sense Qualifier = 00
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
MOVE MEDIUM from Element Address 4111 to 256 Failed

Downgrading to 4.11.10 resolves the issue.  The issue (and fix) has been replicated on a server running Fedora with an NEOs T48 with an LTO6 SAS drive attached to LSI 3008.  Commit hash from latest version that works is - v4.11-4395-g89c9fea

Sorry if anything here is formatted wrong, first bug report.
Comment 1 Jason Tibbitts 2017-07-18 00:04:19 UTC
Fedora bug report is https://bugzilla.redhat.com/show_bug.cgi?id=1471302

I believe I've bisected this down to the following, but I've pretty much come to the end of my comprehension.

commit 28676d869bbb5257b5f14c0c95ad3af3a7019dd5
Author: Johannes Thumshirn <jthumshirn@suse.de>
Date:   Fri Apr 7 09:34:15 2017 +0200

    scsi: sg: check for valid direction before starting the request
    
    Check for a valid direction before starting the request, otherwise we
    risk running into an assertion in the scsi midlayer checking for valid
    requests.
    
    [mkp: fixed typo]
    
    Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
    Link: http://www.spinics.net/lists/linux-scsi/msg104400.html
    Reported-by: Dmitry Vyukov <dvyukov@google.com>
    Signed-off-by: Hannes Reinecke <hare@suse.com>
    Tested-by: Johannes Thumshirn <jthumshirn@suse.de>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Comment 2 Jason Tibbitts 2017-07-18 00:29:17 UTC
I've confirmed that reverting just that patch fixes the problem.
Comment 3 Jason Tibbitts 2017-07-27 12:59:57 UTC
Created attachment 257725 [details]
Patch fixing this issue

The attached patch was committed to the scsi-fixes tree so it should hopefully be in 4.13 soon.  This was also sent to the stable tree so with luck it will appear in a 4.12 point release.
Comment 4 Randy Dunlap 2018-03-10 17:44:54 UTC
Fixed by commit ID f930c7043663188429cd9b254e9d761edfc101ce in July, 2017.

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