Closed binarybana closed 11 years ago
Hi Jason: Can you reproduce the problem when you're not piping the sff_extract result?
The piping is critical to the crash, let me explain: Oddly enough, I actually encountered the root cause of this problem in a completely different context later the same day. To cut to the chase: head -20 closes the pipe when it finishes processing the first 20 lines, sff_extract then tries to write to this broken pipe and spits out the error above.
sed
on the other hand will dutifully process the entire output, even when it has no need of it. Thus keeping the pipeline alive for sff_extract to continue dumping into. So the following is nearly equivalent but works:
sff_extract -c zz03_A_RL2.sff | sed -n '1,+19p'
The problem with this is you still have to process the entire input! So I think sff_extract should check the pipe it is writing out to between each chunked write to make sure it is still open.
Thanks for the information, I wasn't aware of that. You're explanation has been very useful. We've reproduced the bug and, I think, that we're fixed with commit: https://github.com/JoseBlanca/seq_crumbs/commit/17111c697335e2d849c992b2412b410303c92646
Thanks Jose! I'll let you know when I get around to testing it, but it certainly looks like this fixes the problem.
When trying a:
I get a good 20 lines of output and then:
I've put sff_extract.error in a pastebin here.