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

fix: bump sylabs/squashfs to fix singularity parsing #329

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

willmurphyscode
Copy link
Contributor

Previously, a bug in the squashfs library would panic on some singularity images.

Pulls in https://github.com/sylabs/squashfs/releases/tag/v1.0.4 to pull in CalebQ42/squashfs@03266d0 and CalebQ42/squashfs@c80d150.

Will fix anchore/syft#3390 when pulled in.

Previously, a bug in the squashfs library would panic on some
singularity images.

Signed-off-by: Will Murphy <[email protected]>
@willmurphyscode willmurphyscode self-assigned this Dec 11, 2024
@willmurphyscode willmurphyscode added the bug Something isn't working label Dec 11, 2024
Copy link

Benchmark Test Results

Benchmark results from the latest changes vs base branch
make .tool/task
make[1]: Entering directory '/home/runner/work/stereoscope/stereoscope'
make[1]: Leaving directory '/home/runner/work/stereoscope/stereoscope'
.tool/task show-benchstat
?   	github.com/anchore/stereoscope	[no test files]
?   	github.com/anchore/stereoscope/examples	[no test files]
PASS
ok  	github.com/anchore/stereoscope/internal	0.004s
?   	github.com/anchore/stereoscope/internal/bus	[no test files]
PASS
ok  	github.com/anchore/stereoscope/internal/containerd	0.008s
PASS
ok  	github.com/anchore/stereoscope/internal/docker	0.004s
?   	github.com/anchore/stereoscope/internal/log	[no test files]
PASS
ok  	github.com/anchore/stereoscope/internal/podman	0.005s
?   	github.com/anchore/stereoscope/pkg/event	[no test files]
?   	github.com/anchore/stereoscope/pkg/event/parsers	[no test files]
goos: linux
goarch: amd64
pkg: github.com/anchore/stereoscope/pkg/file
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkTarIndex-4   	   33408	     35926 ns/op	    5699 B/op	      93 allocs/op
BenchmarkTarIndex-4   	   33411	     35953 ns/op	    5699 B/op	      93 allocs/op
BenchmarkTarIndex-4   	   32932	     35927 ns/op	    5701 B/op	      93 allocs/op
BenchmarkTarIndex-4   	   33256	     36058 ns/op	    5700 B/op	      93 allocs/op
BenchmarkTarIndex-4   	   33076	     36024 ns/op	    5700 B/op	      93 allocs/op
BenchmarkTarIndex-4   	   30546	     36625 ns/op	    5703 B/op	      93 allocs/op
BenchmarkTarIndex-4   	   33162	     36175 ns/op	    5702 B/op	      93 allocs/op
PASS
ok  	github.com/anchore/stereoscope/pkg/file	10.901s
PASS
ok  	github.com/anchore/stereoscope/pkg/filetree	0.005s
?   	github.com/anchore/stereoscope/pkg/filetree/filenode	[no test files]
PASS
ok  	github.com/anchore/stereoscope/pkg/image	0.006s
PASS
ok  	github.com/anchore/stereoscope/pkg/image/containerd	0.008s
PASS
ok  	github.com/anchore/stereoscope/pkg/image/docker	0.005s
PASS
ok  	github.com/anchore/stereoscope/pkg/image/oci	0.005s
PASS
ok  	github.com/anchore/stereoscope/pkg/image/oci/credhelpers	0.005s
?   	github.com/anchore/stereoscope/pkg/image/podman	[no test files]
PASS
ok  	github.com/anchore/stereoscope/pkg/image/sif	0.004s
?   	github.com/anchore/stereoscope/pkg/imagetest	[no test files]
PASS
ok  	github.com/anchore/stereoscope/pkg/tree	0.003s
PASS
ok  	github.com/anchore/stereoscope/pkg/tree/node	0.004s
goos: linux
goarch: amd64
pkg: github.com/anchore/stereoscope/test/integration
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkSimpleImage_GetImage/docker-archive-4 	    1034	   1132637 ns/op	  274016 B/op	    2300 allocs/op
BenchmarkSimpleImage_GetImage/docker-archive-4 	    1053	   1130564 ns/op	  273389 B/op	    2299 allocs/op
BenchmarkSimpleImage_GetImage/docker-archive-4 	    1027	   1166542 ns/op	  273497 B/op	    2299 allocs/op
BenchmarkSimpleImage_GetImage/docker-archive-4 	    1020	   1158783 ns/op	  273338 B/op	    2298 allocs/op
BenchmarkSimpleImage_GetImage/docker-archive-4 	    1027	   1191807 ns/op	  273344 B/op	    2298 allocs/op
BenchmarkSimpleImage_GetImage/docker-archive-4 	    1035	   1299053 ns/op	  273070 B/op	    2298 allocs/op
BenchmarkSimpleImage_GetImage/docker-archive-4 	    1036	   1231583 ns/op	  273002 B/op	    2298 allocs/op
BenchmarkSimpleImage_GetImage/podman-4         	      56	  20618686 ns/op	  402113 B/op	    2701 allocs/op
BenchmarkSimpleImage_GetImage/podman-4         	      58	  20610335 ns/op	  402828 B/op	    2702 allocs/op
BenchmarkSimpleImage_GetImage/podman-4         	      52	  20555550 ns/op	  400723 B/op	    2699 allocs/op
BenchmarkSimpleImage_GetImage/podman-4         	      62	  23636675 ns/op	  401378 B/op	    2700 allocs/op
BenchmarkSimpleImage_GetImage/podman-4         	      55	  20948717 ns/op	  401907 B/op	    2700 allocs/op
BenchmarkSimpleImage_GetImage/podman-4         	      56	  20372383 ns/op	  400161 B/op	    2699 allocs/op
BenchmarkSimpleImage_GetImage/podman-4         	      51	  21253910 ns/op	  402144 B/op	    2701 allocs/op
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 345B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load build context
#3 transferring context: 209B done
#3 DONE 0.0s

#4 [1/3] ADD file-1.txt /somefile-1.txt
#4 CACHED

#5 [2/3] ADD file-2.txt /somefile-2.txt
#5 CACHED

#6 [3/3] ADD target /
#6 CACHED

#7 exporting to image
#7 exporting layers done
#7 writing image sha256:d30e380c83baedf1cacbcf5fdb46daa2ba3764f5005dbeb6e849f6a15f24cdc5 done
#7 naming to docker.io/library/stereoscope-fixture-image-simple:04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7 done
#7 naming to docker.io/library/stereoscope-fixture-image-simple:latest done
#7 DONE 0.0s
ctr: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
--- FAIL: BenchmarkSimpleImage_GetImage
    image_fixtures.go:193: using existing image tar: 'test-fixtures/cache/stereoscope-fixture-image-simple-04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7.tar' (size: 22528, modified: 2024-12-11 16:06:28.061505247 +0000 UTC, mode: -rw-r--r--)
    image_fixtures.go:241: Build docker image: name="stereoscope-fixture-image-simple" tag="04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7"
    image_fixtures.go:291: saveImage running: docker image save stereoscope-fixture-image-simple:04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7
    image_fixtures.go:286: 
        	Error Trace:	/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:286
        	            				/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:162
        	            				/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:152
        	            				/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:33
        	            				/home/runner/work/stereoscope/stereoscope/test/integration/fixture_image_simple_test.go:163
        	Error:      	Received unexpected error:
        	            	exit status 1
        	Test:       	BenchmarkSimpleImage_GetImage
        	Messages:   	could not import docker image to containerd (shell out)
BenchmarkSimpleImage_FetchSquashedContents/docker-archive-4         	   53058	     22709 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/docker-archive-4         	   52783	     22702 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/docker-archive-4         	   53055	     22699 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/docker-archive-4         	   52746	     22689 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/docker-archive-4         	   52444	     22862 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/docker-archive-4         	   52886	     22740 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/docker-archive-4         	   52782	     22661 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/podman-4                 	   50288	     22656 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/podman-4                 	   52993	     22673 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/podman-4                 	   52838	     22647 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/podman-4                 	   52807	     22698 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/podman-4                 	   52861	     22670 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/podman-4                 	   52738	     22634 ns/op	    2712 B/op	      21 allocs/op
BenchmarkSimpleImage_FetchSquashedContents/podman-4                 	   52717	     22474 ns/op	    2712 B/op	      21 allocs/op
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 345B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load build context
#3 transferring context: 209B done
#3 DONE 0.0s

#4 [1/3] ADD file-1.txt /somefile-1.txt
#4 CACHED

#5 [2/3] ADD file-2.txt /somefile-2.txt
#5 CACHED

#6 [3/3] ADD target /
#6 CACHED

#7 exporting to image
#7 exporting layers done
#7 writing image sha256:d30e380c83baedf1cacbcf5fdb46daa2ba3764f5005dbeb6e849f6a15f24cdc5 done
#7 naming to docker.io/library/stereoscope-fixture-image-simple:04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7 done
#7 naming to docker.io/library/stereoscope-fixture-image-simple:latest done
#7 DONE 0.0s
ctr: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
--- FAIL: BenchmarkSimpleImage_FetchSquashedContents
    image_fixtures.go:193: using existing image tar: 'test-fixtures/cache/stereoscope-fixture-image-simple-04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7.tar' (size: 22528, modified: 2024-12-11 16:06:28.061505247 +0000 UTC, mode: -rw-r--r--)
    image_fixtures.go:241: Build docker image: name="stereoscope-fixture-image-simple" tag="04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7"
    image_fixtures.go:291: saveImage running: docker image save stereoscope-fixture-image-simple:04e16e44161c8888a1a963720fd0443cbf7eef8101434c431de8725cd98cc9f7
    image_fixtures.go:286: 
        	Error Trace:	/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:286
        	            				/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:162
        	            				/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:152
        	            				/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:33
        	            				/home/runner/work/stereoscope/stereoscope/pkg/imagetest/image_fixtures.go:64
        	            				/home/runner/work/stereoscope/stereoscope/test/integration/fixture_image_simple_test.go:189
        	Error:      	Received unexpected error:
        	            	exit status 1
        	Test:       	BenchmarkSimpleImage_FetchSquashedContents
        	Messages:   	could not import docker image to containerd (shell out)
FAIL
exit status 1
FAIL	github.com/anchore/stereoscope/test/integration	39.123s
?   	github.com/anchore/stereoscope/test/integration/test-fixtures/registry	[no test files]
FAIL
goos: linux
goarch: amd64
pkg: github.com/anchore/stereoscope/pkg/file
cpu: AMD EPYC 7763 64-Core Processor                
ctr: 
           │ .tmp/benchmark-a06a77c.txt │
           │           sec/op           │
TarIndex-4                  36.02µ ± 2%

           │ .tmp/benchmark-a06a77c.txt │
           │            B/op            │
TarIndex-4                 5.566Ki ± 0%

           │ .tmp/benchmark-a06a77c.txt │
           │         allocs/op          │
TarIndex-4                   93.00 ± 0%

pkg: github.com/anchore/stereoscope/test/integration
                                      │ .tmp/benchmark-a06a77c.txt │
                                      │           sec/op           │
SimpleImage_GetImage/docker-archive-4                 1.167m ± 11%
SimpleImage_GetImage/podman-4                         20.62m ± 15%
geomean                                               4.904m

                                      │ .tmp/benchmark-a06a77c.txt │
                                      │            B/op            │
SimpleImage_GetImage/docker-archive-4                 266.9Ki ± 0%
SimpleImage_GetImage/podman-4                         392.5Ki ± 0%
geomean                                               323.7Ki

                                      │ .tmp/benchmark-a06a77c.txt │
                                      │         allocs/op          │
SimpleImage_GetImage/docker-archive-4                  2.298k ± 0%
SimpleImage_GetImage/podman-4                          2.700k ± 0%
geomean                                                2.491k

ctr: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
                                                   │ .tmp/benchmark-a06a77c.txt │
                                                   │           sec/op           │
SimpleImage_FetchSquashedContents/docker-archive-4                  22.70µ ± 1%
SimpleImage_FetchSquashedContents/podman-4                          22.66µ ± 1%
geomean                                                             22.68µ

                                                   │ .tmp/benchmark-a06a77c.txt │
                                                   │            B/op            │
SimpleImage_FetchSquashedContents/docker-archive-4                 2.648Ki ± 0%
SimpleImage_FetchSquashedContents/podman-4                         2.648Ki ± 0%
geomean                                                            2.648Ki

                                                   │ .tmp/benchmark-a06a77c.txt │
                                                   │         allocs/op          │
SimpleImage_FetchSquashedContents/docker-archive-4                   21.00 ± 0%
SimpleImage_FetchSquashedContents/podman-4                           21.00 ± 0%
geomean                                                              21.00
goos: linux
goarch: amd64
pkg: github.com/anchore/stereoscope/pkg/file
cpu: AMD EPYC 7763 64-Core Processor                
ctr: 
           │ .tmp/benchmark-a06a77c.txt │
           │           sec/op           │
TarIndex-4                  36.02µ ± 2%

           │ .tmp/benchmark-a06a77c.txt │
           │            B/op            │
TarIndex-4                 5.566Ki ± 0%

           │ .tmp/benchmark-a06a77c.txt │
           │         allocs/op          │
TarIndex-4                   93.00 ± 0%

pkg: github.com/anchore/stereoscope/test/integration
                                      │ .tmp/benchmark-a06a77c.txt │
                                      │           sec/op           │
SimpleImage_GetImage/docker-archive-4                 1.167m ± 11%
SimpleImage_GetImage/podman-4                         20.62m ± 15%
geomean                                               4.904m

                                      │ .tmp/benchmark-a06a77c.txt │
                                      │            B/op            │
SimpleImage_GetImage/docker-archive-4                 266.9Ki ± 0%
SimpleImage_GetImage/podman-4                         392.5Ki ± 0%
geomean                                               323.7Ki

                                      │ .tmp/benchmark-a06a77c.txt │
                                      │         allocs/op          │
SimpleImage_GetImage/docker-archive-4                  2.298k ± 0%
SimpleImage_GetImage/podman-4                          2.700k ± 0%
geomean                                                2.491k

ctr: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
                                                   │ .tmp/benchmark-a06a77c.txt │
                                                   │           sec/op           │
SimpleImage_FetchSquashedContents/docker-archive-4                  22.70µ ± 1%
SimpleImage_FetchSquashedContents/podman-4                          22.66µ ± 1%
geomean                                                             22.68µ

                                                   │ .tmp/benchmark-a06a77c.txt │
                                                   │            B/op            │
SimpleImage_FetchSquashedContents/docker-archive-4                 2.648Ki ± 0%
SimpleImage_FetchSquashedContents/podman-4                         2.648Ki ± 0%
geomean                                                            2.648Ki

                                                   │ .tmp/benchmark-a06a77c.txt │
                                                   │         allocs/op          │
SimpleImage_FetchSquashedContents/docker-archive-4                   21.00 ± 0%
SimpleImage_FetchSquashedContents/podman-4                           21.00 ± 0%
geomean                                                              21.00

@willmurphyscode willmurphyscode enabled auto-merge (squash) December 11, 2024 16:15
@willmurphyscode willmurphyscode merged commit eab981a into main Dec 11, 2024
7 checks passed
@willmurphyscode willmurphyscode deleted the fix-bump-squashfs branch December 11, 2024 17:08
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
Archived in project
Development

Successfully merging this pull request may close these issues.

Runtime Error with Syft on Singularity .sif file (panic: index out of range)
2 participants