"Segmentation fault" with nxdbmgr on upgrade from 1.2.13 to 1.2.16

Started by silvanet, August 13, 2014, 12:55:31 AM

Previous topic - Next topic

silvanet

I am trying to upgrade vrom 1.2.13 to 1.2.16 and during the database upgrade I get the following:

nxdbmgr upgrade -t
NetXMS Database Manager Version 1.2.16 Build 7884

Upgrading database...
Upgrading from version 324 to 325
>>> SELECT map_id, element1, element2, element_data, color, status_object, routing, bend_points FROM network_map_links
Segmentation fault

Any ideas on how to fix this?

grimnir

Exactly the same issue under FreeBSD (FreeBSD 9.3-RELEASE, mysql-server 5.5.39).

Indeed, FreeBSD port of NetXMS is broken now: it does not install shared libraries files required for both netxmsd and nxagent (i.e., libnxsqlite.so.1.0.0,libnxdb.so.1.0.0 and so on)  .


Alex Kirhenshtein


silvanet

gdb nxdbmgr
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/local/bin/nxdbmgr...done.
(gdb) run upgrade
Starting program: /usr/local/bin/nxdbmgr upgrade
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
NetXMS Database Manager Version 1.2.16 Build 7884

[New Thread 0x7ffff538e700 (LWP 4472)]
[Thread 0x7ffff538e700 (LWP 4472) exited]
Upgrading database...
Upgrading from version 324 to 325

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6f99661 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6f99661 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x000000000040b100 in H_UpgradeFromV324 (currVersion=<optimized out>,
    newVersion=<optimized out>) at upgrade.cpp:499
#2  0x00000000004151d7 in UpgradeDatabase () at upgrade.cpp:8127
#3  0x000000000040338a in main (argc=<optimized out>, argv=0x7fffffffe6f8)
    at nxdbmgr.cpp:782
(gdb)

silvanet

It seems that this is related to the maps.  I am not fully using my maps at the moment.  Could I remove the maps from mysql tables?  If so, what would the proper sql commands to get rid of the maps?

Victor Kirhenshtein

Hi,

I probably found the bug. Try to patch src/server/tools/nxdbmgr/upgrade.cpp as following:

Find line 492 - it should be

         TCHAR *config = DBGetField(hResult, i, 3, NULL, 0);

insert after it the following code:

         if (config == NULL)
            config = _tcsdup(_T(""));

Rebuild nxdbmgr - it should work.

Best regards,
Victor


grimnir