Boost logo

Boost :

From: Murali Kishore (bmuralikishore_at_[hidden])
Date: 2025-01-23 17:46:30


Hi ,

We are trying interprocess scenario, one process created shared memory
objects and killed and second process open the object using
find_or_construct seeing this process blocked at getting lock.

bt as shown below,
#0 __lll_lock_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007fa6b6733eb6 in _L_lock_941 () from /lib64/libpthread.so.0
#2 0x00007fa6b6733daf in __GI___pthread_mutex_lock
(mutex=mutex_at_entry=0x7fa6b198b070)
at ../nptl/pthread_mutex_lock.c:113
#3 0x0000000001bc3822 in lock (this=0x7fa6b198b070) at
/x86/include/boost/interprocess/sync/posix/recursive_mutex.hpp:90
#4 lock (this=0x7fa6b198b070) at
/x86/include/boost/interprocess/sync/interprocess_recursive_mutex.hpp:163
#5 scoped_lock (m=..., this=<synthetic pointer>) at
/x86/include/boost/interprocess/sync/scoped_lock.hpp:81
#6 boost::interprocess::segment_manager<char,
boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,
boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>,
boost::interprocess::iset_index>::priv_generic_named_construct<char>
(this=0x7fa6b198b010, type=<optimized out>, name=0x7ffde183ca20
"reported_slice_config_list", num=1, try2find=<optimized out>,
    dothrow=<optimized out>, table=..., index=..., is_intrusive=...) at
/x86/include/boost/interprocess/segment_manager.hpp:1076
#7 0x0000000001bee007 in boost::interprocess::segment_manager<char,
boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,
boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>,
boost::interprocess::iset_index>::priv_generic_construct (this=<optimized
out>, name=name_at_entry=0x7ffde183ca20 "reported_slice_config_list",
num=num_at_entry=1,
    try2find=try2find_at_entry=true, dothrow=dothrow_at_entry=true, table=...)
    at /x86/include/boost/interprocess/segment_manager.hpp:760
#8 0x0000000001bf112d in generic_construct<boost::container::map<unsigned
int, gnb::broadcast_plmn_list, std::less<unsigned int>,
boost::interprocess::allocator<std::pair<unsigned int const,
gnb::broadcast_plmn_list>, boost::interprocess::segment_manager<char,
boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>,
boost::interprocess::iset_index> > > > (table=...,
    dothrow=true, try2find=true, num=1, name=0x7ffde183ca20
"reported_slice_config_list", this=<optimized out>)
    at /x86/include/boost/interprocess/segment_manager.hpp:704
#9 operator()<std::less<unsigned int>,
boost::interprocess::allocator<std::pair<unsigned int const,
gnb::broadcast_plmn_list>, boost::interprocess::segment_manager<char,
boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,
boost::interprocess::offset_ptr<void, long int, long unsigned int, 0ul>,
0ul>, boost::interprocess::iset_index> >&> (this=<optimized out>)
    at /x86/include/boost/interprocess/detail/named_proxy.hpp:132

please let me know in which cases this can be occured, we see first process
also hangs in termination.

-- 
Regards,
Murali Kishore

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk