Bug 1518811

Summary: check_ide_smart Invalid argument to ioctl() (EINVAL)
Product: [Fedora] Fedora EPEL Reporter: Robert Jacobson <Robert.C.Jacobson>
Component: nagios-pluginsAssignee: Stephen John Smoogen <smooge>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: el6CC: athmanem, b.heden, lemenkov, smooge, smooge, swilkerson
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: nagios-plugins-2.2.1-15.20180725git3429dad.el7 nagios-plugins-2.2.1-15.20180725git3429dad.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-30 03:11:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
strace output for check_ide_smart
none
smarctl output for system
none
strace using kernel 2.6.32-696.10.3.el6.x86_64
none
strace using kernel 2.6.32-696.13.2.el6.x86_64 none

Description Robert Jacobson 2017-11-29 15:31:16 UTC
Created attachment 1360407 [details]
strace output for check_ide_smart

Description of problem:
check_ide_smart stopped working, seemingly after a kernel patch and reboot.

Version-Release number of selected component (if applicable):
nagios-plugins-ide_smart-2.2.1-4git.el6.x86_64

How reproducible:
always (on this system)

Steps to Reproduce:
1. run /usr/lib64/nagios/plugins/check_ide_smart -d /dev/sda -n


Actual results:
Plugin output:
CRITICAL - SMART_ENABLE: Invalid argument
CRITICAL - SMART_CMD_ENABLE

Expected results:
Plugin output:
OK - Operational (24/24 tests passed)


Additional info:
"smartctl -a /dev/sda" reports "PASSED" status for this drive.

Red Hat Enterprise Linux Workstation release 6.9 (Santiago)
kernel-2.6.32-696.13.2.el6.x86_64

Comment 1 Robert Jacobson 2017-11-29 15:33:11 UTC
Created attachment 1360408 [details]
smarctl output for system

Comment 2 Stephen John Smoogen 2017-12-01 20:22:07 UTC
What happens if you back down the kernel? Does it still fail? Also did the version of ide_smart get updated from an older version during this change? From the information given it looks like the plugin is getting denied by the kernel from accessing information to that device.. but it isn't clear which change caused that.

Comment 3 Stephen John Smoogen 2017-12-01 20:31:50 UTC
OK I was able to generate the exact same error.. but only with a drive that wasn't SMART enabled.

/usr/lib64/nagios/plugins/check_ide_smart -d /dev/vda -n
CRITICAL - SMART_ENABLE: Inappropriate ioctl for device
CRITICAL - SMART_CMD_ENABLE

which doesn't explain why smartctl works or that it worked previously. I think we will need to go through more diagnosis to figure out what might cause htis.

Comment 4 Robert Jacobson 2017-12-04 14:28:34 UTC
Before rebooting, I tried turning off selinux enforcement, even though I hadn't seen any AVC errors.  This didn't change the result.

I then rebooted to the older kernel ( 2.6.32-696.10.3.el6.x86_64 ) and check_ide_smart worked (will attach strace) 

I then rebooted to the newer kernel (2.6.32-696.13.2.el6.x86_64)  -- where it had previously failed -- and check_ide_smart is now working there as well. (will attach strace)

Comment 5 Robert Jacobson 2017-12-04 14:29:15 UTC
Created attachment 1362698 [details]
strace using kernel 2.6.32-696.10.3.el6.x86_64

Comment 6 Robert Jacobson 2017-12-04 14:29:50 UTC
Created attachment 1362699 [details]
strace using kernel 2.6.32-696.13.2.el6.x86_64

Comment 7 Stephen John Smoogen 2018-01-08 22:00:00 UTC
OK over the holidays I tried to duplicate this but was unable to on my systems with EL6. Since the problem seems transient on your hardware, I am worried this may be very transient as in: motherboard/hard drive controller/hard drive related where if the box is powered up it doesn't work but a reset/warm boot it does. I have seen that with a couple of systems which makes debugging almost impossible because it can only be duplicated with similar equipment. 

If the problem occurs again, can you see if there are definite reproducers so we can see if we can isolate this to being an issue that is 'fixable' in the software versus being dependent on other factors.

Comment 8 Fedora Update System 2018-07-25 21:35:28 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e9863b9c35

Comment 9 Fedora Update System 2018-07-25 22:24:16 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-c191412de6

Comment 10 Fedora Update System 2018-07-25 22:25:01 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-ef3a8e1152

Comment 11 Fedora Update System 2018-07-26 12:19:46 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-ef3a8e1152

Comment 12 Fedora Update System 2018-07-26 14:51:46 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-c191412de6

Comment 13 Fedora Update System 2018-07-26 16:28:49 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e9863b9c35

Comment 14 Fedora Update System 2018-10-23 18:56:52 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a23e2a2eed

Comment 15 Fedora Update System 2018-10-25 21:17:21 UTC
nagios-plugins-2.2.1-14.20180725git3429dad.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a23e2a2eed

Comment 16 Fedora Update System 2018-12-13 19:31:33 UTC
nagios-plugins-2.2.1-15.20180725git3429dad.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-732d31ad86

Comment 17 Fedora Update System 2018-12-30 03:11:51 UTC
nagios-plugins-2.2.1-15.20180725git3429dad.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2019-03-12 13:41:36 UTC
nagios-plugins-2.2.1-15.20180725git3429dad.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-7bf33722b6

Comment 19 Fedora Update System 2019-03-12 23:01:54 UTC
nagios-plugins-2.2.1-15.20180725git3429dad.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-7bf33722b6

Comment 20 Fedora Update System 2019-04-06 20:22:57 UTC
nagios-plugins-2.2.1-15.20180725git3429dad.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.