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 when FIFO Present #138

Closed
tri-adam opened this issue Aug 23, 2022 · 0 comments · Fixed by #139
Closed

SquashFS Iteration Fails when FIFO Present #138

tri-adam opened this issue Aug 23, 2022 · 0 comments · Fixed by #139
Labels
bug Something isn't working

Comments

@tri-adam
Copy link
Contributor

What happened:

When iterating through a SquashFS layer within a SIF that contains a FIFO, an error is encountered.

could not read image: failed to walk layer="sha256:14489b4001eb9184a44622395748011affff4f358134049e566e026ab380dc37": could not add path="/foo" link="" during squashfs iteration

What you expected to happen:

I expected SquashFS iteration to succeed, even when a FIFO is present.

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

Generate a SquashFS partition that contains a fifo:

$ mknod foo p
$ mksquashfs ./foo rootfs.sq
...

Use siftool (available here) to create a SIF containing the SquashFS partition:

$ siftool new fifo.sif
$ siftool add --datatype 4 --partarch 1 --partfs 1 --parttype 2 fifo.sif rootfs.sq

Process with stereoscope:

$ go run examples/basic.go singularity:fifo.sif
DEBU[0000] image: source=Singularity location=fifo.sif  
DEBU[0000] image metadata: digest=sha256:affd044aad62d0250e63e4bf1dcc8f385fe956525c79d6cea8c7dfb3eee96c47 mediaType=application/vnd.sylabs.sif.layer.v1.sif tags=[] 
DEBU[0000] layer metadata: index=0 digest=sha256:14489b4001eb9184a44622395748011affff4f358134049e566e026ab380dc37 mediaType=application/vnd.sylabs.sif.layer.v1.squashfs 
panic: could not read image: failed to walk layer="sha256:14489b4001eb9184a44622395748011affff4f358134049e566e026ab380dc37": could not add path="/foo" link="" during squashfs iteration

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

Anything else we need to know?:

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
@tri-adam tri-adam added the bug Something isn't working label Aug 23, 2022
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