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

cannot reproduce "unknown key value(s)" croaking #55

Open
XSven opened this issue Jan 15, 2024 · 3 comments
Open

cannot reproduce "unknown key value(s)" croaking #55

XSven opened this issue Jan 15, 2024 · 3 comments
Assignees

Comments

@XSven
Copy link

XSven commented Jan 15, 2024

perl 5.14.2
IO::Compress 2.206

I am using this function

sub _gunzip_file {
  my ( $filename ) = @_;

  my $gunzip = IO::Uncompress::Gunzip->new( $filename, { Append => 1, MultiStream => 1 } );
  my $buffer = '';
  1 while $gunzip->read( $buffer ) > 0;
  die "gunzip failed: $GunzipError\n" if $GunzipError;

  return $buffer;
}

to gunzip files. Recently the function croaks with the message

Compress::Raw::Zlib::Inflate::new: unknown key value(s) AppendOutput CRC32 ADLER32 at perl5/IO/Uncompress/Adapter/Inflate.pm line 34

Unfortunately until today this happens only once and I was not able to reproduce it even with the same .gz input file that has caused the croaking.

Any idea why it could randomly happen that the key values AppendOutput CRC32 ADLER32 are treated as unknown?

@pmqs
Copy link
Owner

pmqs commented Jan 15, 2024

That is very strange. Looks like somehow the object in $object has got corrupted. Without a way to reproduce it though it will be virtually impossible to fix.

If you get to a point where you can reproduce it, please report it back to me.

@XSven
Copy link
Author

XSven commented Jan 17, 2024

I have detected yet another non-reproducible phenomenon

Size magic not implemented at perl5/IO/Uncompress/Base.pm line 386.

On purpose I have not created a separate issue for that. Any idea?

@pmqs
Copy link
Owner

pmqs commented Jan 17, 2024

You are ok keeping the same ticket.

I found this reference to the "Size magic not implemented" error at Perl/perl5#9701. It relates to an internal issue with Perl itself. That could also be the root-cause for the first issue you reported.

I think the only approach for fixing these issues is to upgrade to a newer version of Perl. The version you are using (5.14.2) dates from 2011. The latest version is 5.38.2.

@pmqs pmqs self-assigned this Feb 13, 2024
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

2 participants