Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. "Segmentation fault" with nxdbmgr on upgrade from 1.2.13 to 1.2.16

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

Scheduled Pinned Locked Moved Support
8 Posts 4 Posters 16.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    S
    silvanet
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • G
      G
      grimnir
      wrote on last edited by
      #2

      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)  .

      1 Reply Last reply
      0
      • A
        A
        Alex Kirhenshtein
        wrote on last edited by
        #3

        Please provide backtrace of this crash (details on how to get a backtrace: https://wiki.debian.org/HowToGetABacktrace#Running_gdb)

        1 Reply Last reply
        0
        • S
          S
          silvanet
          wrote on last edited by
          #4

          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)

          1 Reply Last reply
          0
          • S
            S
            silvanet
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • S
                S
                silvanet
                wrote on last edited by
                #7

                Thanks!!  That fixed it.

                1 Reply Last reply
                0
                • G
                  G
                  grimnir
                  wrote on last edited by
                  #8

                  Yes, this patch fixes the database upgrade crash.
                  Thanks!

                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  Powered by NodeBB Contributors
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups