amplab / snap

Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data
https://www.microsoft.com/en-us/research/project/snap/
Apache License 2.0
287 stars 66 forks source link

Error- GzipDataReader: inflate failed with -2 #87

Closed MrOlm closed 3 years ago

MrOlm commented 7 years ago

When running SNAP on gziped reads, I get the following log:

Welcome to SNAP version 1.0beta.23.

Loading index from directory... 1s.  265549280 bases, seed size 20
Aligning.
GzipDataReader: inflate failed with -2
SNAP exited with exit code 1 from line 1659 of file SNAPLib/DataReader.cpp

From the zlib manual ( http://zlib.net/manual.html ), the -2 exit code from zlib corresponds to:

Z_STREAM_ERROR if the stream structure was inconsistent (for example next_in or next_out was Z_NULL, or the state was inadvertently written over by the application)

Any idea what could be causing this? I've confirmed that the program is linked to the correct zlib library, and when I decompress the same reads and run it again it works.

Thanks, -Matt

bolosky commented 7 years ago

Does it happen consistently on this input file, or only once?

From your comment, I’m assuming that you were able to gunzip the file successfully, so it’s not just that your input file is corrupt (which is my first reading of that error message).

If it’s repeatable, maybe you’d be willing to share the file with me so I can debug it.

--Bill

From: Matt Olm [mailto:notifications@github.com] Sent: Monday, April 17, 2017 8:43 AM To: amplab/snap snap@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [amplab/snap] Error- GzipDataReader: inflate failed with -2 (#87)

When running SNAP on gziped reads, I get the following log:

Welcome to SNAP version 1.0beta.23.

Loading index from directory... 1s. 265549280 bases, seed size 20

Aligning.

GzipDataReader: inflate failed with -2

SNAP exited with exit code 1 from line 1659 of file SNAPLib/DataReader.cpp

From the zlib manual ( http://zlib.net/manual.htmlhttps://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fzlib.net%2Fmanual.html&data=02%7C01%7Cbolosky%40microsoft.com%7C2b430730ac4f402264c708d485a869ea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636280405751876905&sdata=SiVFGNz6U2qV6tHhNezW1Cf3vlh8fexG3WHr7pu07mg%3D&reserved=0 ), the -2 exit code from zlib corresponds to:

Z_STREAM_ERROR if the stream structure was inconsistent (for example next_in or next_out was Z_NULL, or the state was inadvertently written over by the application)

Any idea what could be causing this? I've confirmed that the program is linked to the correct zlib library, and when I decompress the same reads and run it again it works.

Thanks, -Matt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Famplab%2Fsnap%2Fissues%2F87&data=02%7C01%7Cbolosky%40microsoft.com%7C2b430730ac4f402264c708d485a869ea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636280405751876905&sdata=rrQwrgfpowP77aq9CfTt1SV7G43L6py28XbBJhNLYL4%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA752btAp6LhEklv-JM5jzRYHfSGhs7Xks5rw4h-gaJpZM4M_QiA&data=02%7C01%7Cbolosky%40microsoft.com%7C2b430730ac4f402264c708d485a869ea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636280405751876905&sdata=sOLWlrX54WUu0Sx6aQN1T1NirCLn2Go9fmXYGzyR7rk%3D&reserved=0.

MrOlm commented 7 years ago

I don't think it's a problem with the input file for two reasons:

Any other ideas what could be causing this problem on my machine? As I said I'm able to run SNAP fine on uncompressed files, so I don't think it's a problem with my SNAP installation.

Thanks again, -Matt

bolosky commented 7 years ago

Maybe there’s something that’s in the way it’s compressed that the version of zlib linked with SNAP can’t handle. All that’s happening in SNAP to generate this error message is that it’s getting an error back from the inflate call in zlib. Here’s the code in question:

    status = inflate(zstream, mode == SingleBlock ? Z_NO_FLUSH : Z_FINISH);
    if (status < 0 && status != Z_BUF_ERROR) {
        WriteErrorMessage("GzipDataReader: inflate failed with %d\n", status);
        soft_exit(1);
    }

The only other thought that I have is that it has too small of a buffer, which you can fix by increasing the –xf parameter. However, that’s supposed to generate a different error from zlib, and when SNAP detects it it prints out an error suggesting that you increase –xf.

You can also try running the dev version (from the dev branch in github, current version 1.0dev.100), I’m not sure if all of the fixes are in the release version, so maybe that’s why you’re seeing the error message instead of the –xf one.

And yes, I’m LONG overdue for pushing the dev version into release.

--B

From: Matt Olm [mailto:notifications@github.com] Sent: Monday, April 24, 2017 11:01 AM To: amplab/snap snap@noreply.github.com Cc: Bill Bolosky bolosky@microsoft.com; Comment comment@noreply.github.com Subject: Re: [amplab/snap] Error- GzipDataReader: inflate failed with -2 (#87)

I don't think it's a problem with the input file for two reasons:

Any other ideas what could be causing this problem on my machine? As I said I'm able to run SNAP fine on uncompressed files, so I don't think it's a problem with my SNAP installation.

Thanks again, -Matt

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Famplab%2Fsnap%2Fissues%2F87%23issuecomment-296771837&data=02%7C01%7Cbolosky%40microsoft.com%7C239dd9f58b2947bb43a708d48b3bcd46%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636286536330692511&sdata=lvRCGHWrqZgXuyJQ4IP49SPFRoUt5vpme19qhnAdcJc%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA752Z_YOOa2I-tK8Q527U55BjmRSoUuks5rzOM-gaJpZM4M_QiA&data=02%7C01%7Cbolosky%40microsoft.com%7C239dd9f58b2947bb43a708d48b3bcd46%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636286536330692511&sdata=teR1ZfRpkzYIFc3GVL0uSJFUwk6w0C%2FVRmfWXtLm2ZM%3D&reserved=0.

lpryszcz commented 6 years ago

I have similar issue that happens consistently with precompiled version 1.0beta18 (from your website), but works fine with 1.0beta.23 (shipped through anaconda). Any idea?

bolosky commented 3 years ago

This got fixed with updates to deal with new versions of zlib, which have been in the code for a while. I'm closing this now.