-
Notifications
You must be signed in to change notification settings - Fork 33
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
Bug: max read sized reached when importing layer with very large files ss #617
Labels
Comments
Put this into a file,
Then you can run it and expand the tarball with the test case
|
raharper
added a commit
to raharper/stacker
that referenced
this issue
May 8, 2024
The equalfile golang package defaults to max read size of 10**10 bytes unless both files use io.LimitedReader to set an upper bound on the read. In stacker import we already stat the two files being compared and know the actual file size. This PR constructs two io.LimitedReader's for each file being compared. Fixes: project-stacker#617 Signed-off-by: Ryan Harper <[email protected]>
raharper
added a commit
to raharper/stacker
that referenced
this issue
May 8, 2024
The equalfile golang package defaults to max read size of 10**10 bytes unless both files use io.LimitedReader to set an upper bound on the read. In stacker import we already stat the two files being compared and know the actual file size. This PR constructs two io.LimitedReader's for each file being compared. Fixes: project-stacker#617 Signed-off-by: Ryan Harper <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stacker version
stacker version stacker v1.0.0-rc13-86ba851 liblxc cb8e38aca27a23964941f0f011a8919aab8bebab
Describe the bug
When a stacker layer has a file > 10G, the following stack trace shows:
I eventually tracked this down to an error from github.com/udhos/equalfile
https://github.com/udhos/equalfile/blob/90a7461a2a226fa62eca6e350b5207ae9c78fff8/equalfile.go#L390
The default max read size in equalfile is 10^10
https://github.com/udhos/equalfile/blob/90a7461a2a226fa62eca6e350b5207ae9c78fff8/equalfile.go#L12
It looks like there are some equalfile Options struct which can use a "Limited Reader" to avoid the max size limit.
To reproduce
Configuration
Client tool used
Seen error
The text was updated successfully, but these errors were encountered: