Bug 326551 - smartctl hangs the system
smartctl hangs the system
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: smartmontools (Show other bugs)
5.0
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Tomas Smetana
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-10 12:38 EDT by Jan Sarenik
Modified: 2008-05-21 12:56 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2008-0306
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 12:56:18 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)
Proposed patch (658 bytes, patch)
2007-10-12 04:35 EDT, Tomas Smetana
no flags Details | Diff

  None (edit)
Description Jan Sarenik 2007-10-10 12:38:13 EDT
Description of problem:

When I run "smartctl -a" by mistake on a SAS storage (mapped as /dev/sda)
attached via LSI Logic SAS based MegaRAID, the system hangs*.

I am not sure whether the bug resides in smartmontools or in the LSI Logic
SAS based MegaRAID driver but I do not want to play with it because
it is on stable server.

* Acually it tries to send the command and after time-out it sets the
  block device /dev/sda to off-line state so I was even not able to
  reboot cleanly (no I/O with /dev/sda was possible)

--------------------------------------------------------------------
Version-Release number of selected component (if applicable):

smartctl version 5.36 [x86_64-redhat-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

smartctl comes with ABSOLUTELY NO WARRANTY. This
is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License Version 2.
See http://www.gnu.org for further details.

CVS version IDs of files used to build this code are:
Module: atacmdnames.c    revision: 1.13  date: 2006/04/12     
  uses: atacmdnames.h    revision: 1.5   date: 2006/04/12     
Module: atacmds.c        revision: 1.168 date: 2006/04/12     
  uses: atacmds.h        revision: 1.81  date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: extern.h         revision: 1.41  date: 2006/04/12     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: utility.h        revision: 1.43  date: 2006/04/12     
Module: ataprint.c       revision: 1.164 date: 2006/04/12     
  uses: atacmdnames.h    revision: 1.5   date: 2006/04/12     
  uses: atacmds.h        revision: 1.81  date: 2006/04/12     
  uses: ataprint.h       revision: 1.28  date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: extern.h         revision: 1.41  date: 2006/04/12     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: knowndrives.h    revision: 1.16  date: 2006/04/05     
  uses: smartctl.h       revision: 1.23  date: 2006/04/12     
  uses: utility.h        revision: 1.43  date: 2006/04/12     
Module: knowndrives.c    revision: 1.139 date: 2006/04/05     
  uses: atacmds.h        revision: 1.81  date: 2006/04/12     
  uses: ataprint.h       revision: 1.28  date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: extern.h         revision: 1.41  date: 2006/04/12     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: knowndrives.h    revision: 1.16  date: 2006/04/05     
  uses: utility.h        revision: 1.43  date: 2006/04/12     
Module: os_linux.c       revision: 1.82  date: 2006/04/12     
  uses: atacmds.h        revision: 1.81  date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: os_linux.h       revision: 1.24  date: 2006/04/12     
  uses: scsicmds.h       revision: 1.57  date: 2006/04/12     
  uses: utility.h        revision: 1.43  date: 2006/04/12     
Module: scsicmds.c       revision: 1.85  date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: extern.h         revision: 1.41  date: 2006/04/12     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: scsicmds.h       revision: 1.57  date: 2006/04/12     
  uses: utility.h        revision: 1.43  date: 2006/04/12     
Module: scsiprint.c      revision: 1.107 date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: extern.h         revision: 1.41  date: 2006/04/12     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: scsicmds.h       revision: 1.57  date: 2006/04/12     
  uses: scsiprint.h      revision: 1.20  date: 2006/04/12     
  uses: smartctl.h       revision: 1.23  date: 2006/04/12     
  uses: utility.h        revision: 1.43  date: 2006/04/12     
Module: smartctl.c       revision: 1.143 date: 2006/04/12     
  uses: atacmds.h        revision: 1.81  date: 2006/04/12     
  uses: ataprint.h       revision: 1.28  date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: extern.h         revision: 1.41  date: 2006/04/12     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: knowndrives.h    revision: 1.16  date: 2006/04/05     
  uses: scsicmds.h       revision: 1.57  date: 2006/04/12     
  uses: scsiprint.h      revision: 1.20  date: 2006/04/12     
  uses: smartctl.h       revision: 1.23  date: 2006/04/12     
  uses: utility.h        revision: 1.43  date: 2006/04/12     
Module: utility.c        revision: 1.61  date: 2006/04/12     
  uses: configure.in     revision: 1.113 date: 2005/11/27     
  uses: int64.h          revision: 1.13  date: 2006/04/12     
  uses: utility.h        revision: 1.43  date: 2006/04/12     

smartmontools release 5.36 dated 2006/04/12 at 17:39:01 UTC
smartmontools build host: x86_64-redhat-linux-gnu
smartmontools build configured: 2006/11/10 10:40:11 UTC
smartctl compile dated Nov 10 2006 at 05:40:21
smartmontools configure arguments: '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu'
'target_alias=x86_64-redhat-linux-gnu'
--------------------------------------------------------------------


How reproducible:
  I guess it will work every time I try it.

Steps to Reproduce:
1. smartctl -a /dev/sda #where sda is block device physically connected to
                        #Dell's PERC 5/i.
  
Actual results:


Expected results:
  I would expect smartctl to say "Drive is not supported" or similar.

Additional info:

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 08 Lun: 00
  Vendor: DP       Model: BACKPLANE        Rev: 1.00
  Type:   Enclosure                        ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 00 Lun: 00
  Vendor: DELL     Model: PERC 5/i         Rev: 1.00
  Type:   Direct-Access                    ANSI SCSI revision: 05


  Thank you
   With kind regards, Jasan
Comment 1 Tomas Smetana 2007-10-11 13:33:16 EDT
The smartctl program detects certain types of RAID controllers and treats them
specially.  I've prepared a patch that adds the PERC controller type detection.
 When PERC controller is encountered smarctl exits and informs an user that this
device is not supported.
Comment 2 Tomas Smetana 2007-10-12 04:35:51 EDT
Created attachment 225251 [details]
Proposed patch
Comment 4 RHEL Product and Program Management 2007-10-19 16:25:13 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 11 errata-xmlrpc 2008-05-21 12:56:18 EDT
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/RHBA-2008-0306.html

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