c++ - Boost geometry/interprocess : find_or_construct stops responding -


i storing r-tree in memory mapped file accessed several processes. each process instance of same program, different parameters. tree accessed in following way:

std::cout << "reading index @ : " << idsfile.c_str() << std::endl; bi::managed_mapped_file file_id(bi::open_or_create,idsfile.c_str(), bf::file_size(idsfile.c_str())); allocator_m alloc_id(file_id.get_segment_manager()); std::cout << "constructing tree ... " << std::endl; rtree_m * id_ptr = file_id.find_or_construct<rtree_m>("rtree")(params_t(), indexable_m(), equal_to_m(), alloc_id); std::cout << "the index contains " << id_ptr->size() <<  " entries." << std::endl; 

(please note processes make no modification tree, queries.)

this fragment of code works fine, , has never failed me until now, when running 1 process @ time. run 50 process simultaneously, works fine 12 of them, , others, remains stuck @ line

rtree_m * id_ptr = file_id.find_or_construct<rtree_m>("rtree")(params_t(), indexable_m(), equal_to_m(), alloc_id); 

the output

reading index @ : /path/to/file/rtree-ids.dat constructing tree ...  

it doesn't crash, there no exception, keeps trying find_or_construct tree , lasts forever (well killed after 18 hours ; it's instantaneous). state flag processes r, not nor s.

worse : after killing 38 other processes, have same problem if run single process on same memory-mapped file. doesn't respond anymore. looks if file had been "overused" , unreadable or something.

i couldn't find in documentation max number of processes or similar, turn guys wisdom.


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -