From owner-freebsd-stable@FreeBSD.ORG Tue Sep 11 20:17:08 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 098741065674; Tue, 11 Sep 2012 20:17:08 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id 839A28FC08; Tue, 11 Sep 2012 20:17:06 +0000 (UTC) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 0914028423; Tue, 11 Sep 2012 22:17:00 +0200 (CEST) Received: from [192.168.1.2] (static-84-242-120-26.net.upcbroadband.cz [84.242.120.26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id C912328427; Tue, 11 Sep 2012 22:16:58 +0200 (CEST) Message-ID: <504F9C39.2070107@quip.cz> Date: Tue, 11 Sep 2012 22:16:57 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.19) Gecko/20110420 Lightning/1.0b1 SeaMonkey/2.0.14 MIME-Version: 1.0 To: Mikolaj Golub References: <504D10A7.1070701@quip.cz> <20120910054459.GA57302@gmail.com> <504DFD37.60105@quip.cz> <20120910203511.GA27221@gmail.com> In-Reply-To: <20120910203511.GA27221@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: bsnmpd always died on HDD detach X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 20:17:08 -0000 Mikolaj Golub wrote: > On Mon, Sep 10, 2012 at 04:46:15PM +0200, Miroslav Lachman wrote: >> Mikolaj Golub wrote: >>> On Sun, Sep 09, 2012 at 11:56:55PM +0200, Miroslav Lachman wrote: >>>> I am running bsnmpd with basic snmpd.config (only community and location >>>> changed). >>>> >>>> When there is a problem with HDD and disk disapeared from ATA channel >>>> (eg.: disc physically removed) the bsnmpd always dumps core: >>>> >>>> kernel: pid 1188 (bsnmpd), uid 0: exited on signal 11 (core dumped) >>>> >>>> I see this for a long rime on all releases of 7.x and 8.x branches (i386 >>>> and amd64). I did not tested 9.x. >>>> >>>> Is it a known bug, or should I file PR? >>> >>> Do you happen to run bsnmp-ucd too? If you do then what version is it? >>> In bsnmp-ucd-0.3.5 I introduced a bug that lead to bsnmpd crash on a >>> disk detach. It has been fixed (thanks to Brian Somers) in 0.3.6. >> >> No, I never installed bsnmpd-ucd. We are using plain bsnmpd from base >> without any modules. >> It is used by MRTG only for network traffic. Nothing else. > > Then the backtrace might be useful. > > gdb /usr/sbin/bsnmpd /path/to/bsnmpd.core > bt # gdb /usr/sbin/bsnmpd /bsnmpd.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `bsnmpd'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libbegemot.so.4...(no debugging symbols found)...done. Loaded symbols for /lib/libbegemot.so.4 Reading symbols from /lib/libbsnmp.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libbsnmp.so.5 Reading symbols from /usr/lib/libwrap.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libwrap.so.6 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/lib/snmp_mibII.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/snmp_mibII.so Reading symbols from /usr/lib/snmp_pf.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/snmp_pf.so Reading symbols from /usr/lib/snmp_hostres.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/snmp_hostres.so Reading symbols from /lib/libkvm.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libkvm.so.5 Reading symbols from /usr/lib/libdevinfo.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libdevinfo.so.5 Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libgeom.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libgeom.so.5 Reading symbols from /usr/lib/libmemstat.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libmemstat.so.3 Reading symbols from /lib/libbsdxml.so.4...(no debugging symbols found)...done. Loaded symbols for /lib/libbsdxml.so.4 Reading symbols from /lib/libsbuf.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libsbuf.so.5 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000801046cba in refresh_disk_storage_tbl () from /usr/lib/snmp_hostres.so (gdb) bt #0 0x0000000801046cba in refresh_disk_storage_tbl () from /usr/lib/snmp_hostres.so #1 0x00000008010478bd in refresh_device_tbl () from /usr/lib/snmp_hostres.so #2 0x0000000801047be6 in start_device_tbl () from /usr/lib/snmp_hostres.so #3 0x000000080065fad5 in poll_dispatch () from /lib/libbegemot.so.4 #4 0x000000000040616a in main () Is it all you need? (I don't know how to use gdb) It is on FreeBSD 8.3-RELEASE #0: Mon Apr 9 21:23:18 UTC 2012 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Miroslav Lachman