Open klepsydra-technologies opened 6 years ago
Please check if it works.
sorry. Will try tonight and come back to you. Same with the other issue
Fixed.
Hi,
sorry, I spoke too soon. This error happened again (with your latest code):
E/05-02-2018 23:33:17.499 Server.cpp:325 closeConnection: Failed to remove client No such file or directory Error in `./bin/kpsr_bst_example1': double free or corruption (out): 0x00007f6254003c00 ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f625b39f7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f625b3a837a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f625b3ac53c] /opt/klepsydra/lib/libkpsr_admin.so(_ZN6ngrest13ClientHandler12disconnectedEi+0xc2)[0x7f625c940c2a] /opt/klepsydra/lib/libkpsr_admin.so(_ZN6ngrest6Server15closeConnectionEi+0x10a)[0x7f625c947da0] /opt/klepsydra/lib/libkpsr_admin.so(_ZN6ngrest6Server13handleRequestEi+0x9b)[0x7f625c948895] /opt/klepsydra/lib/libkpsr_admin.so(_ZN6ngrest6Server4execEv+0x68c)[0x7f625c947944] /opt/klepsydra/lib/libkpsr_admin.so(_ZN4kpsr5admin7restapi18RestAdminContainer18createAdminServiceEv+0x1c4)[0x7f625c91f420] /opt/klepsydra/lib/libkpsr_admin.so(_ZNKSt12_Mem_fn_baseIMN4kpsr5admin7restapi18RestAdminContainerEFvvELb1EEclIJEvEEvPS3DpOT+0x65)[0x7f625c93b139] /opt/klepsydra/lib/libkpsr_admin.so(_ZNSt12_Bind_simpleIFSt7_Mem_fnIMN4kpsr5admin7restapi18RestAdminContainerEFvvEEPS4_EE9_M_invokeIILm0EEEEvSt12_Index_tupleIIXspT_EEE+0x43)[0x7f625c9398df] /opt/klepsydra/lib/libkpsr_admin.so(_ZNSt12_Bind_simpleIFSt7_Mem_fnIMN4kpsr5admin7restapi18RestAdminContainerEFvvEEPS4_EEclEv+0x2c)[0x7f625c937f4c] /opt/klepsydra/lib/libkpsr_admin.so(_ZNSt6thread5_ImplISt12_Bind_simpleIFSt7_Mem_fnIMN4kpsr5admin7restapi18RestAdminContainerEFvvEEPS6_EEE6_M_runEv+0x1c)[0x7f625c936420] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb8c80)[0x7f625b9c0c80] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f625bf336ba] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f625b42f41d] ======= Memory map: ======== 00400000-006a3000 r-xp 00000000 08:01 1881638 /home/pablogh/thirdparties/klepsydra/kpsr-bst/build/bin/kpsr_bst_example1 008a3000-008a4000 r--p 002a3000 08:01 1881638 /home/pablogh/thirdparties/klepsydra/kpsr-bst/build/bin/kpsr_bst_example1 008a4000-008a5000 rw-p 002a4000 08:01 1881638 /home/pablogh/thirdparties/klepsydra/kpsr-bst/build/bin/kpsr_bst_example1 02263000-02295000 rw-p 00000000 00:00 0 [heap] 7f621c000000-7f621c021000 rw-p 00000000 00:00 0 7f621c021000-7f6220000000 ---p 00000000 00:00 0 7f6220000000-7f622003e000 rw-p 00000000 00:00 0 7f622003e000-7f6224000000 ---p 00000000 00:00 0 7f6224000000-7f6224021000 rw-p 00000000 00:00 0 7f6224021000-7f6228000000 ---p 00000000 00:00 0 7f6228000000-7f6228021000 rw-p 00000000 00:00 0 7f6228021000-7f622c000000 ---p 00000000 00:00 0 7f622c000000-7f622c021000 rw-p 00000000 00:00 0 7f622c021000-7f6230000000 ---p 00000000 00:00 0 7f6230000000-7f6230021000 rw-p 00000000 00:00 0 7f6230021000-7f6234000000 ---p 00000000 00:00 0 7f6234000000-7f6234021000 rw-p 00000000 00:00 0 7f6234021000-7f6238000000 ---p 00000000 00:00 0 7f6238000000-7f6238021000 rw-p 00000000 00:00 0 7f6238021000-7f623c000000 ---p 00000000 00:00 0 7f623c000000-7f623c021000 rw-p 00000000 00:00 0 7f623c021000-7f6240000000 ---p 00000000 00:00 0 7f6240000000-7f6240021000 rw-p 00000000 00:00 0 7f6240021000-7f6244000000 ---p 00000000 00:00 0 7f6244000000-7f6244021000 rw-p 00000000 00:00 0 7f6244021000-7f6248000000 ---p 00000000 00:00 0 7f624afee000-7f624afef000 ---p 00000000 00:00 0 7f624afef000-7f624b7ef000 rw-p 00000000 00:00 0 7f624b7ef000-7f624b7f0000 ---p 00000000 00:00 0 7f624b7f0000-7f624bff0000 rw-p 00000000 00:00 0 7f624bff0000-7f624bff1000 ---p 00000000 00:00 0 7f624bff1000-7f624c7f1000 rw-p 00000000 00:00 0 7f624c7f1000-7f624c7f2000 ---p 00000000 00:00 0 7f624c7f2000-7f624cff2000 rw-p 00000000 00:00 0 7f624cff2000-7f624cff3000 ---p 00000000 00:00 0 7f624cff3000-7f624d7f3000 rw-p 00000000 00:00 0 7f624d7f3000-7f624d7f4000 ---p 00000000 00:00 0 7f624d7f4000-7f624dff4000 rw-p 00000000 00:00 0 7f624dff4000-7f624dff5000 ---p 00000000 00:00 0 7f624dff5000-7f624e7f5000 rw-p 00000000 00:00 0 7f624e7f5000-7f624e7f6000 ---p 00000000 00:00 0 7f624e7f6000-7f624eff6000 rw-p 00000000 00:00 0 7f624eff6000-7f624eff7000 ---p 00000000 00:00 0 7f624eff7000-7f624f7f7000 rw-p 00000000 00:00 0 7f624f7f7000-7f624f7f8000 ---p 00000000 00:00 0 7f624f7f8000-7f624fff8000 rw-p 00000000 00:00 0 7f624fff8000-7f624fff9000 ---p 00000000 00:00 0 7f624fff9000-7f62507f9000 rw-p 00000000 00:00 0 7f62507f9000-7f62507fa000 ---p 00000000 00:00 0 7f62507fa000-7f6250ffa000 rw-p 00000000 00:00 0 7f6250ffa000-7f6250ffb000 ---p 00000000 00:00 0 7f6250ffb000-7f62517fb000 rw-p 00000000 00:00 0 7f62517fb000-7f62517fc000 ---p 00000000 00:00 0 7f62517fc000-7f6251ffc000 rw-p 00000000 00:00 0 7f6251ffc000-7f6251ffd000 ---p 00000000 00:00 0 7f6251ffd000-7f62527fd000 rw-p 00000000 00:00 0 7f62527fd000-7f62527fe000 ---p 00000000 00:00 0 7f62527fe000-7f6252ffe000 rw-p 00000000 00:00 0 7f6252ffe000-7f6252fff000 ---p 00000000 00:00 0 7f6252fff000-7f62537ff000 rw-p 00000000 00:00 0 7f62537ff000-7f6253800000 ---p 00000000 00:00 0 7f6253800000-7f6254000000 rw-p 00000000 00:00 0 7f6254000000-7f6254021000 rw-p 00000000 00:00 0 7f6254021000-7f6258000000 ---p 00000000 00:00 0 7f6258152000-7f6258153000 ---p 00000000 00:00 0 7f6258153000-7f6258953000 rw-p 00000000 00:00 0 7f6258953000-7f625895e000 r-xp 00000000 08:01 793219 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f625895e000-7f6258b5d000 ---p 0000b000 08:01 793219 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f6258b5d000-7f6258b5e000 r--p 0000a000 08:01 793219 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f6258b5e000-7f6258b5f000 rw-p 0000b000 08:01 793219 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f6258b5f000-7f6258b65000 rw-p 00000000 00:00 0 7f6258b65000-7f6258b66000 ---p 00000000 00:00 0 7f6258b66000-7f6259366000 rw-p 00000000 00:00 0 7f6259366000-7f6259367000 ---p 00000000 00:00 0 7f6259367000-7f6259b67000 rw-p 00000000 00:00 0 7f6259b67000-7f6259b68000 ---p 00000000 00:00 0 7f6259b68000-7f625a368000 rw-p 00000000 00:00 0 7f625a368000-7f625a36b000 r-xp 00000000 08:01 793206 /lib/x86_64-linux-gnu/libdl-2.23.so 7f625a36b000-7f625a56a000 ---p 00003000 08:01 793206 /lib/x86_64-linux-gnu/libdl-2.23.so 7f625a56a000-7f625a56b000 r--p 00002000 08:01 793206 /lib/x86_64-linux-gnu/libdl-2.23.so 7f625a56b000-7f625a56c000 rw-p 00003000 08:01 793206 /lib/x86_64-linux-gnu/libdl-2.23.so 7f625a56c000-7f625a573000 r-xp 00000000 08:01 559475 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestjson.so 7f625a573000-7f625a772000 ---p 00007000 08:01 559475 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestjson.so 7f625a772000-7f625a773000 r--p 00006000 08:01 559475 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestjson.so 7f625a773000-7f625a774000 rw-p 00007000 08:01 559475 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestjson.so 7f625a774000-7f625a7ec000 r-xp 00000000 08:01 147693 /usr/local/lib/libyaml-cpp.so.0.5.3 7f625a7ec000-7f625a9ec000 ---p 00078000 08:01 147693 /usr/local/lib/libyaml-cpp.so.0.5.3 7f625a9ec000-7f625a9ed000 r--p 00078000 08:01 147693 /usr/local/lib/libyaml-cpp.so.0.5.3 7f625a9ed000-7f625a9ee000 rw-p 00079000 08:01 147693 /usr/local/lib/libyaml-cpp.so.0.5.3 7f625a9ee000-7f625a9f0000 rw-p 00000000 00:00 0 7f625a9f0000-7f625a9f3000 r-xp 00000000 08:01 559467 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestcommon.so 7f625a9f3000-7f625abf2000 ---p 00003000 08:01 559467 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestcommon.so 7f625abf2000-7f625abf3000 r--p 00002000 08:01 559467 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestcommon.so 7f625abf3000-7f625abf4000 rw-p 00003000 08:01 559467 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestcommon.so 7f625abf4000-7f625ac15000 r-xp 00000000 08:01 559451 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestutils.so 7f625ac15000-7f625ae14000 ---p 00021000 08:01 559451 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestutils.so 7f625ae14000-7f625ae15000 r--p 00020000 08:01 559451 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestutils.so 7f625ae15000-7f625ae16000 rw-p 00021000 08:01 559451 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestutils.so 7f625ae16000-7f625ae17000 rw-p 00000000 00:00 0 7f625ae17000-7f625af1f000 r-xp 00000000 08:01 788016 /lib/x86_64-linux-gnu/libm-2.23.so 7f625af1f000-7f625b11e000 ---p 00108000 08:01 788016 /lib/x86_64-linux-gnu/libm-2.23.so 7f625b11e000-7f625b11f000 r--p 00107000 08:01 788016 /lib/x86_64-linux-gnu/libm-2.23.so 7f625b11f000-7f625b120000 rw-p 00108000 08:01 788016 /lib/x86_64-linux-gnu/libm-2.23.so 7f625b120000-7f625b127000 r-xp 00000000 08:01 793224 /lib/x86_64-linux-gnu/librt-2.23.so 7f625b127000-7f625b326000 ---p 00007000 08:01 793224 /lib/x86_64-linux-gnu/librt-2.23.so 7f625b326000-7f625b327000 r--p 00006000 08:01 793224 /lib/x86_64-linux-gnu/librt-2.23.so 7f625b327000-7f625b328000 rw-p 00007000 08:01 793224 /lib/x86_64-linux-gnu/librt-2.23.so 7f625b328000-7f625b4e8000 r-xp 00000000 08:01 793204 /lib/x86_64-linux-gnu/libc-2.23.so 7f625b4e8000-7f625b6e8000 ---p 001c0000 08:01 793204 /lib/x86_64-linux-gnu/libc-2.23.so 7f625b6e8000-7f625b6ec000 r--p 001c0000 08:01 793204 /lib/x86_64-linux-gnu/libc-2.23.so 7f625b6ec000-7f625b6ee000 rw-p 001c4000 08:01 793204 /lib/x86_64-linux-gnu/libc-2.23.so 7f625b6ee000-7f625b6f2000 rw-p 00000000 00:00 0 7f625b6f2000-7f625b708000 r-xp 00000000 08:01 792483 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f625b708000-7f625b907000 ---p 00016000 08:01 792483 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f625b907000-7f625b908000 rw-p 00015000 08:01 792483 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f625b908000-7f625ba7a000 r-xp 00000000 08:01 2061 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f625ba7a000-7f625bc7a000 ---p 00172000 08:01 2061 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f625bc7a000-7f625bc84000 r--p 00172000 08:01 2061 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f625bc84000-7f625bc86000 rw-p 0017c000 08:01 2061 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f625bc86000-7f625bc8a000 rw-p 00000000 00:00 0 7f625bc8a000-7f625bd27000 r-xp 00000000 08:01 132892 /usr/local/lib/liblog4cpp.so.5.0.6 7f625bd27000-7f625bf26000 ---p 0009d000 08:01 132892 /usr/local/lib/liblog4cpp.so.5.0.6 7f625bf26000-7f625bf28000 r--p 0009c000 08:01 132892 /usr/local/lib/liblog4cpp.so.5.0.6 7f625bf28000-7f625bf2c000 rw-p 0009e000 08:01 132892 /usr/local/lib/liblog4cpp.so.5.0.6 7f625bf2c000-7f625bf44000 r-xp 00000000 08:01 793203 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f625bf44000-7f625c143000 ---p 00018000 08:01 793203 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f625c143000-7f625c144000 r--p 00017000 08:01 793203 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f625c144000-7f625c145000 rw-p 00018000 08:01 793203 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f625c145000-7f625c149000 rw-p 00000000 00:00 0 7f625c149000-7f625c1b7000 r-xp 00000000 08:01 559531 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestengine.so 7f625c1b7000-7f625c3b6000 ---p 0006e000 08:01 559531 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestengine.so 7f625c3b6000-7f625c3b7000 r--p 0006d000 08:01 559531 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestengine.so 7f625c3b7000-7f625c3ba000 rw-p 0006e000 08:01 559531 /home/pablogh/thirdparties/ngrest/build/deploy/lib/libngrestengine.so 7f625c3ba000-7f625c3f5000 r-xp 00000000 08:01 1467966 /opt/klepsydra/lib/libkpsr_core.so 7f625c3f5000-7f625c5f5000 ---p 0003b000 08:01 1467966 /opt/klepsydra/lib/libkpsr_core.so 7f625c5f5000-7f625c5f6000 r--p 0003b000 08:01 1467966 /opt/klepsydra/lib/libkpsr_core.so 7f625c5f6000-7f625c5f8000 rw-p 0003c000 08:01 1467966 /opt/klepsydra/lib/libkpsr_core.so 7f625c5f8000-7f625c613000 r-xp 00000000 08:01 1467968 /opt/klepsydra/lib/libkpsr_mem.so 7f625c613000-7f625c812000 ---p 0001b000 08:01 1467968 /opt/klepsydra/lib/libkpsr_mem.so 7f625c812000-7f625c813000 r--p 0001a000 08:01 1467968 /opt/klepsydra/lib/libkpsr_mem.so 7f625c813000-7f625c814000 rw-p 0001b000 08:01 1467968 /opt/klepsydra/lib/libkpsr_mem.so 7f625c814000-7f625c98a000 r-xp 00000000 08:01 1467984 /opt/klepsydra/lib/libkpsr_admin.so 7f625c98a000-7f625cb8a000 ---p 00176000 08:01 1467984 /opt/klepsydra/lib/libkpsr_admin.so 7f625cb8a000-7f625cb8c000 r--p 00176000 08:01 1467984 /opt/klepsydra/lib/libkpsr_admin.so 7f625cb8c000-7f625cb93000 rw-p 00178000 08:01 1467984 /opt/klepsydra/lib/libkpsr_admin.so 7f625cb93000-7f625cb94000 rw-p 00000000 00:00 0 7f625cb94000-7f625cb96000 r-xp 00000000 08:01 1881623 /home/pablogh/thirdparties/klepsydra/kpsr-bst/build/bin/libserver_utils.so 7f625cb96000-7f625cd95000 ---p 00002000 08:01 1881623 /home/pablogh/thirdparties/klepsydra/kpsr-bst/build/bin/libserver_utils.soAborted (core dumped)
Can you please send me a clean example on how to reproduce this issue. A service and the curl/wrk command? And how many requests you've done to reproduce?
Hi,
i reproduced it again, with debug build. The core says the following:
[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./bin/kpsr_bst_example1 -a 9090'. Program terminated with signal SIGABRT, Aborted.
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. [Current thread is 1 (Thread 0x7faa7c390700 (LWP 19573))] (gdb) bt
at ../sysdeps/posix/libc_fatal.c:175
action=3) at malloc.c:5006
at /home/pablogh/thirdparties/ngrest/core/server/src/ClientHandler.cpp:218
at /home/pablogh/thirdparties/ngrest/core/server/src/Server.cpp:332
at /home/pablogh/thirdparties/ngrest/core/server/src/Server.cpp:496
Also attached the valgrind core file vgcore.zip
HI
Cam you provide a test case/ code /etc to rteproduce the exact issue? The logs you have given are a great help but I would like to reproduce the problem.
Yours sincerely, Arvind.
Dear all,
When running ngrest for a while, I get a crash. I have compiled in debug, and got the following stack trace. If you can give me some advise on this, I would appreciate it.
Thanks,
[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./bin/kpsr_bst_eventloop_example -a 9090'. Program terminated with signal SIGABRT, Aborted.
0 0x00007fc076698428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. [Current thread is 1 (Thread 0x7fc074e38700 (LWP 4402))] b(gdb) bt
0 0x00007fc076698428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
1 0x00007fc07669a02a in __GI_abort () at abort.c:89
2 0x00007fc0766da7ea in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fc0767f3e98 " Error in `%s': %s: 0x%s \n")
3 0x00007fc0766e64aa in malloc_printerr (ar_ptr=0x3, ptr=, str=, action=3) at malloc.c:5006
4 _int_realloc (av=av@entry=0x7fc058000020, oldp=oldp@entry=0x7fc058002db0, oldsize=oldsize@entry=7162798707571975528, nb=nb@entry=4112)
5 0x00007fc0766e7839 in __GI___libc_realloc (oldmem=0x7fc058002dc0, bytes=4096) at malloc.c:3045
6 0x00007fc075ed5d6d in ngrest::MemPool::newChunk (this=0x7fc06c002e60, size=4096)
7 0x00007fc0777be82d in ngrest::MemPool::grow (this=0x7fc06c002e60, growSize=32)
8 0x00007fc0777ced1e in ngrest::MemPool::alloc<ngrest::NamedNode, char const*> (this=0x7fc06c002e60, p1=0x7fc0777dc666 "type")
9 0x00007fc0777d3b67 in kpsr::admin::PublisherStatisticsSerializer::serialize (context=0x7fc06c003c58, value=..., node=0x7fc058006c5c)
10 0x00007fc0777c716c in kpsr::admin::restapi::RestAdminInterfaceWrapper::Callback_getAllPublisherStatistics::success (this=0x7fc058005e08,