slimtoolkit / slim

Slim(toolkit): Don't change anything in your container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
Apache License 2.0
18.78k stars 700 forks source link

sensor: composite monitor - FAN failed to start running #652

Closed nickpassarella closed 4 months ago

nickpassarella commented 4 months ago

Expected Behavior

slim build/profile completes without error.


Actual Behavior

slim build --target repro:latest

cmd=build info=param.http.probe message='using default probe'
cmd=build state=started
cmd=build info=params target.image='repro' continue.mode='probe' rt.as.user='true' keep.perms='true' tags='' image-build-engine='internal' target.type='image'
cmd=build state=image.inspection.start
cmd=build info=image id='sha256:ee301c921b8aadc002973b2e0c3da17d701dcd994b606769a7e6eaa100b81d44' size.bytes='9136' size.human='9.1 kB'
cmd=build info=image.stack index='0' name='hello-world:latest' id='sha256:ee301c921b8aadc002973b2e0c3da17d701dcd994b606769a7e6eaa100b81d44'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
cmd=build info=container status='created' name='slimk_22109_20240304164609' id='87eb41d1a7fb3be5f8c93221d3945d943868ec3210d3102045a2124308bfad40'
cmd=build info=container id='87eb41d1a7fb3be5f8c93221d3945d943868ec3210d3102045a2124308bfad40' status='running' name='slimk_22109_20240304164609'
cmd=build info=container message='obtained IP address' ip='172.17.0.2'
cmd=build info=cmd.startmonitor status='sent'
cmd=build info=event.startmonitor.done status='received.unexpected' data='{"name":"event.monitor.start.failed","data":{"component":"monitor.runner","state":"/","errors":["SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:120,File:github.com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify/monitor.go}}"]}}
'
slim: container stdout:
slim: container stderr:
time="2024-03-04T16:46:14Z" level=error msg="sensor: composite monitor - FAN failed to start running"
time="2024-03-04T16:46:14Z" level=error msg="sensor: failed to start composite monitor" error="SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:120,File:github.com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify/monitor.go}}"
time="2024-03-04T16:46:14Z" level=error msg="sensor: run finished with error" error="run sensor without monitor failed: SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:120,File:github.com/slimtoolkit/slim/pkg/app/sensor/monitor/fanotify/monitor.go}}"
slim: end of container logs =============
cmd=build info=report file='slim.report.json'
time="2024-03-04T11:46:15-05:00" level=error msg=terminating error="unexpected event type" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/slimtoolkit/slim/pkg/app.(*ExecutionContext).FailOn(0xc000324ce0, {0x2f28180, 0x3f915f0})\n\tgithub.com/slimtoolkit/slim/pkg/app/execontext.go:58 +0x58\ngithub.com/slimtoolkit/slim/pkg/app/master/command/build.OnCommand(_, _, {_, _}, _, {_, _}, {_, _}, {0x0, ...}, ...)\n\tgithub.com/slimtoolkit/slim/pkg/app/master/command/build/handler.go:1136 +0x4a45\ngithub.com/slimtoolkit/slim/pkg/app/master/command/build.glob..func1(0xc0001afe00)\n\tgithub.com/slimtoolkit/slim/pkg/app/master/command/build/cli.go:760 +0x5d51\ngithub.com/urfave/cli/v2.(*Command).Run(0x3fa9340, 0xc0001afe00, {0xc00049a540, 0x3, 0x3})\n\tgithub.com/urfave/cli/v2@v2.27.1/command.go:279 +0x9dd\ngithub.com/urfave/cli/v2.(*Command).Run(0xc0004a2160, 0xc0001af880, {0xc0001ae040, 0x4, 0x4})\n\tgithub.com/urfave/cli/v2@v2.27.1/command.go:272 +0xc2e\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000496200, {0x2f46348?, 0x401fcc0}, {0xc0001ae040, 0x4, 0x4})\n\tgithub.com/urfave/cli/v2@v2.27.1/app.go:337 +0x5db\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.27.1/app.go:311\ngithub.com/slimtoolkit/slim/pkg/app/master.Run()\n\tgithub.com/slimtoolkit/slim/pkg/app/master/app.go:15 +0x45\nmain.main()\n\tgithub.com/slimtoolkit/slim/cmd/slim/main.go:15 +0x187\n"
cmd=build info=fail.on version='darwin/amd64|Transformer|1.40.11|1b271555882eacdfb4e6598d6d0552e9b9b1449b|2024-02-02_01:36:22PM'
cmd=build info=exit location='/usr/local/bin' code='-1' version='darwin/amd64|Transformer|1.40.11|1b271555882eacdfb4e6598d6d0552e9b9b1449b|2024-02-02_01:36:22PM'
app='slim' message='GitHub Discussions' info='https://github.com/slimtoolkit/slim/discussions'
app='slim' message='Join the CNCF Slack channel to ask questions or to share your feedback' info='https://cloud-native.slack.com/archives/C059QP1RH1S'
app='slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
app='slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'

Steps to Reproduce the Problem

  1. Create basic Dockerfile
    # Dockerfile
    from hello-world
  2. Build image docker build -t repro .
  3. Run slim commands slim build --target repro:latest

Specifications

nickpassarella commented 4 months ago

Realizing the install instructions for Macs seems to have installed the amd64 version. Will try again with an alternate installation option.

nickpassarella commented 4 months ago

User error on my end. I went back through the installation process and just copied the wrong URL.

kcq commented 3 months ago

@nickpassarella it happens :) let me know when you decide to go beyond the hello-world :)