I am creating a multi-index on three members of a class (two int32_t and one std::pair and storing that in a managed memory mapped file (boos::interprocess). I am using GCC 4.8.2 for compilation and boost version 1.56.beta1All the data is first inserted into the multi-index once and then it is read from the muti-index with a query on the first two int32_t values (There is no concurrency and insertion and query is being done within the same process). The mutliindex is defined as:
typedef bmi::multi_index_container < Trace, bmi::indexed_by < bmi::ordered_non_unique < bmi::composite_key < Trace, BOOST_MULTI_INDEX_MEMBER(Trace, int32_t, m_x), BOOST_MULTI_INDEX_MEMBER(Trace, int32_t, m_y), BOOST_MULTI_INDEX_MEMBER(Trace, int_pair_t, m_volume) > > > , managed_mapped_file::allocator<Trace>::type > trace_set_t;
The query is:
boost::tie(l, u) = m_p_mi_ts->get<0>().equal_range(boost::make_tuple(i, j));
We are testing this whole process over and over again (each iteration is a new run of the process), and once in every 50 or so iterations we get a segment fault inside boost on firing the query. Here is the boost part of the stack from the core dump:
#0 0x00002b748b6ac0ec in boost::interprocess::offset_ptr, 0ul>, boost::interprocess::iset_index> > > >, long, unsigned long, 0ul>::get() const () at /glb/data/ifshou_cdis05/projects/cdis/installed/boost/1.56.0.beta1/usr/local/include/boost/interprocess/offset_ptr.hpp:346#1 0x00002b748b6a8934 in boost::interprocess::offset_ptr, 0ul>, boost::interprocess::iset_index> > > >, long, unsigned long, 0ul>::operator*() const () at /glb/data/ifshou_cdis05/projects/cdis/installed/boost/1.56.0.beta1/usr/local/include/boost/interprocess/offset_ptr.hpp:360#2 0x00002b748b6a5932 in boost::multi_index::multi_index_container, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator, 0ul>, boost::interprocess::iset_index> > >::header() const () at /glb/data/ifshou_cdis05/projects/cdis/installed/boost/1.56.0.beta1/usr/local/include/boost/multi_index_container.hpp:525#3 0x00002b748b6a3250 in boost::multi_index::detail::index_base, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator, 0ul>, boost::interprocess::iset_index> > >::final_header() const () at /glb/data/ifshou_cdis05/projects/cdis/installed/boost/1.56.0.beta1/usr/local/include/boost/multi_index/detail/index_base.hpp:212#4 0x00002b748b6a022c in boost::multi_index::detail::ordered_index, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >, boost::multi_index::detail::nth_layer<1, Seismic::Data::Trace, boost::multi_index::indexed_by, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator, 0ul>, boost::interprocess::iset_index> > >, boost::mpl::vector0, boost::multi_index::detail::ordered_non_unique_tag>::header() const () at /glb/data/ifshou_cdis05/projects/cdis/installed/boost/1.56.0.beta1/usr/local/include/boost/multi_index/ordered_index.hpp:973#5 0x00002b748b69cbed in std::pair, 0ul>, boost::interprocess::iset_index> > > > >, boost::multi_index::detail::bidir_node_iterator, 0ul>, boost::interprocess::iset_index> > > > > > boost::multi_index::detail::ordered_index, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >, boost::multi_index::detail::nth_layer<1, Seismic::Data::Trace, boost::multi_index::indexed_by, boost::multi_index::member, boost::multi_index::member, &(Seismic::Data::Trace::m_volume)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator, 0ul>, boost::interprocess::iset_index> > >, boost::mpl::vector0, boost::multi_index::detail::ordered_non_unique_tag>::equal_range >(boost::tuples::tuple const&) const () at /glb/data/ifshou_cdis05/projects/cdis/installed/boost/1.56.0.beta1/usr/local/include/boost/multi_index/ordered_index.hpp:556
Any idea what might be happening?
Thanks