Re: bsnmpd always died on HDD detach

2012-09-17 Thread Mikolaj Golub
On Sun, Sep 16, 2012 at 07:07:20PM +0200, Miroslav Lachman wrote:
 
 I am glad to read that you found the bug!
 The fix (patch) seems trivial - will it be commited / MFCed? :)

Andrey told me that he was not sure when he would be able to commit
his work, so I have just committed my fix. I am going to MFC it.

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-16 Thread Andrey V. Elsukov
On 15.09.2012 16:50, Mikolaj Golub wrote:
 I am attaching the patch that fixes the issue for me.
 
 I was wandering why the issue was not observed after md device
 removal, as disk_OS_get_MD_disks() did the same things. It has turned
 out that hostres just does not see md devices, so this function is
 currently useless. hostres gets devices from devinfo(3), which does
 not return md devices.
 
 disk_OS_get_disks() calls kern.disks sysctl to get the list of disks,
 and uses device_map differently, so it is not affected.

I also have a big patch to the hostres module, but it is not yet
finished. Probably i should commit the part related to the disk
subsystem. This part has been rewritten to be GEOM aware.

-- 
WBR, Andrey V. Elsukov
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-16 Thread Miroslav Lachman

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.


Ok, I was able to to reproduce this under qemu doing

   atacontrol detach ata1


[...]


and it crashes in disk_OS_get_ATA_disks() when the removed map entry
is dereferenced.

I am attaching the patch that fixes the issue for me.


I am glad to read that you found the bug!
The fix (patch) seems trivial - will it be commited / MFCed? :)

Thank you for your work on this problem!

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-16 Thread Mikolaj Golub
On Sun, Sep 16, 2012 at 05:56:22PM +0400, Andrey V. Elsukov wrote:
 On 15.09.2012 16:50, Mikolaj Golub wrote:
  I am attaching the patch that fixes the issue for me.
  
  I was wandering why the issue was not observed after md device
  removal, as disk_OS_get_MD_disks() did the same things. It has turned
  out that hostres just does not see md devices, so this function is
  currently useless. hostres gets devices from devinfo(3), which does
  not return md devices.
  
  disk_OS_get_disks() calls kern.disks sysctl to get the list of disks,
  and uses device_map differently, so it is not affected.
 
 I also have a big patch to the hostres module, but it is not yet
 finished. Probably i should commit the part related to the disk
 subsystem. This part has been rewritten to be GEOM aware.

Wonderful! And as I understand it will solve this problem too? Then I
think no need in committing my patch, unless you are not planning to
merge to stable/[78] (where any fix for this problem is highly
desirable).

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-15 Thread Mikolaj Golub
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.

Ok, I was able to to reproduce this under qemu doing
  
  atacontrol detach ata1

It crashes in snmp_hostres module, in

  refresh_device_tbl-refresh_disk_storage_tbl-disk_OS_get_ATA_disks

when traversing device_map list and dereferencing map-entry_p, which
is NULL here.

device_map table is used for consistent device table indexing.

refresh_device_tbl(), refresh routine for hrDeviceTable, checks the
list of available devices and calls device_entry_delete() for devices
that have gone. It does not remove the entry from device_map table,
but just sets entry_p to NULL for it (to preserve index reuse by
another device).

Then refresh_disk_storage_tbl() is called, which in turn calls

 disk_OS_get_ATA_disks();
 disk_OS_get_MD_disks();
 disk_OS_get_disks();

and it crashes in disk_OS_get_ATA_disks() when the removed map entry
is dereferenced.

I am attaching the patch that fixes the issue for me.

I was wandering why the issue was not observed after md device
removal, as disk_OS_get_MD_disks() did the same things. It has turned
out that hostres just does not see md devices, so this function is
currently useless. hostres gets devices from devinfo(3), which does
not return md devices.

disk_OS_get_disks() calls kern.disks sysctl to get the list of disks,
and uses device_map differently, so it is not affected.

-- 
Mikolaj Golub
Index: usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c
===
--- usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c	(revision 240529)
+++ usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c	(working copy)
@@ -287,6 +287,9 @@ disk_OS_get_ATA_disks(void)
 
 	/* Walk over the device table looking for ata disks */
 	STAILQ_FOREACH(map, device_map, link) {
+		/* Skip deleted entries. */
+		if (map-entry_p == NULL)
+			continue;
 		for (found = lookup; found-media != DSM_UNKNOWN; found++) {
 			if (strncmp(map-name_key, found-dev_name,
 			strlen(found-dev_name)) != 0)
@@ -345,6 +348,9 @@ disk_OS_get_MD_disks(void)
 
 	/* Look for md devices */
 	STAILQ_FOREACH(map, device_map, link) {
+		/* Skip deleted entries. */
+		if (map-entry_p == NULL)
+			continue;
 		if (sscanf(map-name_key, md%d, unit) != 1)
 			continue;
 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org

Re: bsnmpd always died on HDD detach

2012-09-13 Thread Mikolaj Golub
On Wed, Sep 12, 2012 at 10:39:12AM +0200, Miroslav Lachman wrote:

 (gdb) bt
 #0  0x000801046cba in disk_query_disk (entry=0x0) at 
 hostres_diskstorage_tbl.c:241
 #1  0x000801dd6a00 in ?? ()
 #2  0x000801dd6600 in ?? ()
 #3  0x in ?? ()
 #4  0x000801048230 in device_entry_create (name=0x0, 
 location=0x800c14ee0 0, descr=0x8010482a6 ) at hostres_device_tbl.c:217
 #5  0x000801dd7800 in ?? ()
 #6  0x000801dd7800 in ?? ()
 #7  0x000801dd7400 in ?? ()
 #8  0x in ?? ()
 #9  0x000801048230 in device_entry_create (name=0x801dd7c00 , 
 location=0x801048230 ˙˙I\213|$8čŕ\201˙˙L\211çčŘ\201˙˙é\035ţ˙˙H\215\025,
  descr=0x8010482a6 ) at hostres_device_tbl.c:217
 #10 0x000801dd4a00 in ?? ()
 #11 0x000801dd4a00 in ?? ()
 #12 0x000801dd1a00 in ?? ()
 #13 0x in ?? ()
 #14 0x000801048230 in device_entry_create (name=0x801dd8400 , 
 location=0x801048230 ˙˙I\213|$8čŕ\201˙˙L\211çčŘ\201˙˙é\035ţ˙˙H\215\025,
  descr=0x8010482a6 ) at hostres_device_tbl.c:217
 #15 0x000801dd1800 in ?? ()
 #16 0x000801dd1800 in ?? ()
 #17 0x000800c00ea8 in ?? ()
 #18 0x0051b1c8 in ?? ()
 #19 0x000800c00938 in ?? ()
 #20 0x0051b258 in ?? ()
 #21 0x000801dc8a00 in ?? ()
 #22 0x0008009f7be9 in free () from /lib/libc.so.7
 #23 0x in ?? ()
 #24 0x7fffed98 in ?? ()
 #25 0x0008010478bd in device_entry_delete () at hostres_device_tbl.c:266
 #26 0x005187d0 in snmp_error ()
 #27 0x000801047be6 in op_hrDeviceTable (ctx=Variable ctx is not 
 available.
 ) at hostres_device_tbl.c:671
 #28 0x0051b840 in ?? ()
 #29 0x0051b830 in ?? ()
 #30 0x in ?? ()
 #31 0x7fffc360 in ?? ()
 #32 0x0051b830 in ?? ()
 #33 0x in ?? ()
 #34 0x0008009efbd2 in _pthread_mutex_init_calloc_cb () from 
 /lib/libc.so.7
 #35 0x0008009f2d32 in _malloc_prefork () from /lib/libc.so.7
 #36 0x0008009f6e1f in realloc () from /lib/libc.so.7
 #37 0x000800e0b441 in mib_if_is_dyn () from /usr/lib/snmp_mibII.so
 #38 0x in ?? ()
 #39 0x7fffc5cc in ?? ()
 #40 0x0001 in ?? ()
 #41 0x7fffc5e0 in ?? ()
 #42 0x31fa39e2fac72819 in ?? ()
 #43 0x0001 in ?? ()
 #44 0x00080065fad5 in poll_dispatch () from /lib/libbegemot.so.4
 #45 0x0040616a in main ()
 
 
 I hope it helps you to debug this problem.

Looks like we can't trust to this output.

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-12 Thread Miroslav Lachman

Mikolaj Golub wrote:

On Tue, Sep 11, 2012 at 10:16:57PM +0200, Miroslav Lachman wrote:


(gdb) bt
#0  0x000801046cba in refresh_disk_storage_tbl () from
/usr/lib/snmp_hostres.so
#1  0x0008010478bd in refresh_device_tbl () from
/usr/lib/snmp_hostres.so
#2  0x000801047be6 in start_device_tbl () from /usr/lib/snmp_hostres.so
#3  0x00080065fad5 in poll_dispatch () from /lib/libbegemot.so.4
#4  0x0040616a 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
r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64


Not sure we can get more than provided from this core as snmp_hostres
is not built with debugging symbols. You can try rebuilding
snmp_hostres with -g option, intalling and running gdb/bt again

DEBUG_FLAGS=-g make -C /usr/src/usr.sbin/bsnmpd/modules/snmp_hostres clean all 
install

AFAIK it might work or not. If it does not then wait for another crash :-)


I don't know it is better or not. All I can say is: it's different ;)

# 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...done.
Loaded symbols for /usr/lib/snmp_hostres.so
Reading symbols from /lib/libkvm.so.5...done.
Loaded symbols for /lib/libkvm.so.5
Reading symbols from /usr/lib/libdevinfo.so.5...done.
Loaded symbols for /usr/lib/libdevinfo.so.5
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgeom.so.5...done.
Loaded symbols for /lib/libgeom.so.5
Reading symbols from /usr/lib/libmemstat.so.3...done.
Loaded symbols for /usr/lib/libmemstat.so.3
Reading symbols from /lib/libbsdxml.so.4...done.
Loaded symbols for /lib/libbsdxml.so.4
Reading symbols from /lib/libsbuf.so.5...done.
Loaded symbols for /lib/libsbuf.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000801046cba in disk_query_disk (entry=0x0) at 
hostres_diskstorage_tbl.c:241

241 partition_tbl_handle_disk(entry-index, entry-dev_name);
(gdb) bt
#0  0x000801046cba in disk_query_disk (entry=0x0) at 
hostres_diskstorage_tbl.c:241

#1  0x000801dd6a00 in ?? ()
#2  0x000801dd6600 in ?? ()
#3  0x in ?? ()
#4  0x000801048230 in device_entry_create (name=0x0, 
location=0x800c14ee0 0, descr=0x8010482a6 ) at hostres_device_tbl.c:217

#5  0x000801dd7800 in ?? ()
#6  0x000801dd7800 in ?? ()
#7  0x000801dd7400 in ?? ()
#8  0x in ?? ()
#9  0x000801048230 in device_entry_create (name=0x801dd7c00 , 
location=0x801048230 ˙˙I\213|$8čŕ\201˙˙L\211çčŘ\201˙˙é\035ţ˙˙H\215\025,

descr=0x8010482a6 ) at hostres_device_tbl.c:217
#10 0x000801dd4a00 in ?? ()
#11 0x000801dd4a00 in ?? ()
#12 0x000801dd1a00 in ?? ()
#13 0x in ?? ()
#14 0x000801048230 in device_entry_create (name=0x801dd8400 , 
location=0x801048230 ˙˙I\213|$8čŕ\201˙˙L\211çčŘ\201˙˙é\035ţ˙˙H\215\025,

descr=0x8010482a6 ) at hostres_device_tbl.c:217
#15 0x000801dd1800 in ?? ()
#16 0x000801dd1800 in ?? ()
#17 0x000800c00ea8 in ?? ()
#18 0x0051b1c8 in ?? ()
#19 0x000800c00938 in ?? ()
#20 0x0051b258 in ?? ()
#21 0x000801dc8a00 in ?? ()
#22 0x0008009f7be9 in free () from /lib/libc.so.7
#23 0x in ?? ()
#24 0x7fffed98 in ?? ()
#25 0x0008010478bd in device_entry_delete () at hostres_device_tbl.c:266
#26 0x005187d0 in snmp_error ()
#27 0x000801047be6 in op_hrDeviceTable (ctx=Variable ctx is not 
available.

) at hostres_device_tbl.c:671
#28 0x0051b840 in ?? ()
#29 0x0051b830 in ?? ()
#30 0x in ?? ()
#31 0x7fffc360 in ?? ()
#32 0x0051b830 in ?? ()
#33 

Re: bsnmpd always died on HDD detach

2012-09-11 Thread Miroslav Lachman

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  0x000801046cba in refresh_disk_storage_tbl () from 
/usr/lib/snmp_hostres.so

(gdb) bt
#0  0x000801046cba in refresh_disk_storage_tbl () from 
/usr/lib/snmp_hostres.so
#1  0x0008010478bd in refresh_device_tbl () from 
/usr/lib/snmp_hostres.so

#2  0x000801047be6 in start_device_tbl () from /usr/lib/snmp_hostres.so
#3  0x00080065fad5 in poll_dispatch () from /lib/libbegemot.so.4
#4  0x0040616a 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 
r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-11 Thread Mikolaj Golub
On Tue, Sep 11, 2012 at 10:16:57PM +0200, Miroslav Lachman wrote:

 (gdb) bt
 #0  0x000801046cba in refresh_disk_storage_tbl () from 
 /usr/lib/snmp_hostres.so
 #1  0x0008010478bd in refresh_device_tbl () from 
 /usr/lib/snmp_hostres.so
 #2  0x000801047be6 in start_device_tbl () from /usr/lib/snmp_hostres.so
 #3  0x00080065fad5 in poll_dispatch () from /lib/libbegemot.so.4
 #4  0x0040616a 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 
 r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

Not sure we can get more than provided from this core as snmp_hostres
is not built with debugging symbols. You can try rebuilding
snmp_hostres with -g option, intalling and running gdb/bt again

DEBUG_FLAGS=-g make -C /usr/src/usr.sbin/bsnmpd/modules/snmp_hostres clean all 
install

AFAIK it might work or not. If it does not then wait for another crash :-)

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-10 Thread Miroslav Lachman

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.

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-10 Thread Mikolaj Golub
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

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


bsnmpd always died on HDD detach

2012-09-09 Thread Miroslav Lachman
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?

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-09 Thread Mikolaj Golub
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.

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org