Closed sjaenick closed 1 year ago
Thank you so much for deciphering the bug and providing the solutions. Did your implementation solve the SegFault occurring with a single thread, too?
Did your implementation solve the SegFault occurring with a single thread, too?
Yes, currently everything works as intended
@sjaenick Thank you so much for helping. This is amazing work.
Did your implementation solve the SegFault occurring with a single thread, too?
Yes, currently everything works as intended
I cloned your Metabuli repo and tested it with a single thread, but it still reports segfaults. I found the bug is around Classifier::getNextTargetKmer() function call. diffBufferIdx became larger than the size of diffIdxBuffer, which is not intended. I'm trying to find the reason.
I was able to track down the issue underlying the segfaults reported by me in #10; in both cases, wrong
mmap()
usage was the culprit, assuming that both input as well as database files would always be writable by the user executing Metabuli.I switched the mapping of the input FASTA file to a readonly mapping, and introduced a new
mode = 3
formmapData
withMAP_PRIVATE
to be used with database files, so in-memory changes aren't persisted to disk.