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

go panic Raspi 9 #1572

Open
felixblang opened this issue Feb 10, 2025 · 0 comments
Open

go panic Raspi 9 #1572

felixblang opened this issue Feb 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@felixblang
Copy link

Describe the bug
A clear and concise description of what the bug is.
On Raspbian 9 scnspec crashes wit a go panic

To Reproduce
Steps to reproduce the behavior:
run cnspec on raspbian 9

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots or CLI Output
If applicable, add screenshots or the CLI output to help explain your problem.

root@raspberrypi:/home/pi# cnspec scan local
! can't find any paths for providers, none are configured system-path=/opt/mondoo/providers
→ installing provider 'os' version=11.3.25
→ successfully installed os provider path=/opt/mondoo/providers/os version=11.3.25
→ no Mondoo configuration file provided, using defaults
! No credentials provided. Switching to --incognito mode.
→ discover related assets for 1 asset(s)

raspberrypi ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 0%

panic: cannot compute checksum for chunk, it doesn't seem to reference a function on the stack [recovered]
panic: panic compiling "docker.file.stages.all(add == empty)\n": cannot compute checksum for chunk, it doesn't seem to reference a function on the stack [recovered]
panic: panic compiling "docker.file.stages.all(add == empty)\n": cannot compute checksum for chunk, it doesn't seem to reference a function on the stack

           goroutine 83 [running]:
                                  go.mondoo.com/cnquery/v11/providers-sdk/v1/upstream/health.ReportPanic({0x23da3cf, 0x6}, {0x29065c8, 0x7}, {0x29065d0, 0x7}, {0x0, 0x0, 0x0})
                                                                                                                                                                                    /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/providers-sdk/v1/upstream/health/errors.go:32 +0x144
                                                                                  panic({0x2028030, 0x7834e10})
                                                                                                                    /home/runner/_work/_tool/go/1.23.4/x64/src/runtime/panic.go:785 +0xfc
                                                                                                                                                                                         go.mondoo.com/cnquery/v11/mqlc.Compile.func1()
                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:2187 +0xd4
                                                                                                              panic({0x1f97428, 0x2903e08})
                                                                                                                                            /home/runner/_work/_tool/go/1.23.4/x64/src/runtime/panic.go:785 +0xfc
go.mondoo.com/cnquery/v11/llx.(*Function).checksumV2(0x77efe00, 0x77ef770)
                                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/llx/chunk.go:118 +0x274
                                                                                                                                                              go.mondoo.com/cnquery/v11/llx.(*Chunk).ChecksumV2(0x77efdd0, 0x1, 0x77ef770)
                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/llx/chunk.go:105 +0x1d0
                                                                                                              go.mondoo.com/cnquery/v11/llx.(*Block).AddChunk(0x7850280, 0x77ef770, 0x1, 0x77efdd0)
                                                                                                                                                                                                    /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/llx/code.go:57 +0x44
                                                                  go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks.func2(0x77ed180, {0x7181000, 0x1, 0x10}, 0x1, 0x7850280, 0x77ef980)
                                                                                                                                                                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:1798 +0x438
                                                                              go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks.func6(0x77ed160, 0x783a588, {0x7181000, 0x1, 0x10})
                                                                                                                                                                                                    /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:1860 +0x68
                                                                     go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks.func3(0x77ed160, 0x783a570, {0x7181000, 0x0, 0x10}, 0x783a600)
                                                                                                                                                                                                    /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:1816 +0x25c
                                                                      go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks(0x77e3440, 0x100000003)
                                                                                                                                                                    /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:1858 +0x514
                                      go.mondoo.com/cnquery/v11/mqlc.(*compiler).postCompile(0x77e3440)
                                                                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:1678 +0x32c
                                                                                                                                                                                               go.mondoo.com/cnquery/v11/mqlc.(*compiler).CompileParsed(0x77e3440, 0x77ed010)
                                                                    /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:2061 +0x50
                                                                                                                                                      go.mondoo.com/cnquery/v11/mqlc.CompileAST(0x77ed010, 0x77e78c0, {{0x2921650, 0x5f36a40}, 0x0, {0x2926484, 0x3e208f0}})
                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:2135 +0x3d8
                                                                                                                                               go.mondoo.com/cnquery/v11/mqlc.compile({0x74e9170, 0x25}, 0x77e78c0, {{0x2921650, 0x5f36a40}, 0x0, {0x2926484, 0x3e208f0}})
                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:2159 +0xc0
                                                                                                                                              go.mondoo.com/cnquery/v11/mqlc.Compile({0x74e9170, 0x25}, 0x77e78c0, {{0x2921650, 0x5f36a40}, 0x0, {0x2926484, 0x3e208f0}})
                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/mqlc/mqlc.go:2191 +0x80
                                                                                                                                              go.mondoo.com/cnquery/v11/explorer.(*Mquery).Compile(0x784a0b8, 0x77e78c0, {{0x2921650, 0x5f36a40}, 0x0, {0x2926484, 0x3e208f0}})
                                                                    /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/explorer/mquery.go:36 +0x1b8
                                                                                                                                                           go.mondoo.com/cnquery/v11/explorer.(*Mquery).refreshChecksumAndType(0x784a0b8, 0x77e7860, 0x77e7840, {{0x2921650, 0x5f36a40}, 0x0, {0x2926484, 0x3e208f0}})
                                                                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/explorer/mquery.go:243 +0x44c
                                                                                                                                                                                                    go.mondoo.com/cnquery/v11/explorer.(*Mquery).RefreshChecksumAndType(...)
                                                            /home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.40.0/explorer/mquery.go:195
                                                                                                                                             go.mondoo.com/cnspec/v11/policy.(*bundleCache).compileQuery(0x7403b38, 0x784a0b8)
                    /home/runner/_work/cnspec/cnspec/policy/bundle.go:1147 +0x48
                                                                                go.mondoo.com/cnspec/v11/policy.(*bundleCache).compileQueries(0x7403b38, {0x7829cc0, 0xb, 0x10}, 0x0)
                                                                                                                                                                                            /home/runner/_work/cnspec/cnspec/policy/bundle.go:1047 +0x170
                                        go.mondoo.com/cnspec/v11/policy.(*Bundle).CompileExt(0x7180f00, {0x2924744, 0x5e8ee28}, {{{0x2921650, 0x5f36a40}, 0x0, {0x2926484, 0x3e208f0}}, {0x0, 0x0}, ...})
                                                                                                                                                                                                            /home/runner/_work/cnspec/cnspec/policy/bundle.go:809 +0x184
                                                       go.mondoo.com/cnspec/v11/policy/scan.(*fetcher).fetchBundles(0x5e3ef18, {0x2924744, 0x5e8ee28}, {{0x2921650, 0x5f36a40}, 0x0, {0x2926484, 0x3e208f0}}, {0x730c980, 0xb, ...})
                    /home/runner/_work/cnspec/cnspec/policy/scan/fetcher.go:44 +0x128
                                                                                     go.mondoo.com/cnspec/v11/policy/scan.(*localAssetScanner).fetchPublicRegistryBundle(0x7403e74)
                                                                                                                                                                                    /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:938 +0x508
                                           go.mondoo.com/cnspec/v11/policy/scan.(*localAssetScanner).prepareAsset(0x7403e74)
                                                                                                                                    /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:841 +0x48
                                                                                                                                                                                                           go.mondoo.com/cnspec/v11/policy/scan.(*localAssetScanner).run(0x7403e74)
                                                                    /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:751 +0x1c
                                                                                                                                           go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).runMotorizedAsset.func1(0x734c500, 0x5e8f3c8)
                                    /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:606 +0x26c
                                                                                                            go.mondoo.com/cnspec/v11/internal/datalakes/inmemory.WithDb({0x2928f90, 0x5e61db0}, 0x5d58f40, 0x734bee4)
            /home/runner/_work/cnspec/cnspec/internal/datalakes/inmemory/inmemory.go:52 +0x64
                                                                                             go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).runMotorizedAsset(0x59ae1c0, 0x59aef00)
                                                                                                                                                                                            /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:582 +0x74
                                                  go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).RunAssetJob(0x59ae1c0, 0x59aef00)
                                                                                                                                            /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:529 +0xc0
  go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).distributeJob.func3()
                                                                                    /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:455 +0x4d8
                                                                                                                                                            created by go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).distributeJob in goroutine 1
                                            /home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:419 +0x6a4
                                                                                                                    root@raspberrypi:/home/pi#

Desktop (please complete the following information):
Raspberry Pi3 B+

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Additional context
Add any other context about the problem here.

@chris-rock chris-rock added the bug Something isn't working label Feb 10, 2025
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
None yet
Development

No branches or pull requests

2 participants