You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding the host filtering part as described in the tutorial I receive the following error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x20720bd]
Error: INFO[0000] Experimental features enabled
WARN[0000] you set --verify-image=false, image will not be verified
WARN[0000] failed to get cgroups info of container 3ebd135cf445cd857c2c42bf5a923b704de1106efa9a837c8206a2dcae5c8c0f from /proc/341/cgroup: parsing cgroup: open /proc/341/cgroup: no such file or directory
WARN[0000] Failed to create container-collection
WARN[0000] you set --verify-image=false, image will not be verified
WARN[0000] failed to get cgroups info of container 3ebd135cf445cd857c2c42bf5a923b704de1106efa9a837c8206a2dcae5c8c0f from /proc/341/cgroup: parsing cgroup: open /proc/341/cgroup: no such file or directory
WARN[0001] Failed to create container-collection
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x20720bd]
Description
I followed the hello world gadget tutorial as described here: https://www.inspektor-gadget.io/docs/latest/devel/hello-world-gadget/.
Everything worked fine, until getting to "Filtering and container enrichement" section:
https://www.inspektor-gadget.io/docs/latest/devel/hello-world-gadget/#filtering-and-container-enrichement
(BTW there's a typo in the section title it should be enrichment instead of enrichement).
When adding the host filtering part as described in the tutorial I receive the following error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x20720bd]
goroutine 1 [running]:
github.com/inspektor-gadget/inspektor-gadget/pkg/operators/localmanager.(*localManagerTraceWrapper).PreStart(0xc003992080, {0x2d8c008, 0xc0030f9c80})
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/operators/localmanager/localmanager.go:532 +0xbd
github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context.(*GadgetContext).run(0xc0030f9c80, {0xc0031cf1d0, 0x3, 0x17?})
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context/run.go:103 +0x197
github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context.(*GadgetContext).Run(0xc0030f9c80, 0xc000050f40?)
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context/run.go:167 +0x9e
github.com/inspektor-gadget/inspektor-gadget/pkg/runtime/local.(*Runtime).RunGadget(0x22d4f60?, {0x2db2d60?, 0xc0030f9c80?}, 0xd?, 0xc002af5b80?)
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/runtime/local/oci.go:35 +0x27
github.com/inspektor-gadget/inspektor-gadget/cmd/common.NewRunCommand.func2(0xc00039c608, {0xc00037f440?, 0x2?, 0x2?})
/go/src/github.com/inspektor-gadget/inspektor-gadget/cmd/common/oci.go:180 +0x6d7
github.com/spf13/cobra.(*Command).execute(0xc00039c608, {0xc00037f440, 0x2, 0x2})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:983 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004f6908)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
main.main()
/go/src/github.com/inspektor-gadget/inspektor-gadget/cmd/ig/main.go:91 +0x374
Impact
Can't add host filtering to hello world gadget.
Environment and steps to reproduce
WARN[0000] you set --verify-image=false, image will not be verified
WARN[0000] failed to get cgroups info of container 3ebd135cf445cd857c2c42bf5a923b704de1106efa9a837c8206a2dcae5c8c0f from /proc/341/cgroup: parsing cgroup: open /proc/341/cgroup: no such file or directory
WARN[0000] Failed to create container-collection
WARN[0000] you set --verify-image=false, image will not be verified
WARN[0000] failed to get cgroups info of container 3ebd135cf445cd857c2c42bf5a923b704de1106efa9a837c8206a2dcae5c8c0f from /proc/341/cgroup: parsing cgroup: open /proc/341/cgroup: no such file or directory
WARN[0001] Failed to create container-collection
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x20720bd]
goroutine 1 [running]:
github.com/inspektor-gadget/inspektor-gadget/pkg/operators/localmanager.(*localManagerTraceWrapper).PreStart(0xc003992080, {0x2d8c008, 0xc0030f9c80})
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/operators/localmanager/localmanager.go:532 +0xbd
github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context.(*GadgetContext).run(0xc0030f9c80, {0xc0031cf1d0, 0x3, 0x17?})
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context/run.go:103 +0x197
github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context.(*GadgetContext).Run(0xc0030f9c80, 0xc000050f40?)
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context/run.go:167 +0x9e
github.com/inspektor-gadget/inspektor-gadget/pkg/runtime/local.(*Runtime).RunGadget(0x22d4f60?, {0x2db2d60?, 0xc0030f9c80?}, 0xd?, 0xc002af5b80?)
/go/src/github.com/inspektor-gadget/inspektor-gadget/pkg/runtime/local/oci.go:35 +0x27
github.com/inspektor-gadget/inspektor-gadget/cmd/common.NewRunCommand.func2(0xc00039c608, {0xc00037f440?, 0x2?, 0x2?})
/go/src/github.com/inspektor-gadget/inspektor-gadget/cmd/common/oci.go:180 +0x6d7
github.com/spf13/cobra.(*Command).execute(0xc00039c608, {0xc00037f440, 0x2, 0x2})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:983 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004f6908)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
main.main()
/go/src/github.com/inspektor-gadget/inspektor-gadget/cmd/ig/main.go:91 +0x374
Expected behavior
The hello world gadget is ran as described in the tutorial.
Additional information
I'm running the image based gadget with --image-verify=false because of another issue I was experiencing with the tutorial:
#2872 (comment)
Please add any information here that does not fit the above format.
The text was updated successfully, but these errors were encountered: