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

SquashFS iteration fails with "unexpected EOF" #140

Closed
tri-adam opened this issue Aug 24, 2022 · 1 comment · Fixed by #141
Closed

SquashFS iteration fails with "unexpected EOF" #140

tri-adam opened this issue Aug 24, 2022 · 1 comment · Fixed by #141
Labels
bug Something isn't working

Comments

@tri-adam
Copy link
Contributor

What happened:

When iterating through a SquashFS layer within particular SIF images, an error is encountered. The image described in anchore/syft#1150 is one example of this.

What you expected to happen:

Expected SquashFS iteration to succeed with well-formed SIF images.

How to reproduce it (as minimally and precisely as possible):

Install SingularityCE and build a SIF:

singularity build OneAPI.sif docker://intel/oneapi-hpckit:latest

Process with stereoscope:

$ go run examples/basic.go singularity:OneAPI.sif 
DEBU[0000] image: source=Singularity location=OneAPI.sif 
DEBU[0015] image metadata: digest=sha256:2f58e7c87a19782f3f459bd8db1393fb37740a38e78957228200a753d31de312 mediaType=application/vnd.sylabs.sif.layer.v1.sif tags=[] 
DEBU[0015] layer metadata: index=0 digest=sha256:11cc80431c3b72354f0a2c551508592b874579be91ab23a75343037f6a44f93e mediaType=application/vnd.sylabs.sif.layer.v1.squashfs 
panic: could not read image: failed to walk layer="sha256:11cc80431c3b72354f0a2c551508592b874579be91ab23a75343037f6a44f93e": open opt/intel/oneapi/compiler/2022.1.0/linux/lib/oclfpga/host/linux64/bin/perl/lib/5.30.3/pod/perlpod.pod: unexpected EOF

goroutine 1 [running]:
main.main()
        /home/adam/src/stereoscope/examples/basic.go:32 +0x73b
exit status 2

Anything else we need to know?:

The error occurs with or without the patch from #139 applied, so I believe this issue is distinct from #138.

Environment:

$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
$ singularity --version
singularity-ce version 3.10.2
@tri-adam tri-adam added the bug Something isn't working label Aug 24, 2022
@tri-adam
Copy link
Contributor Author

With the patch to the squashfs module (CalebQ42/squashfs#15 applied), I can confirm stereoscope is able to iterate a SIF built from docker://intel/oneapi-hpckit:latest.

Once the underlying issue is fixed in a tagged release, I'll open a PR to update the squashfs module and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant