Bug 844235 - JON smnp modules generate a kernel warning
JON smnp modules generate a kernel warning
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Apache (Show other bugs)
JON 3.0.1
x86_64 Linux
unspecified Severity low
: ER04
: JON 3.3.0
Assigned To: Simeon Pinder
Garik Khachikyan
:
Depends On:
Blocks: 868423
  Show dependency treegraph
 
Reported: 2012-07-30 01:08 EDT by Coty Sutherland
Modified: 2015-01-04 16:59 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was discovered that #ifdef macros were incorrectly included in C code for customers compiling SNMP modules. Unnecessary kernel warnings were randomly thrown, and appeared in the logs when running SNMP modules. The fix updates the C code provided for customers compiling SNMP modules to remove erroneous #ifdef lines. This prevents spurious kernel warnings, as originally reported.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-11 09:03:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
spinder: needinfo-


Attachments (Terms of Use)
Disable SO_BSDCOMPAT call (479 bytes, patch)
2012-10-23 08:45 EDT, Mladen Turk
no flags Details | Diff

  None (edit)
Description Coty Sutherland 2012-07-30 01:08:11 EDT
Description of problem:
JON smnp modules generate a kernel warning. The following is seen in the messages log:
    
    <kern.warning> jbintstg2 kernel: process `httpd' is using obsolete setsockopt SO_BSDCOMPAT

The following is the load modules statements on the apache end:
    
    LoadModule snmpcommon_module modules/libsnmpcommon.so
    LoadModule snmpagt_module modules/libsnmpmonagt.so
    SNMPConf   conf
    SNMPVar    var

The issue seems to be coming from the following line in the JON mod_snmp module code:
    
    setsockopt(sd, SOL_SOCKET, SO_BSDCOMPAT, &one, sizeof(one));

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

How reproducible:
We were unable to reproduce the issue at will. It just seemed to be randomly occurring.

Steps to Reproduce:

  
Actual results:
The kernel warning is sometimes logged.

Expected results:
The modules should not generate a kernel warning.

Additional info:
Comment 1 Charles Crouch 2012-07-30 10:50:01 EDT
Other people with similar issue from 2005
https://lists.isc.org/pipermail/bind-users/2005-November/060075.html
Comment 2 Charles Crouch 2012-07-30 11:53:48 EDT
Triage: Setting priority to low, should fix if rebuilding snmp module for other issues.
Comment 3 mark yarborough 2012-09-24 16:24:51 EDT
Triage from 3.1.2 to 3.1.3 per ccrouch and loleary.
Comment 4 Larry O'Leary 2012-09-24 16:28:56 EDT
I recall seeing this in the errata rpm package test that was done on either the EC2 RPMs or JON 3.1 RPMs. I can't find the email thread that contained the report details but I recall seeing that the obsolete SO_BSDCOMPAT will be removed from Fedora within the Fedora 17 time frame. If that is the case, there is a chance that this call will fail in a future release of RHEL 6/7.
Comment 5 Charles Crouch 2012-10-19 15:33:22 EDT
Marizol has very kindly agreed to investigate whether this constant has/will disappeared.
Comment 6 Mladen Turk 2012-10-23 08:43:44 EDT
Looking at the kernel's net/core/sock.c with 2.6 and up SO_BSDCOMPAT just causes warning log message (as observed by this case).
There is no additional functionality provided, so if the mod_snmp works but the only problem is that kernel warning I have attached a trivial patch that would shut down kernel log reporting.
Comment 7 Mladen Turk 2012-10-23 08:45:11 EDT
Created attachment 632071 [details]
Disable SO_BSDCOMPAT call

Trivial fix for 2.6+ kernels.
Comment 8 Marizol Martinez 2012-10-24 20:37:48 EDT
Thank you for the update, Mladen, and the patch.

Charles -- If you agree with this change, your team should file BZs for the appropriate RHEL releases, to ensure this is considered/integrated into RHEL.
Comment 11 Jay Shaughnessy 2014-09-03 15:01:33 EDT
Master commit 48ea5d09bd54794d5168575f7dfa62c55119e041
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Wed Sep 3 14:55:18 2014 -0400

    [844235] JON smnp modules generate a kernel warning
    Applied the supplied patch for the issue.


Test Notes:  If standard SNMP stuff works then we're good, no way to specifically test this fix, just need to make sure it builds and functions normally.

Simeon, pleasre cherry-pick this to release branch.
Comment 13 Simeon Pinder 2014-09-22 11:02:25 EDT
Fixed with commit: b73a4b27ace97a jon.git

Moving to MODIFIED for testing in next brew build.
Comment 14 Simeon Pinder 2014-09-22 11:03:26 EDT
Fixing erroneous milestone.... ?
Comment 15 Simeon Pinder 2014-10-01 17:33:32 EDT
Moving to ON_QA as available for test with build:
https://brewweb.devel.redhat.com/buildinfo?buildID=388959
Comment 17 Garik Khachikyan 2014-10-16 10:01:02 EDT
taking QA contact.
Comment 18 Garik Khachikyan 2014-10-16 10:17:30 EDT
# VERIFIED

no such entries in /var/log/messages after keeping server running for a while.

version under test:
===
10:16:49,333 INFO  [SystemInfoManager] (http-/0.0.0.0:7080-3) SystemInformation: ********
ACTIVE_DRIFT_PLUGIN: [drift-jpa]
AGENT_MAX_QUIET_TIME_ALLOWED: [300000]
ALERT_PURGE: [2678400000]
AS config dir: [/home/hudson/jon-server-3.3.0.ER03/jbossas/standalone/configuration]
AS product name: [EAP]
AS product version: [6.3.0.GA]
AS version: [7.4.0.Final-redhat-19]
AVAILABILITY_PURGE: [31536000000]
AlertCount: [0]
AlertDefinitionCount: [8]
BuildNumber: [4aefe39:44e33a4]
CAM_BASELINE_DATASET: [604800000]
CAM_BASELINE_FREQUENCY: [259200000]
CAM_BASE_URL: [http://10.16.23.53:7080/]
CAM_DATA_MAINTENANCE: [3600000]
CAM_DATA_PURGE_1D: [31536000000]
CAM_DATA_PURGE_1H: [1209600000]
CAM_DATA_PURGE_6H: [2678400000]
CAM_GUIDE_ENABLED: [true]
CAM_HELP_PASSWORD: [- non null -]
CAM_HELP_USER: [web]
CAM_JAAS_PROVIDER: [true]
CAM_LDAP_BASE_DN: [ou=Users,dc=jboss,dc=org]
CAM_LDAP_BIND_DN: []
CAM_LDAP_BIND_PW: [- non null -]
CAM_LDAP_FILTER: []
CAM_LDAP_FOLLOW_REFERRALS: [false]
CAM_LDAP_GROUP_FILTER: []
CAM_LDAP_LOGIN_PROPERTY: [uid]
CAM_LDAP_NAMING_FACTORY_INITIAL: [com.sun.jndi.ldap.LdapCtxFactory]
CAM_LDAP_NAMING_PROVIDER_URL: [ldap://web.bc.jonqe.lab.eng.bos.redhat.com:10389]
CAM_LDAP_PROTOCOL: [false]
CAM_RT_COLLECT_IP_ADDRS: [true]
CAM_SYSLOG_ACTIONS_ENABLED: [false]
DATABASE_CONNECTION_URL: [jdbc:postgresql://127.0.0.1:5432/rhq?loginTimeout=0&socketTimeout=0&prepareThreshold=5&unknownLength=2147483647&loglevel=0&tcpkeepalive=false&binaryTransfer=true]
DATABASE_DRIVER_NAME: [PostgreSQL Native Driver]
DATABASE_DRIVER_VERSION: [PostgreSQL 9.2 JDBC4 (build 1002)]
DATABASE_PRODUCT_NAME: [PostgreSQL]
DATABASE_PRODUCT_VERSION: [8.4.13]
DATA_REINDEX_NIGHTLY: [false]
DB_SCHEMA_VERSION: [2.160]
DRIFT_FILE_PURGE: [2678400000]
ENABLE_AGENT_AUTO_UPDATE: [true]
ENABLE_LOGIN_WITHOUT_ROLES: [false]
EVENT_PURGE: [1209600000]
FullName: [JBoss Operations Network]
Name: [JBoss ON]
OPERATION_HISTORY_PURGE: [0]
PlatformCount: [22]
RESOURCE_GENERIC_PROPERTIES_UPGRADE: [false]
RHQ_SESSION_TIMEOUT: [3600000]
RT_DATA_PURGE: [2678400000]
SERVER_HOME_DIR: [/home/hudson/jon-server-3.3.0.ER03/jbossas/standalone]
SERVER_IDENTITY: [qe-perf-three.bc.jonqe.lab.eng.bos.redhat.com]
SERVER_INSTALL_DIR: [/home/hudson/jon-server-3.3.0.ER03]
SERVER_LOCAL_TIME: [October 16, 2014 10:16:48 AM EDT]
SERVER_TIMEZONE: [Eastern Standard Time]
SERVER_VERSION: [4.12.0.JON330ER03]
SchedulesPerMinute: [596]
ServerCount: [152]
ServiceCount: [11348]
Storage_Node qe-perf-three.bc.jonqe.lab.eng.bos.redhat.com: [storageNode.addresss=qe-perf-three.bc.jonqe.lab.eng.bos.redhat.com, hostname=qe-perf-three.bc.jonqe.lab.eng.bos.redhat.com, beginTime=1413440209234, beginTime=1413440209234, unackAlerts=0, heapUsed=null, heapPercentageUsed=Min: 0.036756581405311094, Max: 0.3438498048586552, Avg: 0.1751365582028845 (%), load=null, dataUsedPercentage=null, dataDiskUsed=null, tokens=null, actuallyOwns=null]
TRAIT_PURGE: [31536000000]
Version: [3.3.0.ER03]
********
===

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