DX Infrastructure Manager

Expand all | Collapse all

dirscan segfault

  • 1.  dirscan segfault

    Posted 03-31-2015 06:22 AM

    Hi all,

    sorry if this question is in wrong forum, maybe some mod can move the thread to correct forum then?

     

    I use dirscan v. 3.11 and have two active profiles to check if two different directories exist but dirscan segfaults over and over again (since nimbus trying to restart the probe):

    [1727122.381022] dirscan[12919]: segfault at 0 ip 00007f7fa9b8a86f sp 00007f7fa9a6be38 error 4 in libc-2.13.so[7f7fa9a71000+180000]

    [1727242.916167] dirscan[12932]: segfault at 0 ip 00007f7f5849686f sp 00007f7f58377e38 error 4 in libc-2.13.so[7f7f5837d000+180000]

    [1727469.597456] dirscan[12971]: segfault at 0 ip 00007fce5906186f sp 00007fce58f42e38 error 4 in libc-2.13.so[7fce58f48000+180000]


    GDB didn't reveal so much about the problem:

    <GDB generic header>

    Reading symbols from /opt/nimsoft/probes/system/dirscan/dirscan...(no debugging symbols found)...done.

    [New LWP 12911]

    [New LWP 12881]

     

    warning: Can't read pathname for load map: Input/output error.

    [Thread debugging using libthread_db enabled]

    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

    Core was generated by `./dirscan'.

    Program terminated with signal 11, Segmentation fault.

    #0  0x00007eff9927f86f in ?? () from /lib/x86_64-linux-gnu/libc.so.6

    (gdb) bt

    #0  0x00007eff9927f86f in ?? () from /lib/x86_64-linux-gnu/libc.so.6

    #1  0x000000000042c49f in ?? ()

    #2  0x000000000041fc2d in ?? ()

    #3  0x0000000000411cbf in ?? ()

    #4  0x0000000000415b04 in ?? ()

    #5  0x000000000041d43c in ?? ()

    #6  0x00007eff996fab50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0

    #7  0x00007eff99240a7d in clone () from /lib/x86_64-linux-gnu/libc.so.6

    #8  0x0000000000000000 in ?? ()

     

    When i run the dirscan binary with strace, I'll see the following:

    mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f06297f8000

    mprotect(0x7f06297f8000, 4096, PROT_NONE) = 0

    clone(child_stack=0x7f0629ff7ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f0629ff89d0, tls=0x7f0629ff8700, child_tidptr=0x7f0629ff89d0) = 14152

     

     

    And strace for pid 14152 (before segfault):

    write(3, "Mar 31 12:07:09:235 [13966445114"..., 75) = 75

    write(3, "Mar 31 12:07:09:235 [13966445114"..., 75) = 75

    write(3, "Mar 31 12:07:09:235 [13966445114"..., 75) = 75

    time([1427796429])                      = 1427796429

    stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0

    write(3, "Mar 31 12:07:09:235 [13966445114"..., 123) = 123

    open("/opt/wordpress_install/uploads/cache", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5

    getdents(5, /* 3 entries */, 32768)     = 80

    --- SIGSEGV (Segmentation fault) @ 0 (0) ---

     

    Any clues what can cause this bug?

    BR

    //Robert

     

     




  • 2.  Re: dirscan segfault

    Posted 04-03-2015 01:18 AM

    I ran into this before; mine was a sigsev 11 I believe.

     

    I would start a fresh configuration (rename your .cfg and bring it back up) and configure this via Admin Console.

     

    If you try running this through Valgrind and attach to the processes - I think you'll see a memory violation. I believe the path you're using is around 64 characters? From what I recall - it was running out of bounds somewhere and will eventually hit some memory it shouldn't.

     

    From what I could gather when I tried to dissemble the code - there are two different profiles one for pre-Admin Console(C/C++) and one for post-Admin console (Java). The code path in Java/connected to Admin Console does not seem to suffer from this.

     

    Regards,

    Philip B