slimtoolkit / slimtoolkit/slim
profile command not running on M1 macs
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
Start profiling a container
Actual Behavior
Container failed to start with the following error
cmd=profile info=container status='created' name='dockerslimk_15864_20220623051144' id='e3169e9807fc621ef310d3caae78dc9f08a17e2b87ebe81ab74316bb971a28a1'
time="2022-06-23T08:11:44+03:00" level=fatal msg="docker-slim: failure" error="API error (400): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: \"/opt/dockerslim/bin/docker-slim-sensor\": stat /opt/dockerslim/bin/docker-slim-sensor: no such file or directory: unknown" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x68\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x102ff33d8, 0x1400000d0b0})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x3c\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/profile.OnCommand(_, _, {_, _}, _, {_, _}, {_, _}, {_, ...}, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/profile/handler.go:311 +0x1ce4\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/profile.glob..func1(0x1400019db00)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/profile/cli.go:354 +0x15d0\ngithub.com/urfave/cli/v2.(*Command).Run(0x10359d140, 0x1400019c540)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x50c\ngithub.com/urfave/cli/v2.(*App).RunContext(0x14000188680, {0x102ffaac8?, 0x14000038098}, {0x1400019c080, 0x4, 0x4})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0x888\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:224\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands.(*InteractiveApp).execute(0x14000095ef0, {0x14000042360?, 0x102ea4301?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/cliprompt.go:101 +0x330\ngithub.com/c-bata/go-prompt.(*Prompt).Run(0x1400019e380)\n\tgithub.com/c-bata/go-prompt@v0.2.3/prompt.go:85 +0x6f8\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands.(*InteractiveApp).Run(...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/cliprompt.go:187\ngithub.com/docker-slim/docker-slim/pkg/app/master.newCLI.func4(0x1400058cd80?)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/cli.go:172 +0x58\ngithub.com/urfave/cli/v2.(*App).RunContext(0x14000188680, {0x102ffaac8?, 0x14000038098}, {0x14000030200, 0x1, 0x1})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:322 +0x700\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:224\ngithub.com/docker-slim/docker-slim/pkg/app/master.Run()\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/app.go:15 +0x50\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:15 +0x1c8\n" version="darwin|Transformer|1.37.5|latest|latest"
Steps to Reproduce the Problem
- run the profile command on an M1 mac
Specifications
cmd=version info=app version='darwin|Transformer|1.37.5|latest|latest' container=false dsimage=false
cmd=version info=app outdated=true current=1.37.6 verdict='your installed version is OUTDATED (local=1.37.5 current=1.37.6)'
cmd=version info=app location='/opt/homebrew/bin'
cmd=version info=host osname='other'
cmd=version info=host osbuild=21F79
cmd=version info=host version=' Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000'
cmd=version info=host release=21.5.0
cmd=version info=host sysname=darwin
cmd=version info=docker name=docker-desktop
cmd=version info=docker kernel_version=5.10.104-linuxkit
cmd=version info=docker operating_system=Docker Desktop
cmd=version info=docker ostype=linux
cmd=version info=docker server_version=20.10.14
cmd=version info=docker architecture=aarch64
cmd=version info=dclient api_version=1.41
cmd=version info=dclient min_api_version=1.12
cmd=version info=dclient build_time=2022-03-24T01:45:44.000000000+00:00
cmd=version info=dclient git_commit=87a90dc
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at pkg/app/master/commands/profile/handler.go:311 and inspect how the profile command locates the docker-slim-sensor executable referenced in the error. Reproduce the command on an M1 Mac with Docker Desktop, then verify that the sensor is available for the darwin ARM64 environment and that profiling starts successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, macos
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100