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

check read errors in fastqreader #533

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jchorl
Copy link

@jchorl jchorl commented Nov 15, 2023

It turns out, if there is a read error while reading a fastq, fastp will loop infinitely.

Per cpp fread docs, it looks like the caller should check both feof and ferror. Because ferror wasn't checked, fastp went right back to readToBuf and looped infinitely.

The issue is really hard to reproduce because you need an unreliable filesystem. While complicated, thankfully I could rerun in our own environment and reliably reproduce, but not in a way I can easily post here.

Anyway, here are the logs I saw after fixing:

reading fastq failed: Transport endpoint is not connected
Failed reading: sg_9.fastq

And I saw:

Command exited with status: exit status: 1

So we do see the process actually exit instead of hang.

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

Successfully merging this pull request may close these issues.

None yet

1 participant