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

gzip: *.log.gz: not in gzip format #188

Open
wuyinq opened this issue Jun 25, 2023 · 5 comments
Open

gzip: *.log.gz: not in gzip format #188

wuyinq opened this issue Jun 25, 2023 · 5 comments

Comments

@wuyinq
Copy link

wuyinq commented Jun 25, 2023

gunzip the zipped log file occurs error like this:
image

And this is the log init function:
image

@dveeden
Copy link

dveeden commented Nov 21, 2023

$ hexdump -C -n2 my.log.gz
00000000  1f 8b                                             |..|
00000002
$ file my.log.gz
my.log.gz: gzip compressed data, original size modulo 2^32 1413

gzip files start with 0x1F, 0x1B (see also "Magic number" on https://en.wikipedia.org/wiki/Gzip). Do your files have the same start bytes?

@wuyinq
Copy link
Author

wuyinq commented Dec 5, 2023

$ hexdump -C -n2 my.log.gz
00000000  1f 8b                                             |..|
00000002
$ file my.log.gz
my.log.gz: gzip compressed data, original size modulo 2^32 1413

gzip files start with 0x1F, 0x1B (see also "Magic number" on https://en.wikipedia.org/wiki/Gzip). Do your files have the same start bytes?

No, brother, I get this:

$ hexdump -C -n2 **.log.gz
00000000   00  00
00000002
$ file **.log.gz
**.log.gz: data 

@tomjschwanke
Copy link

Looking at several corrupted files, I can see they contain a lot of zero bytes at the start and some data towards the end. The data does not start with a valid header, so I assume the header would still be at the beginning, but got zeroed somehow

image
image

@dveeden
Copy link

dveeden commented Jan 10, 2025

Is the amount of zeros in the start of the file always the same?

@tomjschwanke
Copy link

tomjschwanke commented Jan 10, 2025

they are not, tho I'm not sure if it could be related to filesize. However, its interesting that it always follows the same pattern for the files I have:

image

once data starts, its always the same position in the line

not sure if its coincidence, but a gzip header is 10 bytes long, and its missing exactly 10 bytes from the start of the line

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

No branches or pull requests

3 participants