From nobody@FreeBSD.org  Sun Jul 24 14:31:56 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F0019106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jul 2011 14:31:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id DF8698FC1C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jul 2011 14:31:56 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6OEVuFj016531
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jul 2011 14:31:56 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p6OEVuRl016530;
	Sun, 24 Jul 2011 14:31:56 GMT
	(envelope-from nobody)
Message-Id: <201107241431.p6OEVuRl016530@red.freebsd.org>
Date: Sun, 24 Jul 2011 14:31:56 GMT
From: Aurlien Mr <freebsd@amc-os.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bsnmpd broken after upgrade in 9.0-CURRENT
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         159160
>Category:       bin
>Synopsis:       bsnmpd(1) broken after upgrade in 9.0-CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 24 14:40:07 UTC 2011
>Closed-Date:    Thu Aug 04 13:30:10 UTC 2011
>Last-Modified:  Thu Aug 04 13:30:10 UTC 2011
>Originator:     Aurlien Mr
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD milkyway.adriana.amc-os.com 9.0-CURRENT FreeBSD 9.0-CURRENT #2: Fri Jul 22 23:38:26 CEST 2011     kindman@milkyway.adriana.amc-os.com:/usr/obj/opt/src/sys/MILKYWAY64-1.2.0  amd64

>Description:
After upgrading from 8-STABLE to 9-CURRENT, bsnmpd doesn't work anymore.

I added the -d flag to bsnmpd_flags in rc.conf :

[root@milkyway /usr/src/usr.sbin/bsnmpd]# /etc/rc.d/bsnmpd start
Starting bsnmpd.
/libexec/ld-elf.so.1: /usr/sbin/bsnmpd: Undefined symbol "snmp_pdu_decode_header"
/etc/rc.d/bsnmpd: WARNING: failed to start bsnmpd

In fact, it starts correctly but exit with the previous message after a request with snmpwalk like 
/usr/local/bin/snmpwalk -Onqt -c public -v1 localhost ifTable

Everything was OK with 8-STABLE.

After last build :

-r--r--r--  1 root  wheel  298926 24 jul 15:19 /usr/lib/libbsnmp.a
lrwxr-xr-x  1 root  wheel      13 24 jul 15:19 /usr/lib/libbsnmp.so -> libbsnmp.so.5
-r--r--r--  1 root  wheel   69664 24 jul 15:19 /usr/lib/libbsnmp.so.5
-r--r--r--  1 root  wheel  302838 24 jul 15:19 /usr/lib/libbsnmp_p.a
-r--r--r--  1 root  wheel  107048 24 jul 15:27 /usr/lib/libbsnmptools.a
lrwxr-xr-x  1 root  wheel      18 24 jul 15:27 /usr/lib/libbsnmptools.so -> libbsnmptools.so.0
-r--r--r--  1 root  wheel   65832 24 jul 15:27 /usr/lib/libbsnmptools.so.0
-r--r--r--  1 root  wheel  111528 24 jul 15:27 /usr/lib/libbsnmptools_p.a
-r-xr-xr-x  1 root  wheel  123816 24 jul 15:27 /usr/sbin/bsnmpd

[root@milkyway /usr/src/usr.sbin/bsnmpd]# nm /usr/lib/libbsnmp.a |grep snmp_pdu_decode_header
                 U snmp_pdu_decode_header
0000000000001130 T snmp_pdu_decode_header

>How-To-Repeat:
I rebuilt bsnmpd, libbsnmp from source tree without change.
I rebuild world and ports without change.

>Fix:


>Release-Note:
>Audit-Trail:

From: Andrew Bliznak <andriko.b@gmail.com>
To: bug-followup@FreeBSD.org, freebsd@amc-os.com
Cc:  
Subject: Re: bin/159160: bsnmpd(1) broken after upgrade in 9.0-CURRENT
Date: Wed, 3 Aug 2011 12:14:16 +0300

 same on 9.0-BETA1 #18 r224466 built from sources
 
 I guess, released 9.0-BETA1 CD also have not working bsnmpd

From: =?iso-8859-1?B?QXVy6WxpZW4gTely6Q==?= <freebsd@amc-os.com>
To: "Andrew Bliznak" <andriko.b@gmail.com>,
	<bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/159160: bsnmpd(1) broken after upgrade in 9.0-CURRENT
Date: Thu, 4 Aug 2011 01:47:53 +0200

 Hi,
 
 I just installed fresh i386 and amd64 9.0-BETA1 from CD on a QEMU and bsnmpd 
 seems to work correctly on both versions.
 
 521814016 28 jul 19:12 FreeBSD-9.0-BETA1-i386-disc1.iso
 636563456 28 jul 19:52 FreeBSD-9.0-BETA1-amd64-disc1.iso
 
 frww# uname -a
 FreeBSD frww.tst 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Thu Jul 28 17:15:31 UTC 
 2011 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
 frww# /usr/local/bin/snmpwalk -c public -v1 localhost sysName
 SNMPv2-MIB::sysName.0 = STRING: frww.tst
 
 I'll try recompiling my upgraded server and the fresh install, using the 
 last cvsup to see if something changes...
 
 Aurlien
 
State-Changed-From-To: open->feedback 
State-Changed-By: brian 
State-Changed-When: Thu Aug 4 08:55:34 UTC 2011 
State-Changed-Why:  
I'll bet the problem is a stale /lib/libbsnmp.so.5 from September 
2010... could the originator verify? 

Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159160 

From: Andrew Bliznak <andriko.b@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/159160: bsnmpd(1) broken after upgrade in 9.0-CURRENT
Date: Thu, 4 Aug 2011 12:32:19 +0300

 2011/8/4 Aur=E9lien M=E9r=E9 <freebsd@amc-os.com>:
 > Hi,
 >
 > I just installed fresh i386 and amd64 9.0-BETA1 from CD on a QEMU and bsn=
 mpd
 > seems to work correctly on both versions.
 >
 > 521814016 28 jul 19:12 FreeBSD-9.0-BETA1-i386-disc1.iso
 > 636563456 28 jul 19:52 FreeBSD-9.0-BETA1-amd64-disc1.iso
 >
 > frww# uname -a
 > FreeBSD frww.tst 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Thu Jul 28 17:15:31 UTC
 > 2011 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
 > frww# /usr/local/bin/snmpwalk -c public -v1 localhost sysName
 > SNMPv2-MIB::sysName.0 =3D STRING: frww.tst
 >
 > I'll try recompiling my upgraded server and the fresh install, using the
 > last cvsup to see if something changes...
 >
 
 heh, it's simple:
 on my system
 
 $ ls -lt /lib | tail -5
 -r--r--r--  1 root  wheel  1179416 Aug  2 16:27 libc.so.7
 -r--r--r--  1 root  wheel     5848 May  5 15:32 libsbuf.so.5
 -r--r--r--  1 root  wheel    53296 Dec  3  2010 libbsnmp.so.5
 -r--r--r--  1 root  wheel    71092 Mar  1  2010 libz.so.5
 -r--r--r--  1 root  wheel    56404 Jan 20  2010 libutil.so.8
 $
 $ nm -D /lib/libbsnmp.so.5 | fgrep snmp_pdu_decode
 00008990 T snmp_pdu_decode
 $ nm -D /usr/lib/libbsnmp.so.5 | fgrep snmp_pdu_decode
 0000b2c0 T snmp_pdu_decode
 0000a380 T snmp_pdu_decode_header
 0000aae0 T snmp_pdu_decode_scoped
 0000a230 T snmp_pdu_decode_secmode
 
 removing old libs from /lib solve problem
 
 this pr can be closed
 
 
 > Aur=E9lien
 >
 >
State-Changed-From-To: feedback->closed 
State-Changed-By: brian 
State-Changed-When: Thu Aug 4 13:27:23 UTC 2011 
State-Changed-Why:  
The issue was that a stale /lib/libbsnmp.so.5 existed.  Removing 
this version makes the newer /usr/lib/libbsnmp.so.5 load correctly 
(and find snmp_pdu_decode_header). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159160 
>Unformatted:
