NetBSD Problem Report #51432

From www@NetBSD.org  Sun Aug 21 12:37:09 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 28FC37A215
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 21 Aug 2016 12:37:09 +0000 (UTC)
Message-Id: <20160821123708.104CD7A2C1@mollari.NetBSD.org>
Date: Sun, 21 Aug 2016 12:37:08 +0000 (UTC)
From: sirl33tname@gmail.com
Reply-To: sirl33tname@gmail.com
To: gnats-bugs@NetBSD.org
Subject: net/net-snmp doesn't run on evbarm
X-Send-Pr-Version: www-1.0

>Number:         51432
>Category:       pkg
>Synopsis:       net/net-snmp doesn't run on evbarm
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    adam
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 21 12:40:00 +0000 2016
>Last-Modified:  Wed Mar 22 22:55:00 +0000 2017
>Originator:     l33tname
>Release:        pkgsrc-2016Q2: 1.12.0.36 2016/07/09
>Organization:
>Environment:
NetBSD hostname.domain.tdl 7.0.1 NetBSD 7.0.1 (RPI2.201605221355Z) evbarm

>Description:
Net-snmp crashes on NetBSD 7.0.1 (evbarm). It works fine on other architectures like x64. 


You get error messages like these in /var/log/messages

janus snmpd[1395]: NET-SNMP version 5.7.3 
snmpd[1395]: sysctl kern.cp_time failed (errno 0) 
>How-To-Repeat:
1. Install NetBSD 7.0.1 (evbarm) on a Raspberry Pi 2. 
2. checkout pkgsrc
3. make net/net-snmp
4. make install net/net-snmp
5. run service snmpd start
>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51432: net/net-snmp doesn't run on evbarm
Date: Wed, 24 Aug 2016 07:36:58 +0000

 On Sun, Aug 21, 2016 at 12:40:00PM +0000, sirl33tname@gmail.com wrote:
  > You get error messages like these in /var/log/messages
  > 
  > janus snmpd[1395]: NET-SNMP version 5.7.3 
  > snmpd[1395]: sysctl kern.cp_time failed (errno 0) 

 If you do "sysctl kern.cp_time" from the shell, does that also fail?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Sir l33tname <sirl33tname@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51432: net/net-snmp doesn't run on evbarm
Date: Fri, 26 Aug 2016 22:11:46 +0200

 > The following reply was made to PR pkg/51432; it has been noted by GNATS.
 >
 > From: David Holland <dholland-pbugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/51432: net/net-snmp doesn't run on evbarm
 > Date: Wed, 24 Aug 2016 07:36:58 +0000
 >
 >  On Sun, Aug 21, 2016 at 12:40:00PM +0000, sirl33tname@gmail.com wrote:
 >   > You get error messages like these in /var/log/messages
 >   > 
 >   > janus snmpd[1395]: NET-SNMP version 5.7.3 
 >   > snmpd[1395]: sysctl kern.cp_time failed (errno 0) 
 >  
 >  If you do "sysctl kern.cp_time" from the shell, does that also fail?
 >  
 >  -- 
 >  David A. Holland
 >  dholland@netbsd.org
 >  
 No that works

 $ sysctl kern.cp_time
 kern.cp_time: user = 150318, nice = 3987, sys = 359165, intr = 57801,
 idle = 220212921

 If I can test/provide anything else please just ask.

From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/51432: net/net-snmp doesn't run on evbarm
Date: Tue, 6 Sep 2016 17:43:16 +0000

 Similar to toolchain/50939 (should probably be a package bug)
 which claims it works when compiled without -O2.

Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Thu, 29 Sep 2016 21:18:09 +0000
Responsible-Changed-Why:
over to maintainer - any chance you know what's happening here?


From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51432 CVS commit: src/lib/libc/gen
Date: Fri, 30 Sep 2016 06:22:21 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Fri Sep 30 06:22:21 UTC 2016

 Modified Files:
 	src/lib/libc/gen: sysctlgetmibinfo.c

 Log Message:
 Be more careful about preserving errno. Might conceivably be related
 to PR 51432.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/sysctlgetmibinfo.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51432: net/net-snmp doesn't run on evbarm
Date: Fri, 30 Sep 2016 07:12:22 +0000

 On Tue, Sep 06, 2016 at 05:45:00PM +0000, coypu@SDF.ORG wrote:
  >  Similar to toolchain/50939 (should probably be a package bug)
  >  which claims it works when compiled without -O2.

 I just made a conjecture in 50939 (that it's trashing its stack) that
 is worth checking in this case too.

 If it's not that, the fact that it's getting a failure return (-1)
 from sysctlbyname with errno set to 0 severely bounds what can be
 going on, as that's not supposed to happen. It's possible that the
 libc commit I just made will fix this, but it doesn't seem likely;
 however, unless I'm flagrantly not seeing something the only other
 source is getting failure with errno 0 back from the kernel in
 __sysctl. Running with ktrace should reveal whether this is happening
 or not.

 If not, trying after applying the change I just made to libc *might*
 show different behavior (as in, failing with a nonzero errno) but this
 is a pretty long shot.

 Could still be a compiler bug like originally suggested for 50939,
 too.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Sir l33tname <sirl33tname@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51432: net/net-snmp doesn't run on evbarm
Date: Sat, 15 Oct 2016 20:04:19 +0200

 I didn't really understand a word what you are saying ^^
 So I'm unsure is there anything I can/should try if so I need a
 bit more explanation how.

From: Sir l33tname <sirl33tname@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51432: net/net-snmp doesn't run on evbarm
Date: Wed, 22 Mar 2017 23:54:14 +0100

 This is still a thing, is there any chance that this get fixed anytime
 soon? :D
 Or am I really the only one which runs net-snmp on a RPI with NetBSD?

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.