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

High crash rate when compressing large byte sequences in 1.5.6.2 and 1.5.6.3 #82

Closed
hogelog opened this issue Apr 16, 2024 · 3 comments
Closed

Comments

@hogelog
Copy link

hogelog commented Apr 16, 2024

While testing 1.5.6.2, 1.5.6.3, I noticed a high probability of crashes when compressing large byte sequences. 1.5.6.1 does not reproduce this problem. Here is the reproduced code

require "bundler/inline"

gemfile do
  source "https://rubygems.org"
  gem "zstd-ruby", ENV.fetch("VERSION", "1.5.6.2")
end

srand 1
Zstd.compress(Random.bytes(0x1fe01fe1)) # Reproduce it even if it is much larger

Random byte sequences are not suitable for compression, of course.

Environment

$ uname -a
Darwin hogelog.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
$ ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]

Is this related to #80?

I also tried #81, but that fix didn't seem to resolve this issue.

@SpringMT
Copy link
Owner

I am also aware of an issue with the compression.
We are currently addressing it.
In the meantime, please use version 1.5.6.1.

@SpringMT
Copy link
Owner

We have released a version with the fixes.
https://github.com/SpringMT/zstd-ruby/releases/tag/v1.5.6.4
https://rubygems.org/gems/zstd-ruby/versions/1.5.6.4

I would appreciate it if you could check it again.

@hogelog
Copy link
Author

hogelog commented Apr 16, 2024

I tried 1.5.6.4 and this problem seems to be resolved 🎉

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