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. Segfault on server when using DCI push

Segfault on server when using DCI push

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 6.8k 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.
  • T
    T
    tolimanjo
    wrote on last edited by
    #1

    Hi there,

    I'm getting a segfault on server 4.3.3 (Debian) when using PushDCIData() in a transform script. If the DCI I'm pushing to has 'Save only changed values' enabled, then a segfault occurs.

    I haven't been able to reproduce this behavior on a test platform, so can't rule out something else being the cause of the problem. Curiously, the fault only occurs after a restart of the server.

    Thread 33 "$DATACOLL/WRK" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff04b0700 (LWP 8118)]
    DCItem::processNewValue (this=0x7ffe2f3a7410, tmTimeStamp=tmTimeStamp@entry=1680668319, originalValue=originalValue@entry=0x7ffc8bcad844 L"20", updateStatus=0x7ffff04a9b97) at dcitem.cpp:698
    698    dcitem.cpp: No such file or directory.
    (gdb) bt
    #0  DCItem::processNewValue (this=0x7ffe2f3a7410, tmTimeStamp=tmTimeStamp@entry=1680668319, originalValue=originalValue@entry=0x7ffc8bcad844 L"20", updateStatus=0x7ffff04a9b97) at dcitem.cpp:698
    #1  0x00007ffff7c18dee in DataCollectionTarget::processNewDCValue (this=this@entry=0x7ffe2ef49010, dcObject=std::shared_ptr<DCObject> (use count 2, weak count 0) = {...}, currTime=currTime@entry=1680668319,
        itemValue=0x7ffc8bcad844 L"20", tableValue=std::shared_ptr<Table> (empty) = {...}) at /usr/include/c++/8/bits/shared_ptr_base.h:1018
    #2  0x00007ffff7beb450 in F_PushDCIData (argc=<optimized out>, argv=0x7ffc8bc15400, ppResult=0x7ffff04a9c50, vm=0x7ffc8bc42000) at /usr/include/c++/8/bits/shared_ptr_base.h:614
    #3  0x00007ffff7a20547 in NXSL_VM::callExternalFunction (stackItems=3, function=<optimized out>, this=0x7ffc8bc42000) at ../../include/nxsl_classes.h:201
    #4  NXSL_VM::callExternalFunction (this=0x7ffc8bc42000, function=<optimized out>, stackItems=3) at vm.cpp:2675
    #5  0x00007ffff7a24ea7 in NXSL_VM::execute (this=0x7ffc8bc42000) at vm.cpp:1411
    #6  0x00007ffff7a297c8 in NXSL_VM::run (this=this@entry=0x7ffc8bc42000, args=..., globals=globals@entry=0x0, expressionVariables=expressionVariables@entry=0x0, constants=constants@entry=0x0, entryPoint=entryPoint@entry=0x0)
        at vm.cpp:391
    #7  0x00007ffff7a29c42 in NXSL_VM::run (this=this@entry=0x7ffc8bc42000, argc=argc@entry=1, argv=argv@entry=0x7ffff04aa040, globals=globals@entry=0x0, expressionVariables=expressionVariables@entry=0x0, constants=constants@entry=0x0,
        entryPoint=0x0) at vm.cpp:321
    #8  0x00007ffff7c10dca in DCTable::transform (this=this@entry=0x7ffe2f140610, value=std::shared_ptr<Table> (use count 2, weak count 0) = {...}) at ../../../include/nxsl_classes.h:1427
    #9  0x00007ffff7c116e9 in DCTable::processNewValue (this=0x7ffe2f140610, timestamp=timestamp@entry=1680668319, value=std::shared_ptr<Table> (use count 2, weak count 0) = {...}, updateStatus=updateStatus@entry=0x7ffff04aa527)
        at dctable.cpp:357
    #10 0x00007ffff7c18d9c in DataCollectionTarget::processNewDCValue (this=0x7ffe2ef49010, dcObject=std::shared_ptr<DCObject> (use count 2, weak count 0) = {...}, currTime=currTime@entry=1680668319,
        itemValue=itemValue@entry=0x7ffff04aad60 L"", tableValue=std::shared_ptr<Table> (use count 2, weak count 0) = {...}) at /usr/include/c++/8/bits/shared_ptr_base.h:1018
    #11 0x00007ffff7be49c8 in DataCollector (dcObject=std::shared_ptr<DCObject> (use count 2, weak count 0) = {...}) at /usr/include/c++/8/bits/shared_ptr_base.h:762
    #12 0x00007ffff7c22afa in __ThreadPoolExecute_SharedPtr_Wrapper<DCObject> (arg=0x7ffc8c000020) at ../../../include/nms_threads.h:990
    #13 0x00007ffff794c21e in ProcessSerializedRequests (data=0x7ffc8c00b050) at tp.cpp:487
    #14 0x00007ffff794c066 in WorkerThread (threadInfo=0x7fffeb5b15b0) at tp.cpp:199
    #15 0x00007ffff794de4a in ThreadCreate_Wrapper_1<WorkerThreadInfo*> (context=0x7fffeb5b15c0) at ../../include/nms_threads.h:536
    #16 0x00007ffff779ffa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
    #17 0x00007ffff6ec206f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    (gdb)
    
    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      I was unable to reproduce it on my test system either. However, there is one path that could potentially lead to such crash. I've made changes to DCI value processing method, they will be included in upcoming patch release 4.3.4.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • T
        T
        tolimanjo
        wrote on last edited by
        #3

        Thanks for looking into that. 

        I've worked around the problem for now, so will wait and see if the patch fixes it.

        1 Reply Last reply
        0
        • T
          T
          tolimanjo
          wrote on last edited by
          #4

          Hi Victor,

          Upgrading to 4.3.4 did indeed fix the PushDCIData() segfault problem I was seeing.

          Thanks for your help.

          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