[Bug 946067] [NEW] SNMP_Session re-imports Socket6, producing warnings [SRU]
Launchpad Bug Tracker
946067 at bugs.launchpad.net
Fri Apr 20 18:07:24 UTC 2012
You have been subscribed to a public bug by Ryan Finnie (fo0bar):
[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://bugs.debian.org/628804 .
[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-session-perl
2. perl -MSocket6 -MSNMP_Session -e ""
Broken Behavior:
$ perl -MSocket6 -MSNMP_Session -e ""
Constant subroutine SNMP_Session::AF_INET6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 149
Prototype mismatch: sub SNMP_Session::AF_INET6 () vs none at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 149
Constant subroutine SNMP_Session::PF_INET6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 149
Prototype mismatch: sub SNMP_Session::PF_INET6 () vs none at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 149
Constant subroutine SNMPv1_Session::AF_INET6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 608
Prototype mismatch: sub SNMPv1_Session::AF_INET6 () vs none at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 608
Constant subroutine SNMPv1_Session::PF_INET6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 608
Prototype mismatch: sub SNMPv1_Session::PF_INET6 () vs none at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 608
$
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::pack_sockaddr_in6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 149
Subroutine SNMP_Session::unpack_sockaddr_in6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 149
Subroutine SNMP_Session::sockaddr_in6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 149
Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 608
Subroutine SNMPv1_Session::unpack_sockaddr_in6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 608
Subroutine SNMPv1_Session::sockaddr_in6 redefined at /usr/share/perl/5.14/Exporter.pm line 67.
at /usr/share/perl5/SNMP_Session.pm line 608
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
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
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)
** Affects: libsnmp-session-perl
Importance: Unknown
Status: Confirmed
** Affects: libsnmp-session-perl (Ubuntu)
Importance: Medium
Status: Incomplete
** Affects: libsnmp-session-perl (Ubuntu Precise)
Importance: Medium
Status: Incomplete
** Affects: libsnmp-session-perl (Ubuntu Q-series)
Importance: Medium
Status: Incomplete
** Tags: amd64 apport-bug patch precise precise-proposed
--
SNMP_Session re-imports Socket6, producing warnings [SRU]
https://bugs.launchpad.net/bugs/946067
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.
More information about the Ubuntu-sponsors
mailing list