SNMP_Session re-imports Socket6, producing warnings [SRU]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libSNMP-session-Perl |
New
|
Undecided
|
Unassigned | ||
libsnmp-session-perl (Debian) |
Fix Released
|
Unknown
|
|||
libsnmp-session-perl (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Problem]
When SNMP_Session is used/required after Socket6, warnings are produced.
[Impact]
Warnings are written to STDERR. Normally wouldn't be critical, except this module is mainly used by recurring programs such as mrtg and cricket. For example, in mrtg's packaged configuration, it is run every 5 minutes from cron, and the warnings will be delivered to root's mail spool, eventually filling the disk.
[Development Fix]
A patch has been submitted by Debian upstream, but upstream did not respond, and Debian handling has stalled. See http://
[Stable Fix]
Apply the patch contained in this bug. It is identical to the Debian patch, with the addition of debian/changelog entry.
[Text Case]
1. sudo apt-get install libsocket6-perl libsnmp-
2. perl -MSocket6 -MSNMP_Session -e ""
Broken Behavior:
$ perl -MSocket6 -MSNMP_Session -e ""
Constant subroutine SNMP_Session:
at /usr/share/
Prototype mismatch: sub SNMP_Session:
at /usr/share/
Constant subroutine SNMP_Session:
at /usr/share/
Prototype mismatch: sub SNMP_Session:
at /usr/share/
Constant subroutine SNMPv1_
at /usr/share/
Prototype mismatch: sub SNMPv1_
at /usr/share/
Constant subroutine SNMPv1_
at /usr/share/
Prototype mismatch: sub SNMPv1_
at /usr/share/
$
Fixed Behavior:
$ perl -MSocket6 -MSNMP_Session -e ""
$
[Regression Potential]
None known. AIUI, Socket6 is required, which exports {AF,PF}_INET6 among other things, and SNMP_Session would then try to re-import its namespace. Under previous version of Perl, this was silently ignored, but this produces a warning now. An unknown series of events could possibly cause {AF,PF}_INET6 to not be imported in the first place.
[Original Report]
While mrtg works ok, on every run it produces the following warnings:
# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg
Subroutine SNMP_Session:
at /usr/share/
Subroutine SNMP_Session:
at /usr/share/
Subroutine SNMP_Session:
at /usr/share/
Subroutine SNMPv1_
at /usr/share/
Subroutine SNMPv1_
at /usr/share/
Subroutine SNMPv1_
at /usr/share/
This happens even when "EnableIPv6: no" is present in mrtg.cfg.
Because it's run every 5 minutes via cron, it's spamming the the user that ultimately gets root's cron mail.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mrtg 2.17.3-2ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.94-0ubuntu1
Architecture: amd64
Date: Sat Mar 3 19:53:25 2012
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Beta amd64 (20120229)
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: mrtg
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
Changed in mrtg (Ubuntu): | |
assignee: | nobody → Canonical Server Team (canonical-server) |
importance: | Undecided → Medium |
Changed in mrtg (Ubuntu): | |
assignee: | Canonical Server Team (canonical-server) → nobody |
Changed in mrtg (Ubuntu Precise): | |
status: | New → Triaged |
Changed in libsnmp-session-perl: | |
status: | Unknown → Confirmed |
description: | updated |
tags: | added: precise-proposed |
Changed in libsnmp-session-perl (Ubuntu Precise): | |
status: | Incomplete → Confirmed |
Changed in libsnmp-session-perl (Debian): | |
status: | Unknown → Confirmed |
Changed in libsnmp-session-perl (Debian): | |
status: | Confirmed → Fix Released |
Bug is actually present in libsnmp- session- perl, attaching patch.