segfault

Started by kiaj, October 04, 2013, 02:57:29 PM

Previous topic - Next topic

kiaj

hello, after creating Table DCI and columns in it server crash and do not start any way,

command to start: /usr/local/bin/netxmsd -c /etc/netxmsd.conf -d
log file:

[04-Oct-2013 15:47:50.646] Log file opened
[04-Oct-2013 15:47:50.650] [INFO ] Platform subagent "/usr/local/lib/libnsm_linux.so" successfully loaded
[04-Oct-2013 15:47:50.655] [INFO ] Database driver "/usr/local/lib/libnxddr_mysql.so" loaded and initialized successfully
[04-Oct-2013 15:47:50.678] [INFO ] Network device driver "NETSCREEN" loaded successfully
[04-Oct-2013 15:47:50.678] [INFO ] Network device driver "DLINK" loaded successfully
[04-Oct-2013 15:47:50.679] [INFO ] Network device driver "ERS8000" loaded successfully
[04-Oct-2013 15:47:50.679] [INFO ] Network device driver "CISCO-ESW" loaded successfully
[04-Oct-2013 15:47:50.679] [INFO ] Network device driver "PROCURVE" loaded successfully
[04-Oct-2013 15:47:50.679] [INFO ] Network device driver "NTWS" loaded successfully
[04-Oct-2013 15:47:50.680] [INFO ] Network device driver "CATALYST-GENERIC" loaded successfully
[04-Oct-2013 15:47:50.680] [INFO ] Network device driver "SYMBOL-WS" loaded successfully
[04-Oct-2013 15:47:50.680] [INFO ] Network device driver "BAYSTACK" loaded successfully
[04-Oct-2013 15:47:50.680] [INFO ] Network device driver "DELL-PWC" loaded successfully
[04-Oct-2013 15:47:50.681] [INFO ] Network device driver "CATALYST-2900XL" loaded successfully
[04-Oct-2013 15:47:57.514] [INFO ] Listening for SNMP traps on UDP socket 0.0.0.0:162
[04-Oct-2013 15:47:57.515] [INFO ] NetXMS Server started
[04-Oct-2013 15:47:57.516] [INFO ] Listening for mobile device connections on TCP socket 0.0.0.0:4747
[04-Oct-2013 15:47:57.516] [INFO ] Listening for client connections on TCP socket 0.0.0.0:4701

but netxms not work in real and process list is its not started in /var/log/messages this

Oct  4 15:32:20 syslog kernel: netxmsd[2029]: segfault at 0 ip b7212d03 sp b60ff07c error 4 in libc-2.11.1.so[b7199000+15c000]
Oct  4 15:44:36 syslog -- MARK --
Oct  4 15:48:00 syslog kernel: netxmsd[19998]: segfault at 0 ip b7271d03 sp b65ff07c error 4 in libc-2.11.1.so[b71f8000+15c000]

syste is Linux Slackware.

kiaj

here is debug info

[07-Oct-2013 09:21:07.142] [DEBUG] DCTable::columnIdFromName(): column name VM name added to cache, ID=2
[07-Oct-2013 09:21:07.142] [DEBUG] {0x804ded0} bind at pos 1: "1482969814819930112"
[07-Oct-2013 09:21:07.142] [DEBUG] {0x804ded0} bind at pos 2: "2"
Segmentation fault

any answers ?

kiaj

helps only removing that nodes from mysql manualy, can anybody said did dci table function work or not ?

Victor Kirhenshtein

Hi!

Was this SNMP or agent table? Looks very similar to https://www.netxms.org/forum/configuration/netxms-server-crash-1-2-9.

If you built server from sources, try to replace line 389 in file src/server/core/dctable.cpp which currently should looks like


if (_tcslen(s) < MAX_DB_STRING)


with


if ((s == NULL) || (_tcslen(s) < MAX_DB_STRING))


and rebuild server.

Best regards,
Victor

kiaj

hello, yes it is snmp table, but as i understand the error happend when apply snmp table with some mistakes, for now i compile server from source and apply correct table and everything work, i will testing more and when the error will happend i'll try your issue, and sorry for my bad english :)

kiaj

i tried recompile with changings, that is not help, server cruch after activate table, see attachments

maybe problem is in the oid's of vpn tunnel ifindex interface, it is changed after any reconnect or some time ago after time to live ends.

Victor Kirhenshtein

Hi!

Can you provide me a stack trace from debugger?

Best regards,
Victor

kiaj

trace with -D9 in attachment.

Victor Kirhenshtein

Are you sure you apply patch and rebuild server correctly? It crashes in same place as if it was not patched. How line 389 in src/server/core/dctable.cpp looks like now?

Best regards,
Victor

kiaj

i was change this string in file

if ((s == NULL) || (_tcslen(s) < MAX_DB_STRING))

then

./reconf
./configure --with-server --with-agent
./make
./make install

kiaj

shit, i do wrong comment in file :((( sorry, one more time try

kiaj

i replace code and everything is the same here stack trace

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb70ffb70 (LWP 10813)]
0xb7a15d03 in strlen () from /lib/libc.so.6
(gdb) bt
#0  0xb7a15d03 in strlen () from /lib/libc.so.6
#1  0xb7f1dec1 in DCTable::processNewValue (this=0x81273a0, nTimeStamp=1381732962, value=0xb480c4f8) at dctable.cpp:389
#2  0xb7f21120 in DataCollectionTarget::processNewDCValue (this=0x8128850, dco=0x81273a0, currTime=1381732962, value=0xb480c4f8) at dctarget.cpp:366
#3  0xb7f0d1af in DataCollector (pArg=0x0) at datacoll.cpp:254
#4  0xb7c38830 in start_thread () from /lib/libpthread.so.0
#5  0xb7a7c15e in clone () from /lib/libc.so.6