Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2012 22:16:57 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Mikolaj Golub <trociny@FreeBSD.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: bsnmpd always died on HDD detach
Message-ID:  <504F9C39.2070107@quip.cz>
In-Reply-To: <20120910203511.GA27221@gmail.com>
References:  <504D10A7.1070701@quip.cz> <20120910054459.GA57302@gmail.com>	<504DFD37.60105@quip.cz> <20120910203511.GA27221@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?504F9C39.2070107>