slim: Unable Xray an target image

Expected Behavior

run slim x nginx:latest --debug --verbose should return xray reports


Actual Behavior

It gives an API error(500)

md=xray state=started
cmd=xray info=params target='nginx:latest' add-image-manifest='false' add-image-config='false' rm-file-artifacts='false'
cmd=xray state=image.api.inspection.start
cmd=xray info=image size.human='68 MB' architecture='arm64' id='sha256:0f04e4f646a3f14bf31d8bc8d885b6c951fdcf42589d06845f64d18aec6a3c4d' size.bytes='67668418'
cmd=xray info=image.stack index='0' name='nginx:latest' id='sha256:0f04e4f646a3f14bf31d8bc8d885b6c951fdcf42589d06845f64d18aec6a3c4d' instructions='17' message='see report file for details'
cmd=xray info=image.exposed_ports list='80/tcp'
cmd=xray state=image.api.inspection.done
cmd=xray state=image.data.inspection.start
cmd=xray info=image.data.inspection.save.image.start
time="2024-06-13T21:03:44+08:00" level=error msg="dockerutil.SaveImage: dclient.ExportImage() error = API error (500): invalid repository name (0f04e4f646a3f14bf31d8bc8d885b6c951fdcf42589d06845f64d18aec6a3c4d), cannot specify 64-byte hexadecimal strings"
time="2024-06-13T21:03:44+08:00" level=fatal msg="slim: failure" error="API error (500): invalid repository name (0f04e4f646a3f14bf31d8bc8d885b6c951fdcf42589d06845f64d18aec6a3c4d), cannot specify 64-byte hexadecimal strings" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x64\ngithub.com/slimtoolkit/slim/pkg/util/errutil.FailOn({0x102b5ff98, 0x140005220a8})\n\tgithub.com/slimtoolkit/slim/pkg/util/errutil/errutil.go:32 +0x38\ngithub.com/slimtoolkit/slim/pkg/app/master/command/xray.OnCommand(0x140004c0d68, 0x140004c8480, 0x140004c0d88, {0x16f252d37, 0xc}, 0x1, {0x0, 0x0}, {0x0, 0x0}, ...)\n\tgithub.com/slimtoolkit/slim/pkg/app/master/command/xray/handler.go:374 +0x21e0\ngithub.com/slimtoolkit/slim/pkg/app/master/command/xray.glob..func1(0x140000bfa80)\n\tgithub.com/slimtoolkit/slim/pkg/app/master/command/xray/cli.go:337 +0x1710\ngithub.com/urfave/cli/v2.(*Command).Run(0x103c731c0, 0x140000beac0)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x4a8\ngithub.com/urfave/cli/v2.(*App).RunContext(0x140002c51e0, {0x102b7e098?, 0x103cf1e60}, {0x14000116050, 0x5, 0x5})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0x808\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:224\ngithub.com/slimtoolkit/slim/pkg/app/master.Run()\n\tgithub.com/slimtoolkit/slim/pkg/app/master/app.go:15 +0x4c\nmain.main()\n\tgithub.com/slimtoolkit/slim/cmd/slim/main.go:15 +0x194\n" version="darwin/arm64|Transformer|1.40.11|latest|latest"

Specifications

  • Version: slim version darwin/arm64|Transformer|1.40.11|latest|latest
  • Platform: macOS 14.5
  • Docker info
$ docker info
Client:
Version:    26.1.3
Context:    orbstack
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
  Version:  v0.14.1
  Path:     /Users/devlocal/.docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
  Version:  v2.27.1
  Path:     /Users/devlocal/.docker/cli-plugins/docker-compose

Server:
Containers: 4
Running: 1
Paused: 0
Stopped: 3
Images: 51
Server Version: 26.1.4
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3a4de459a68952ffb703bbe7f2290861a75b6b67
runc version: 51d5e94601ceffbbd85688df1c928ecccbfa4685
init version: de40ad0
Security Options:
seccomp
 Profile: builtin
cgroupns
Kernel Version: 6.9.3-orbstack-00146-g1a8d02c90788
Operating System: OrbStack
OSType: linux
Architecture: aarch64
CPUs: 12
Total Memory: 15.59GiB
Name: orbstack
ID: ed3c0974-9b58-465e-906c-ea982b257a80
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Default Address Pools:
 Base: 192.168.215.0/24, Size: 24
 Base: 192.168.228.0/24, Size: 24
 Base: 192.168.247.0/24, Size: 24
 Base: 192.168.207.0/24, Size: 24
 Base: 192.168.167.0/24, Size: 24
 Base: 192.168.107.0/24, Size: 24
 Base: 192.168.237.0/24, Size: 24
 Base: 192.168.148.0/24, Size: 24
 Base: 192.168.214.0/24, Size: 24
 Base: 192.168.165.0/24, Size: 24
 Base: 192.168.227.0/24, Size: 24
 Base: 192.168.181.0/24, Size: 24
 Base: 192.168.158.0/24, Size: 24
 Base: 192.168.117.0/24, Size: 24
 Base: 192.168.155.0/24, Size: 24
 Base: 192.168.147.0/24, Size: 24
 Base: 192.168.229.0/24, Size: 24
 Base: 192.168.183.0/24, Size: 24
 Base: 192.168.156.0/24, Size: 24
 Base: 192.168.97.0/24, Size: 24
 Base: 192.168.171.0/24, Size: 24
 Base: 192.168.186.0/24, Size: 24
 Base: 192.168.216.0/24, Size: 24
 Base: 192.168.242.0/24, Size: 24
 Base: 192.168.166.0/24, Size: 24
 Base: 192.168.239.0/24, Size: 24
 Base: 192.168.223.0/24, Size: 24
 Base: 192.168.164.0/24, Size: 24
 Base: 192.168.163.0/24, Size: 24
 Base: 192.168.172.0/24, Size: 24
 Base: 172.17.0.0/16, Size: 16
 Base: 172.18.0.0/16, Size: 16
 Base: 172.19.0.0/16, Size: 16
 Base: 172.20.0.0/14, Size: 16
 Base: 172.24.0.0/14, Size: 16
 Base: 172.28.0.0/14, Size: 16

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 27 (14 by maintainers)

Most upvoted comments

@Shard good to have a work around 😃 Testing the new version where it’s not necessary… I’ll share an update when it’s ready for use

@Shard by the way, it’s a good idea to use additional flags for xray… --changes=all is one example, which will get you all data.

Ah yes I do! Apologies for not noticing that one.

Turned it off and mint seems happy to xray nginx now 🎉 :

$ mint xray nginx:latest
cmd=xray state=started
cmd=xray info=cmd.input.params runtime='auto/docker' target='nginx:latest' add-image-manifest='false' add-image-config='false' rm-file-artifacts='false'
cmd=xray state=image.api.inspection.start
cmd=xray info=image size.bytes='197054395' size.human='197 MB' architecture='arm64' id='sha256:5e0fa356e6f4a996ca452b017c81aca3d087ae38f873ed8314af16126423b21f'
cmd=xray info=image.stack index='0' name='nginx:latest' id='sha256:5e0fa356e6f4a996ca452b017c81aca3d087ae38f873ed8314af16126423b21f' instructions='17' message='see report file for details'
cmd=xray info=image.exposed_ports list='80/tcp'
cmd=xray state=image.api.inspection.done
cmd=xray state=image.data.inspection.start
cmd=xray info=image.data.inspection.save.image.start
cmd=xray info=image.data.inspection.save.image.end
cmd=xray info=image.data.inspection.process.image.start
cmd=xray info=image.data.inspection.process.image.end
cmd=xray state=image.data.inspection.done
...
cmd=xray state=completed
cmd=xray state=done

@kcq I got a different error this time related to invalid tar header

$ mint --version
mint version linux/amd64|Aurora|1.41.7|a2a53d2348aeedf0d650d47debf477a2cad47111|2024-09-25_03:07:42PM

 $ mint --verbose xray nginx:1.27
cmd=xray state=started
cmd=xray info=cmd.input.params add-image-config='false' rm-file-artifacts='false' runtime='auto/docker' target='nginx:1.27' add-image-manifest='false'
cmd=xray state=image.api.inspection.start
time="2024-12-10T13:34:23-05:00" level=info msg="inspecting 'fat' image metadata..." app=mint cmd=xray
cmd=xray info=image size.human='73 MB' architecture='amd64' id='sha256:28402db69fec7c17e179ea87882667f1e054391138f77ffaf0c3eb388efc3ffb' size.bytes='72950530'
time="2024-12-10T13:34:23-05:00" level=info msg="processing 'fat' image info..." app=mint cmd=xray
cmd=xray info=image.stack message='see report file for details' index='0' name='nginx:1.27' id='sha256:28402db69fec7c17e179ea87882667f1e054391138f77ffaf0c3eb388efc3ffb' instructions='18'
cmd=xray info=image.exposed_ports list='80/tcp'
cmd=xray state=image.api.inspection.done
cmd=xray state=image.data.inspection.start
cmd=xray info=image.data.inspection.process.image.start
time="2024-12-10T13:34:23-05:00" level=error msg="layerFromStream: error reading layer(11d6fdd0e8a78c038b5c013368f76279d21e5ee239f18a1e20a3593414fa1095) - archive/tar: invalid tar header"
time="2024-12-10T13:34:23-05:00" level=error msg="dockerimage.LoadPackage: error reading oci layer from archive(/tmp/mint-state/.mint-state/images/28402db69fec7c17e179ea87882667f1e054391138f77ffaf0c3eb388efc3ffb/image/28402db69fec7c17e179ea87882667f1e054391138f77ffaf0c3eb388efc3ffb.tar/blobs/sha256/11d6fdd0e8a78c038b5c013368f76279d21e5ee239f18a1e20a3593414fa1095) - archive/tar: invalid tar header"
time="2024-12-10T13:34:23-05:00" level=fatal msg="slim: failure" error="archive/tar: invalid tar header" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:26 +0x5e\ngithub.com/mintoolkit/mint/pkg/util/errutil.FailOn({0x2f5aa40, 0x4648120})\n\tgithub.com/mintoolkit/mint/pkg/util/errutil/errutil.go:32 +0x4b\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.OnCommand(0xc0007c58f8, 0xc0005103c0, 0xc0007c53c0, {_, _}, _, {_, _}, {0x0, 0x0}, ...)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/handler.go:495 +0x3a65\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.init.func1(0xc000788700)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/cli.go:343 +0x1d92\ngithub.com/urfave/cli/v2.(*Command).Run(0x46882e0, 0xc000788700, {0xc00051c5e0, 0x2, 0x2})\n\tgithub.com/urfave/cli/v2@v2.27.1/command.go:279 +0x7e2\ngithub.com/urfave/cli/v2.(*Command).Run(0xc000790160, 0xc000788140, {0xc0001c80c0, 0x4, 0x4})\n\tgithub.com/urfave/cli/v2@v2.27.1/command.go:272 +0xa65\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000434600, {0x2f85598, 0x4705340}, {0xc0001c80c0, 0x4, 0x4})\n\tgithub.com/urfave/cli/v2@v2.27.1/app.go:337 +0x58b\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.27.1/app.go:311\ngithub.com/mintoolkit/mint/pkg/app/master.Run()\n\tgithub.com/mintoolkit/mint/pkg/app/master/app.go:15 +0x45\nmain.main()\n\tgithub.com/mintoolkit/mint/cmd/mint/main.go:15 +0x187\n" version="linux/amd64|Aurora|1.41.7|a2a53d2348aeedf0d650d47debf477a2cad47111|2024-09-25_03:07:42PM"

@rfilgueiras thanks for sharing your report! I’ll use nvcr.io/nvidia/clara/bionemo-framework:1.8 to repro. Couldn’t repro the original condition with OrbStack, so this ticket got stuck and hopefully now with the accessible repro image it’ll be unstuck 😃

it’s possible that Orbstack’s docker save API call is different… need to repro the steps manually to confirm