Jump to content
OpenSplice DDS Forum
Sign in to follow this  
bonjefir

Double free error

Recommended Posts

bonjefir   

Hi

 

I'm using DDS opensplice community edition in my programs. Everything looks fine except when I want to close the program. I receive this error "double free or corruption (!prev)" everytime I click on quit button. I'm sure that this error is related to the DDS program but I don't know what to do. Should I do some configuration before starting or stopping dds opensplice?

 

Thanks in advance for your help.

Share this post


Link to post
Share on other sites

What version of OpenSplice community-edition are you using ?

The V6 version supports the 'single-process mode' where the DDS infrastructure doesn't need to be started/stopped as its merely a library thats linked with your application (so the lifecycle's of the middleware and the application itself are tightly coupled).

 

Could you share the info/error-log files of OpenSplice as that might provide some more details on whats happening ?

Share this post


Link to post
Share on other sites
bonjefir   

What version of OpenSplice community-edition are you using ?

The V6 version supports the 'single-process mode' where the DDS infrastructure doesn't need to be started/stopped as its merely a library thats linked with your application (so the lifecycle's of the middleware and the application itself are tightly coupled).

 

Could you share the info/error-log files of OpenSplice as that might provide some more details on whats happening ?

 

Dear Hans,

 

Thanks for your answer. I'm using the last version which is available on your site. I don't have a ospl-error log but I put the ospl-info log below for your information.

 

========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:36:49 MST 2014
Description : u_domainNew:Database allocated on heap
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : spliced 7f2b51be6700
Internals   : V6.4.140320OSS/24b1387/24b1387/user::u_domain::u_domainNew/u_domain.c/706/0/1419937609.371976283
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:36:49 MST 2014
Description : ---------------------------------------------------------------
              -- The service is using the following configuration settings --
              ---------------------------------------------------------------
              Domain (id)          : ospl_sp_ddsi (0)
              Storage              : 10240 Kbytes
              Storage threshold    : 1024 Kbytes
              Storage address      : Not available
              Locking              : default
              Memory mode          : Heap memory
              Builtin topics       : true
              Priority inheritance : false
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : spliced 7f2b51be6700
Internals   : V6.4.140320OSS/24b1387/24b1387/The OpenSplice domain service/u_domain.c/827/0/1419937609.379826739
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:36:49 MST 2014
Description : ++++++++++++++++++++++++++++++++++++++++++++++++
              ++ The service 'splicedaemon' is now operational. 
              ++++++++++++++++++++++++++++++++++++++++++++++++
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : spliced 7f2b51be6700
Internals   : V6.4.140320OSS/24b1387/24b1387/v_serviceChangeState/v_service.c/329/0/1419937609.380508338
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:36:49 MST 2014
Description : SOAP service is reachable via port 40391
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : cmsoap 7f2b41ab6700
Internals   : V6.4.140320OSS/24b1387/24b1387/CM SOAP Service/cms_service.c/410/0/1419937609.381675611
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:36:49 MST 2014
Description : ++++++++++++++++++++++++++++++++++++++++++++++++
              ++ The service 'cmsoap' is now operational. 
              ++++++++++++++++++++++++++++++++++++++++++++++++
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : cmsoap 7f2b41ab6700
Internals   : V6.4.140320OSS/24b1387/24b1387/v_serviceChangeState/v_service.c/329/0/1419937609.381903113
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:36:49 MST 2014
Description : ++++++++++++++++++++++++++++++++++++++++++++++++
              ++ The service 'ddsi2' is now operational. 
              ++++++++++++++++++++++++++++++++++++++++++++++++
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : ddsi2 7f2b413e7700
Internals   : V6.4.140320OSS/24b1387/24b1387/v_serviceChangeState/v_service.c/329/0/1419937609.386746197
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:36:49 MST 2014
Description : The durability service can by identified by ID: 274089247
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : durability 7f2b41756700
Internals   : V6.4.140320OSS/24b1387/24b1387/DurabilityService/d_durability.c/476/0/1419937609.792663758
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:37:00 MST 2014
Description : ++++++++++++++++++++++++++++++++++++++++++++++++
              ++ The service 'durability' is now operational. 
              ++++++++++++++++++++++++++++++++++++++++++++++++
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : durability 7f2b41756700
Internals   : V6.4.140320OSS/24b1387/24b1387/v_serviceChangeState/v_service.c/329/0/1419937620.101388238
========================================================================================
Report      : INFO
Date        : Tue Dec 30 14:37:03 MST 2014
Description : Exception (signal 6) occurred in process
Node        : bonjefir-PC
Process     : Publisher <9242>
Thread      : signalHandler 7f2b494b6700
Internals   : V6.4.140320OSS/24b1387/24b1387/signalHandlerThread/os_signalHandler.c/447/0/1419937623.355022811

Thanks in advance for your help.

Share this post


Link to post
Share on other sites
bonjefir   

Don't bother yourself !!! Anyway, I solved the problem by modifying the libraries that I linked to my program. The correct libraries that you must put them in .pro file of your Qt Project is like below (in case you want to write your programs in ISO CPP); My OS is linux 64 bit, my Qt version is 5.3.1 and my OpenSplice version is "OpenSplice HDE Release V6.4.140407OSS For x86_64.linux". Please correct me if I'm wrong somewhere or missed something.

unix:LIBS += -L$$(OSPL_HOME)/lib/ -lddskernel -ldcpsisocpp
INCLUDEPATH += $$(OSPL_HOME)/include/dcps/C++/SACPP
INCLUDEPATH += $$(OSPL_HOME)/include/dcps/C++/isocpp
DEPENDPATH += $$(OSPL_HOME)/include/dcps/C++/isocpp
DEPENDPATH += $$(OSPL_HOME)/include/dcps/C++/SACPP

Share this post


Link to post
Share on other sites

This error occurs when linking both -ldcpsisocpp and -ldcpssacpp both at the same time.

I have seen same problem in sample application.

https://github.com/PrismTech/dds-tutorial-cpp-ex

 

exp. compile the dds-tutorial-cpp-ex/ch1, run tspub application without giving parameter. Application gives same error

on CentOS 6

 

[root@arda ch1]# ./tspub
USAGE:
         tspub <sensor-id>
*** glibc detected *** ./tspub: double free or corruption (!prev): 0x00000000012a7fe0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3bf5c76166]
/lib64/libc.so.6[0x3bf5c78c93]
/lib64/libc.so.6(__cxa_finalize+0x9d)[0x3bf5c361bd]
/usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libdcpsisocpp.so(+0xcff83)[0x7f29165c5f83]
======= Memory map: ========
00400000-00418000 r-xp 00000000 fd:00 3936835                            /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/examples/arda/dds-tutorial-cpp-ex/ch1/tspub
00618000-00619000 rw-p 00018000 fd:00 3936835                            /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/examples/arda/dds-tutorial-cpp-ex/ch1/tspub
012a5000-012c6000 rw-p 00000000 00:00 0                                  [heap]
3bf5400000-3bf5420000 r-xp 00000000 fd:00 652830                         /lib64/ld-2.12.so
3bf561f000-3bf5620000 r--p 0001f000 fd:00 652830                         /lib64/ld-2.12.so
3bf5620000-3bf5621000 rw-p 00020000 fd:00 652830                         /lib64/ld-2.12.so
3bf5621000-3bf5622000 rw-p 00000000 00:00 0
3bf5c00000-3bf5d8b000 r-xp 00000000 fd:00 652832                         /lib64/libc-2.12.so
3bf5d8b000-3bf5f8a000 ---p 0018b000 fd:00 652832                         /lib64/libc-2.12.so
3bf5f8a000-3bf5f8e000 r--p 0018a000 fd:00 652832                         /lib64/libc-2.12.so
3bf5f8e000-3bf5f8f000 rw-p 0018e000 fd:00 652832                         /lib64/libc-2.12.so
3bf5f8f000-3bf5f94000 rw-p 00000000 00:00 0
3bf6000000-3bf6017000 r-xp 00000000 fd:00 652922                         /lib64/libpthread-2.12.so
3bf6017000-3bf6217000 ---p 00017000 fd:00 652922                         /lib64/libpthread-2.12.so
3bf6217000-3bf6218000 r--p 00017000 fd:00 652922                         /lib64/libpthread-2.12.so
3bf6218000-3bf6219000 rw-p 00018000 fd:00 652922                         /lib64/libpthread-2.12.so
3bf6219000-3bf621d000 rw-p 00000000 00:00 0
3bf6400000-3bf6402000 r-xp 00000000 fd:00 653104                         /lib64/libdl-2.12.so
3bf6402000-3bf6602000 ---p 00002000 fd:00 653104                         /lib64/libdl-2.12.so
3bf6602000-3bf6603000 r--p 00002000 fd:00 653104                         /lib64/libdl-2.12.so
3bf6603000-3bf6604000 rw-p 00003000 fd:00 653104                         /lib64/libdl-2.12.so
3bf6c00000-3bf6c83000 r-xp 00000000 fd:00 653141                         /lib64/libm-2.12.so
3bf6c83000-3bf6e82000 ---p 00083000 fd:00 653141                         /lib64/libm-2.12.so
3bf6e82000-3bf6e83000 r--p 00082000 fd:00 653141                         /lib64/libm-2.12.so
3bf6e83000-3bf6e84000 rw-p 00083000 fd:00 653141                         /lib64/libm-2.12.so
3bf7000000-3bf7007000 r-xp 00000000 fd:00 652928                         /lib64/librt-2.12.so
3bf7007000-3bf7206000 ---p 00007000 fd:00 652928                         /lib64/librt-2.12.so
3bf7206000-3bf7207000 r--p 00006000 fd:00 652928                         /lib64/librt-2.12.so
3bf7207000-3bf7208000 rw-p 00007000 fd:00 652928                         /lib64/librt-2.12.so
3bfac00000-3bfac16000 r-xp 00000000 fd:00 652865                         /lib64/libgcc_s-4.4.7-20120601.so.1
3bfac16000-3bfae15000 ---p 00016000 fd:00 652865                         /lib64/libgcc_s-4.4.7-20120601.so.1
3bfae15000-3bfae16000 rw-p 00015000 fd:00 652865                         /lib64/libgcc_s-4.4.7-20120601.so.1
3bfc800000-3bfc8e8000 r-xp 00000000 fd:00 793317                         /usr/lib64/libstdc++.so.6.0.13
3bfc8e8000-3bfcae8000 ---p 000e8000 fd:00 793317                         /usr/lib64/libstdc++.so.6.0.13
3bfcae8000-3bfcaef000 r--p 000e8000 fd:00 793317                         /usr/lib64/libstdc++.so.6.0.13
3bfcaef000-3bfcaf1000 rw-p 000ef000 fd:00 793317                         /usr/lib64/libstdc++.so.6.0.13
3bfcaf1000-3bfcb06000 rw-p 00000000 00:00 0
7f2910000000-7f2910021000 rw-p 00000000 00:00 0
7f2910021000-7f2914000000 ---p 00000000 00:00 0
7f2915b49000-7f2915b4a000 ---p 00000000 00:00 0
7f2915b4a000-7f2915f50000 rw-p 00000000 00:00 0
7f2915f6d000-7f2915f6f000 rw-p 00000000 00:00 0
7f2915f6f000-7f2915f90000 r-xp 00000000 fd:00 3936827                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/examples/arda/dds-tutorial-cpp-ex/ch1/libdatamodel.so
7f2915f90000-7f2916190000 ---p 00021000 fd:00 3936827                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/examples/arda/dds-tutorial-cpp-ex/ch1/libdatamodel.so
7f2916190000-7f2916197000 rw-p 00021000 fd:00 3936827                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/examples/arda/dds-tutorial-cpp-ex/ch1/libdatamodel.so
7f2916197000-7f2916198000 rw-p 00000000 00:00 0
7f2916198000-7f29162c3000 r-xp 00000000 fd:00 4053578                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libdcpssacpp.so
7f29162c3000-7f29164c3000 ---p 0012b000 fd:00 4053578                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libdcpssacpp.so
7f29164c3000-7f29164f6000 rw-p 0012b000 fd:00 4053578                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libdcpssacpp.so
7f29164f6000-7f2916653000 r-xp 00000000 fd:00 4053584                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libdcpsisocpp.so
7f2916653000-7f2916853000 ---p 0015d000 fd:00 4053584                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libdcpsisocpp.so
7f2916853000-7f2916889000 rw-p 0015d000 fd:00 4053584                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libdcpsisocpp.so
7f2916889000-7f291688b000 rw-p 00000000 00:00 0
7f291688b000-7f2916a75000 r-xp 00000000 fd:00 4053586                    /usr/local/src/OpenSplice/HDE/x86_64.linux/src/OpenSpliceDDS/install/HDE/x86_64.linux-debug/lib/libddskernel.soAborted (core dumped)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×