Bug 1070511

Summary: apcupsd filling log with ASN.1 parsing messages
Product: [Fedora] Fedora Reporter: Philip Prindeville <philipp>
Component: apcupsdAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 20CC: mhlavink, philipp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-27 02:07:47 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:

Description Philip Prindeville 2014-02-27 01:54:21 UTC
Description of problem:

/var/log/messages is filling up with ASN.1 (BER) primitive types, ostensibly as a result of parsing SNMP responses from a SmartUPS.

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

apcupsd-3.14.10-13.fc20.x86_64

How reproducible:

Configure to use "UPSTYPE snmp" in /etc/apcupsd.conf and start service. Also "DEVICE apc:161:APC:private".

Steps to Reproduce:
1. Put host on network with SmartUPS with network card.
2. Configure to use SNMP as above.
3. Start service and inspect /var/log/messages after 12 minutes...

Actual results:

Feb 26 12:03:24 localhost apcupsd: OBJECTID
...
Feb 26 12:03:24 localhost apcupsd: SEQUENCE
Feb 26 12:03:25 localhost apcupsd: OBJECTID
...
Feb 26 12:03:25 localhost apcupsd: SEQUENCE
Feb 26 12:03:25 localhost apcupsd: OBJECTID
Feb 26 12:07:25 localhost apcupsd: INTEGER
Feb 26 12:07:25 localhost apcupsd: SEQUENCE
...
Feb 26 12:07:25 localhost apcupsd: OBJECTID
Feb 26 12:07:25 localhost apcupsd: INTEGER
...


Expected results:

No debugging output.

Additional info:

After some cursory reading, the culprit seems to be the function debug() in src/drivers/snmplite/asn.cpp which writes to stdout unconditionally.

Comment 1 Philip Prindeville 2014-02-27 02:07:47 UTC

*** This bug has been marked as a duplicate of bug 1053324 ***