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

vg index segmantation fault #674

Closed
shilpagarg opened this issue Feb 16, 2017 · 7 comments
Closed

vg index segmantation fault #674

shilpagarg opened this issue Feb 16, 2017 · 7 comments

Comments

@shilpagarg
Copy link

shilpagarg commented Feb 16, 2017

I am doing vg index -x SK1+Y12.bwa.xg -g SK1+Y12.bwa.gcsa -k 16 SK1+Y12.bwa.vg

and here is bt of segmentation fault:

#0  0x00000000009945c3 in std::pair<sdsl::wt_pc<sdsl::balanced_shape, sdsl::int_vector<(unsigned char)1>, sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)0, (unsigned char)1>, sdsl::byte_tree<false> >::value_type, sdsl::wt_pc<sdsl::balanced_shape, sdsl::int_vector<(unsigned char)1>, sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)0, (unsigned char)1>, sdsl::byte_tree<false> >::size_type> sdsl::quantile_freq<sdsl::wt_pc<sdsl::balanced_shape, sdsl::int_vector<(unsigned char)1>, sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)0, (unsigned char)1>, sdsl::byte_tree<false> > >(sdsl::wt_pc<sdsl::balanced_shape, sdsl::int_vector<(unsigned char)1>, sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)0, (unsigned char)1>, sdsl::byte_tree<false> > const&, sdsl::wt_pc<sdsl::balanced_shape, sdsl::int_vector<(unsigned char)1>, sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)0, (unsigned char)1>, sdsl::byte_tree<false> >::size_type, sdsl::wt_pc<sdsl::balanced_shape, sdsl::int_vector<(unsigned char)1>, sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)0, (unsigned char)1>, sdsl::byte_tree<false> >::size_type, sdsl::wt_pc<sdsl::balanced_shape, sdsl::int_vector<(unsigned char)1>, sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)1, (unsigned char)1>, sdsl::select_support_mcl<(unsigned char)0, (unsigned char)1>, sdsl::byte_tree<false> >::size_type) ()
#1  0x00000000009861e5 in gcsa::LCP::min_lcp(gcsa::PathNode const&, gcsa::PathNode const&, unsigned int const*, unsigned int const*) const ()
#2  0x0000000000986611 in gcsa::PathRange::PathRange(unsigned long, unsigned long, std::pair<unsigned long, unsigned long>, gcsa::PathGraphMerger&) ()
#3  0x000000000098e48c in gcsa::PathGraphMerger::next() ()
#4  0x000000000098fd0e in gcsa::PathGraph::prune(gcsa::LCP const&, unsigned long) ()
#5  0x0000000000950da3 in gcsa::GCSA::GCSA(gcsa::InputGraph&, gcsa::ConstructionParameters const&) ()
#6  0x000000000069a214 in main_index(int, char**) () at src/subcommand/index_main.cpp:873
#7  0x00000000004182f2 in main () at src/main.cpp:7676

Here is the graph:
https://transfer.sh/YP4fM/sk1-y12.bwa.vg

@ekg
Copy link
Member

ekg commented Feb 16, 2017 via email

@jltsiren
Copy link
Contributor

You may have run out of memory or disk space. The third doubling step creates a graph with 2.5 billion nodes and uses over 140 gigabytes of memory. The final graph is 10x smaller, and the order-128 index takes a little under a gigabyte. If you use only two doubling steps, you get a much more reasonable index.

@shilpagarg
Copy link
Author

I chopped graph using

vg mod -X 64 SK1+Y12.bwa.vg > SK1+Y12.bwa_X.vg

and then index it using

vg run index -x SK1+Y12.bwa.xg -g SK1+Y12.bwa.gcsa -k 8 -X 2 SK1+Y12.bwa.vg

and I get

#0  0x000000000098de6d in gcsa::PathGraphMerger::read(gcsa::PriorityNode&) ()
#1  0x000000000098e04c in gcsa::PathGraphMerger::bufferNext() ()
#2  0x000000000098e295 in gcsa::PathGraphMerger::rangeEnd(unsigned long) ()
#3  0x000000000098e622 in gcsa::PathGraphMerger::first() ()
#4  0x000000000098f7f8 in gcsa::PathGraph::prune(gcsa::LCP const&, unsigned long) ()
#5  0x0000000000950da3 in gcsa::GCSA::GCSA(gcsa::InputGraph&, gcsa::ConstructionParameters const&) ()
#6  0x000000000069a214 in main_index(int, char**) () at src/subcommand/index_main.cpp:873
#7  0x00000000004182f2 in main () at src/main.cpp:7676

@glennhickey
Copy link
Contributor

glennhickey commented Feb 17, 2017 via email

@shilpagarg
Copy link
Author

sorry I copied the wrong command, but I ran the right one.

vg index -x SK1+Y12.bwa_X.xg -g SK1+Y12.bwa_X.gcsa -k 8 -X 2 SK1+Y12.bwa_X.vg

That is why the backtrace now is different than the previous one.

@shilpagarg
Copy link
Author

I face the same issue for chrI as well and here is the chopped vg graph:

https://transfer.sh/nA8LE/sk1-y12.bwa-x.chri.vg

and backtrace

#0  0x000000000098de6d in gcsa::PathGraphMerger::read(gcsa::PriorityNode&) ()
#1  0x000000000098e04c in gcsa::PathGraphMerger::bufferNext() ()
#2  0x000000000098e295 in gcsa::PathGraphMerger::rangeEnd(unsigned long) ()
#3  0x000000000098e622 in gcsa::PathGraphMerger::first() ()
#4  0x000000000098f7f8 in gcsa::PathGraph::prune(gcsa::LCP const&, unsigned long) ()
#5  0x0000000000950da3 in gcsa::GCSA::GCSA(gcsa::InputGraph&, gcsa::ConstructionParameters const&) ()
#6  0x000000000069a214 in main_index(int, char**) () at src/subcommand/index_main.cpp:873
#7  0x00000000004182f2 in main () at src/main.cpp:7676

@glennhickey
Copy link
Contributor

glennhickey commented Feb 17, 2017 via email

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

4 participants