Agent exits with segmentation fault on FreeBSD

Started by possamai, January 14, 2012, 06:22:47 PM

Previous topic - Next topic

possamai

It's odd.. I tryed setting DebugLevel even higher but I'm not getting more information..

$ /usr/local/netxms/bin/nxagentd -c /usr/local/etc/nxagentd.conf
[14-Jan-2012 17:20:04] Additional configs was loaded from /etc/nxagentd.conf.d
[14-Jan-2012 17:20:04] Debug level set to 10
[14-Jan-2012 17:20:04] Subagent API initialized
[14-Jan-2012 17:20:04] Subagent "/usr/local/netxms/lib/libnsm_freebsd.so" loaded successfully
[14-Jan-2012 17:20:04] Debug callback set for DB library
[14-Jan-2012 17:20:05] External parameters providers poller thread will not start
[14-Jan-2012 17:20:05] Trying to bind on 0.0.0.0:4700
[14-Jan-2012 17:20:05] Listening on socket 0.0.0.0:4700
[14-Jan-2012 17:20:06] NetXMS Agent started
Agent running. Press Ctrl+C to shutdown.
[14-Jan-2012 17:20:21] Incoming connection from 192.168.1.10
[14-Jan-2012 17:20:21] Connection from 192.168.1.10 accepted
[14-Jan-2012 17:20:21] [session:0] Received control message CMD_GET_NXCP_CAPS
[14-Jan-2012 17:20:21] [session:0] Sending message CMD_NXCP_CAPS (size 16)
[14-Jan-2012 17:20:21] [session:0] Received message CMD_KEEPALIVE
[14-Jan-2012 17:20:21] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[14-Jan-2012 17:20:21] [session:0] Received message CMD_ENABLE_AGENT_TRAPS
[14-Jan-2012 17:20:21] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[14-Jan-2012 17:20:21] [session:0] Received message CMD_GET_PARAMETER
[14-Jan-2012 17:20:21] [session:0] Requesting parameter "Net.Interface.BytesIn(1)"
Segmentation fault: 11 (core dumped)

Victor Kirhenshtein

Hi!

Could you run agent under gdb and send me a backtrace?

Best regards,
Victor

nicolas_r

Hi

I'm running FreeBSD 9.0 amd64, and I'm facing the same problem. I have compiled netxms with clang and gcc, and get "BUS error, segmentation fault"

Here is the gdb stacktrace with a nxagentd compiled with gcc

root@shadowland /usr/local/netxms/bin# gdb nxagentd nxagentd.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"...
Core was generated by `nxagentd'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/local/netxms/lib/libnetxms.so.1...done.
Loaded symbols for /usr/local/netxms/lib/libnetxms.so.1
Reading symbols from /usr/local/netxms/lib/libnxdb.so.1...done.
Loaded symbols for /usr/local/netxms/lib/libnxdb.so.1
Reading symbols from /usr/local/netxms/lib/libnxtre.so.5...done.
Loaded symbols for /usr/local/netxms/lib/libnxtre.so.5
Reading symbols from /lib/libkvm.so.5...done.
Loaded symbols for /lib/libkvm.so.5
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /lib/libz.so.6...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /lib/libreadline.so.8...done.
Loaded symbols for /lib/libreadline.so.8
Reading symbols from /lib/libncurses.so.8...done.
Loaded symbols for /lib/libncurses.so.8
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/netxms/lib/libnsm_freebsd.so...done.
Loaded symbols for /usr/local/netxms/lib/libnsm_freebsd.so
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000800ea5e08 in _kvm_nlist () from /lib/libkvm.so.5
[New Thread 80385cc00 (LWP 101315/nxagentd)]
[New Thread 80385c800 (LWP 101314/nxagentd)]
[New Thread 80385c400 (LWP 101313/nxagentd)]
[New Thread 803009000 (LWP 101312/nxagentd)]
[New Thread 803008c00 (LWP 101311/nxagentd)]
[New Thread 803008800 (LWP 101310/nxagentd)]
[New Thread 803008400 (LWP 101309/nxagentd)]
[New Thread 803007400 (LWP 100449/nxagentd)]
(gdb) bt
#0  0x0000000800ea5e08 in _kvm_nlist () from /lib/libkvm.so.5
#1  0x0000000802c9a6d3 in H_NetIfInfoFromKVM (pszParam=Variable "pszParam" is not available.
) at net.cpp:589
#2  0x00000000004085df in GetParameterValue (dwSessionId=0, pszParam=0x7fffff6f8d90 "Net.Interface.BytesOut(*)",
    pszValue=0x7fffff6f8c90 "1") at getparam.cpp:515
#3  0x000000000040d22e in CommSession::getParameter (this=0x803823080, pRequest=Variable "pRequest" is not available.
) at session.cpp:653
#4  0x000000000040da44 in CommSession::processingThread (this=0x803823080) at session.cpp:441
#5  0x000000000040dab9 in CommSession::processingThreadStarter (pArg=Variable "pArg" is not available.
) at session.cpp:83
#6  0x0000000802736274 in pthread_getprio () from /lib/libthr.so.3
#7  0x0000000000000000 in ?? ()
Cannot access memory at address 0x7fffff6f9000

Hope that it will help you

Nicolas