Boost logo

Boost :

From: Saravanan A (getsaravanan30_at_[hidden])
Date: 2019-10-22 06:05:51

Hi Team,

                We Currently trying to develop a prototype with boost
libraries, where we are facing an issue in it with boost library. It would
be great if someone help out here .

we are having two process where one process create “*managed xsi shared
memory”* and other get attached to it. Here we trying to have a spsc queue
in a shared memory structure which will be accessed by both process . Where
SPSC queue data is a user defined class object. when we have a integer in ”
*Mydata”* (Class name) mentioned below and try to do a Push /pop operation
in the spsc queue on respective process it was working fine without any
issues. But the same framework when we have an array of greater size(more
than 28 byte around. Example: a[7] ) .We are facing a crash in consumer
side .

(It seems spsc queue write somewhere in process heap memory after first pop
leading to memory corrupt )

please let us know if there any open issue in this ? or if we have used
boost library incorrectly ? Thanks for reading. I would be thankful for any
information you may have to offer.


/data/users/kapparao/example_boost/anony-SHM-managed> $./processB

Consumer-TX - Read data from Q - [1,b]

notify_one_at_93 - I am here!

notify_one_at_159 - I am here!

Segmentation fault (core dumped)

/data/users/kapparao/example_boost/anony-SHM-managed> $gdb ./processB

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7

Copyright (C) 2013 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <

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-redhat-linux-gnu".

For bug reporting instructions, please see:


Reading symbols from

(gdb) r

Starting program:

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib64/".

Consumer-TX - Read data from Q - [1,b]

Program received signal SIGSEGV, Segmentation fault.

0x00007ffff7bcb09b in pthread_cond_signal@@GLIBC_2.3.2 () from

Missing separate debuginfos, use: debuginfo-install
glibc-2.17-292.0.1.el7.x86_64 libgcc-4.8.5-39.0.1.el7.x86_64

(gdb) bt

#0 0x00007ffff7bcb09b in pthread_cond_signal@@GLIBC_2.3.2 () from

#1 0x00000000004063de in
boost::interprocess::ipcdetail::posix_condition::notify_one (this=0x28) at

#2 0x00000000004066e1 in
boost::interprocess::interprocess_condition::notify_one (this=0x28) at

#3 0x0000000000402941 in main () at processB.cpp:42

Attached the complete code in tar for your reference.

*Compilation and Execution* :

*Process A : *

Compilation syntax :

c++ processA.cpp -I < boost_header_file_path>
<boost_lib_path> -lpthread -g -o processA -std=c++11

Execution syntax :


*Process B :*

Compilation syntax :

c++ processB.cpp -I < boost_header_file_path>
<boost_lib_path> -lpthread -g -o processB -std=c++11

Execution syntax :


*Thanks in advance !!!!!*




Boost list run by bdawes at, gregod at, cpdaniel at, john at