Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kProcessor::indexPriorityQueue() does not fill/save the namesMap. #97

Open
mr-eyes opened this issue Apr 20, 2022 · 0 comments
Open

kProcessor::indexPriorityQueue() does not fill/save the namesMap. #97

mr-eyes opened this issue Apr 20, 2022 · 0 comments

Comments

@mr-eyes
Copy link
Member

mr-eyes commented Apr 20, 2022

This issue is related to #92

So, I figured out how to retrieve the namesMap of a multiColumn kDataFrame. The only thing is that indexPriorityQueue() function does not fill the column namesMap in the following line (I might be wrong, though)

flat_hash_map<uint32_t,string> namesMap;

The way I am retrieving the namesMap is similar to a usecase

// After loading KF
auto names_map = ((deduplicatedColumn<StringColorColumn>*)KF->columns["color"])->values->namesMap;

The error I got if tried to iterate over names_map:

[1]    16945 segmentation fault 

Further backtrace: (happens as well if changed the namesMap from flat_hash_map to unordered_map)

#0  phmap::priv::raw_hash_set<phmap::priv::FlatHashMapPolicy<unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, phmap::Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::begin (this=0x555555bc89f0)
    at /home/mabuelanin/dib-dev/try_kp2/lib/kProcessor/ThirdParty/kmerDecoder/lib/parallel-hashmap/parallel_hashmap/phmap.h:1162
        it = {ctrl_ = 0x4 <error: Cannot access memory at address 0x4>, {slot_ = 0x555555bc65c0}}
        it = <optimized out>
#1  main (argc=<optimized out>, argv=<optimized out>) at /home/mabuelanin/dib-dev/try_kp2/iterate_over_indexP.cpp:43
        name = <optimized out>
        __for_range = @0x555555bc89f0: {<phmap::priv::raw_hash_map<phmap::priv::FlatHashMapPolicy<unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, phmap::Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<phmap::priv::raw_hash_set<phmap::priv::FlatHashMapPolicy<unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, phmap::Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {ctrl_ = 0x4 <error: Cannot access memory at address 0x4>, slots_ = 0x555555bc65c0, size_ = 8, 
              capacity_ = 93824999000688, infoz_ = {<No data fields>}, 
              settings_ = {<phmap::priv::internal_compressed_tuple::CompressedTupleImpl<phmap::priv::CompressedTuple<unsigned long, phmap::--Type <RET> for more, q to quit, c to continue without paging--
Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, phmap::integer_sequence<unsigned long, 0, 1, 2, 3> >> = {<phmap::priv::internal_compressed_tuple::Storage<phmap::priv::CompressedTuple<unsigned long, phmap::Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, 0, false>> = {
                    value = 93824999001200}, <phmap::priv::internal_compressed_tuple::Storage<phmap::priv::CompressedTuple<unsigned long, phmap::Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, 1, true>> = {<phmap::Hash<unsigned int>> = {<phmap::phmap_unary_function<unsigned int, unsigned long>> = {<No data fields>}, <No data fields>}, <No data fields>}, <phmap::priv::internal_compressed_tuple::Storage<phmap::priv::CompressedTuple<unsigned long, phmap::Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, 2, true>> = {<phmap::EqualTo<unsigned int>> = {<No data fields>}, <No data fields>}, <phmap::priv::internal_compressed_tuple::Storage<phmap::priv::CompressedTuple<unsigned long, phmap::Hash<unsigned int>, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, 3, true>> = {<std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<__gnu_cxx::new_allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}}, <No data fields>}, <No data fields>}
--Type <RET> for more, q to quit, c to continue without paging--
        __for_begin = <optimized out>
        __for_end = <optimized out>
        KF = <optimized out>
        it = {origin = 0x555555bc5ed0, iterator = 0x555555bc87a0}
@mr-eyes mr-eyes changed the title kProcessor::indexPriorityQueue() does not save the namesMap. kProcessor::indexPriorityQueue() does not fill/save the namesMap. Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant