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

lchain_rmq assertion fail introduced between 0.15-r426 and 0.15-r434-dirty #55

Closed
ASLeonard opened this issue Jan 27, 2022 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@ASLeonard
Copy link

ASLeonard commented Jan 27, 2022

I was mapping a subset of nanopore reads to a subset of a gfa, and everything worked fine under my previous minigraph version (0.15-r426) but then repeatedly failed an assertion in the latest version (0.15-r434-dirty) from the same command minigraph -t 2 -xlr --vc unitigs.gfa nanopore.fq.gz

error was

minigraph: lchain.c:363: mg_lchain_rmq: Assertion `max_j < 0 || (a[max_j].x < a[i].x && (int32_t)a[max_j].y < (int32_t)a[i].y)' failed.
Aborted (core dumped)

Same code segfaults at 011f4a2, and crashes at 94289c8 with the following

[kfree] The end of a free block enters the allocated block.
Aborted (core dumped)

So the assertion error seems to appear at 0c9086b.

@lh3
Copy link
Owner

lh3 commented Jan 27, 2022

Thank you! Is it possible to share me with your data? I don't see the crash on my data. I had a look at code and recent changes but it is not immediately clear to me what could go wrong. When running minigraph, you may use

make asan=1
minigraph --dbg-kalloc --dbg-qname -t1

asan=1 and --dbg-kalloc helps to expose memory bugs. --dbg-qname prints query name. -t1 uses one thread. With these settings, you may be able to catch the read that breaks minigraph.

BTW, the current github HEAD has features backported from minimap2-2.24.

@lh3 lh3 added the bug Something isn't working label Jan 27, 2022
@ASLeonard
Copy link
Author

The kalloc flag should be --no-kalloc, but the output was

QR	f2b6a9cc-eb94-4075-8db2-f6ff580557e4	0	91405
QR	48d7d91a-eeb5-4163-a6dc-931e631f4a5c	1	11718
minigraph: lchain.c:363: mg_lchain_rmq: Assertion `max_j < 0 || (a[max_j].x < a[i].x && (int32_t)a[max_j].y < (int32_t)a[i].y)' failed.
Aborted

The gfa and reads should be accessible here.

@lh3 lh3 closed this as completed in a602165 Jan 28, 2022
@lh3
Copy link
Owner

lh3 commented Jan 28, 2022

Thanks a lot for this example. I believe I have fixed it.

@ASLeonard
Copy link
Author

Yep that fixed it, runs smoothly now.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants