Bug 1073097

Summary: Warning: noted but unhandled ioctl 0x8946 (SIOCETHTOOL) with no size/direction hints
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Franc <mfranc>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: jakub, mbenitez, mfranc, mprchlik, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: valgrind-3.10.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1191404 (view as bug list) Environment:
Last Closed: 2015-03-05 10:49:04 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:
Bug Depends On:    
Bug Blocks: 1191404    

Description Miroslav Franc 2014-03-05 18:40:50 UTC
Description of problem:
SSIA.


Version-Release number of selected component (if applicable):
valgrind-3.9.0-5.el7
net-snmp-5.7.2-17.el7


How reproducible:
Every time


Steps to Reproduce:
1. valgrind /usr/sbin/snmpd


Actual results:
==27504== Warning: noted but unhandled ioctl 0x8946 with no size/direction hints
==27504==    This could cause spurious value errors to appear.
==27504==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.


Expected results:
No such warning.

Comment 2 Mark Wielaard 2014-03-05 19:03:35 UTC
This is most likely upstream bug: https://bugs.kde.org/show_bug.cgi?id=303536 ioctl for SIOCETHTOOL (ethtool(8)) isn't wrapped

Comment 3 Mark Wielaard 2014-03-10 12:22:49 UTC
This is a fairly complex ioctl with ~70 different sub-commands. See /usr/include/linux/ethtool.h for the interface. It might be a good idea to see if we can define a small subset of commands to support that are most commonly used.

Comment 4 Mark Wielaard 2014-06-13 13:52:44 UTC
See comment #3. We would need to first determine which of the ~70 sub-commands we want to support and get that support upstream.

Comment 8 Mark Wielaard 2014-06-27 10:40:10 UTC
A patch was just accepted upstream (valgrind svn r14114) that implements a number of the subcommands, including ETHTOOL_GDRVINFO, but not ETHTOOL_GSTRINGS and ETHTOOL_GSTATS that snmpd seems to be using. It seem to describe most data structures used, so we can try backporting this and expanding it to add the missing subcommands.

Comment 9 Mark Wielaard 2014-09-11 12:04:25 UTC
Although I stated in comment #8 that two subcommands (ETHTOOL_GSTRINGS and ETHTOOL_GSTATS) that snmp seems to be using aren't implemented a quick check against valgrind-3.10.0-0.1.BETA1.el7.x86_64 seems to indicate that snmp does now run under valgrind:

# valgrind /usr/sbin/snmpd
==19649== Memcheck, a memory error detector
==19649== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==19649== Using Valgrind-3.10.0.BETA1 and LibVEX; rerun with -h for copyright info
==19649== Command: /usr/sbin/snmpd
==19649== 
==19649== 
==19649== HEAP SUMMARY:
==19649==     in use at exit: 2,013,918 bytes in 32,610 blocks
==19649==   total heap usage: 53,783 allocs, 21,173 frees, 12,717,836 bytes allocated
==19649== 
==19649== LEAK SUMMARY:
==19649==    definitely lost: 73 bytes in 2 blocks
==19649==    indirectly lost: 0 bytes in 0 blocks
==19649==      possibly lost: 30,951 bytes in 111 blocks
==19649==    still reachable: 1,982,894 bytes in 32,497 blocks
==19649==         suppressed: 0 bytes in 0 blocks
==19649== Rerun with --leak-check=full to see details of leaked memory
==19649== 
==19649== For counts of detected and suppressed errors, rerun with: -v
==19649== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)

So it might be that those subcommands aren't used.

Would you be able to test whether this is enough support for your use case?

Comment 10 Miroslav Franc 2014-09-12 09:28:55 UTC
Right, it seems to be gone with 3.10.  Thanks.

Comment 11 Mark Wielaard 2014-09-12 10:57:39 UTC
OK, lets mark this fixed then. Thanks.

Comment 14 Miloš Prchlík 2014-10-06 08:22:08 UTC
Verified for build valgrind-3.10.0-3.el7.

Comment 16 errata-xmlrpc 2015-03-05 10:49:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0456.html