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 on raspi #1507

Open
tas50 opened this issue Dec 4, 2024 · 0 comments
Open

Go panic on raspi #1507

tas50 opened this issue Dec 4, 2024 · 0 comments

Comments

@tas50
Copy link
Member

tas50 commented Dec 4, 2024

Describe the bug

root@adsbexchange:/home/pi# export DEBUG=1; cnspec scan
DBG searching providers in path path=/opt/mondoo/providers
→ no provider specified, defaulting to local. Use --help to see all providers.
DBG using provider os with connector local
DBG Started a new runtime (1 total)
DBG performing request method=GET url=https://releases.mondoo.com/providers/latest.json
DBG Log level set to debug
DBG Started a new runtime (2 total)
→ loaded configuration from /root/.config/mondoo/mondoo.yml using source default
→ using service account credentials
DBG Started a new runtime (3 total)
DBG initialize client authentication issuer=mondoo/ams kid=//agents.api.mondoo.app/spaces/crazy-banzai-984554/serviceaccounts/2plGiKTbbmmFb43Ca1rrdP1gArN
→ discover related assets for 1 asset(s)
DBG Started a new runtime (4 total)
DBG local> run command uname -s
DBG local> run command uname -m
DBG platform> cannot parse lsb config on this linux system error="open /etc/lsb-release: no such file or directory"
DBG local> run command uname -m
DBG platform> detected os family=["debian","linux","unix","os"] platform=raspbian
DBG local> run command hostname -f
DBG unable to read /sys/class/dmi/id/product_name error="open /sys/class/dmi/id/product_name: no such file or directory"
DBG unable to read /sys/class/dmi/id/product_version error="open /sys/class/dmi/id/product_version: no such file or directory"
DBG unable to read /sys/class/dmi/id/sys_vendor error="open /sys/class/dmi/id/sys_vendor: no such file or directory"
DBG unable to read /sys/class/dmi/id/bios_vendor error="open /sys/class/dmi/id/bios_vendor: no such file or directory"
DBG detected platform ids id-detector=["hostname","cloud-detect"] platform-ids=["//platformid.api.mondoo.app/hostname/localhost"]
DBG initialize client authentication issuer=mondoo/ams kid=//agents.api.mondoo.app/spaces/crazy-banzai-984554/serviceaccounts/2plGiKTbbmmFb43Ca1rrdP1gArN
DBG detected asset asset=localhost
DBG initialize client authentication issuer=mondoo/ams kid=//agents.api.mondoo.app/spaces/crazy-banzai-984554/serviceaccounts/2plGiKTbbmmFb43Ca1rrdP1gArN
→ synchronize assets
DBG synchronizing assets upstream assets=1
DBG got assets details assets=1
DBG asset mapping asset=//assets.api.mondoo.app/spaces/crazy-banzai-984554/assets/2plGlucomFCaHGKtU8vCzmosmh0 platform-mrn=//platformid.api.mondoo.app/hostname/localhost
DBG update asset asset=localhost platform-ids=["//platformid.api.mondoo.app/hostname/localhost"]
DBG start scan name=localhost platform={"arch":"aarch64","family":["debian","linux","unix","os"],"kind":"baremetal","labels":{"distro-id":"raspbian"},"name":"raspbian","technology_url_segments":["os","linux","raspbian","11"],"title":"Raspbian GNU/Linux 11 (bullseye)","version":"11"}
DBG connecting to asset localhost (Raspbian GNU/Linux 11 (bullseye))
DBG using API endpoint https://us.api.mondoo.com
DBG initialize client authentication issuer=mondoo/ams kid=//agents.api.mondoo.app/spaces/crazy-banzai-984554/serviceaccounts/2plGiKTbbmmFb43Ca1rrdP1gArN
DBG run scan asset=localhost
DBG client> request policies bundle for asset asset=//assets.api.mondoo.app/spaces/crazy-banzai-984554/assets/2plGlucomFCaHGKtU8vCzmosmh0
DBG marketplace> fetch policy bundle from upstream policy=//assets.api.mondoo.app/spaces/crazy-banzai-984554/assets/2plGlucomFCaHGKtU8vCzmosmh0 req-id=global
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-linux-inventory owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-linux-inventory
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-asset-inventory-aws owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-asset-inventory-aws
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-asset-inventory-azure owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-asset-inventory-azure
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-dns-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-dns-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-aws-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-aws-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-kubernetes-best-practices owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-kubernetes-best-practices
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-kubernetes-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-kubernetes-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-macos-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-macos-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-slack-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-slack-security
DBG store policy mrn=//policy.api.mondoo.app/policies/asset-overview owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/asset-overview
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-asset-inventory-gcp owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-asset-inventory-gcp
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-azure-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-azure-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-gcp-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-gcp-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-kubernetes-inventory owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-kubernetes-inventory
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-linux-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-linux-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-macos-inventory owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-macos-inventory
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-sbom owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-sbom
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-tls-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-tls-security
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-windows-asset-inventory owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-windows-asset-inventory
DBG store policy mrn=//policy.api.mondoo.app/policies/mondoo-windows-security owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/mondoo-windows-security
DBG store policy mrn=//policy.api.mondoo.app/policies/risk-factors owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//policy.api.mondoo.app/policies/risk-factors
DBG store policy mrn=//captain.api.mondoo.app/spaces/crazy-banzai-984554 owner=//policy.api.mondoo.app req-id=global uid=
DBG invalidate policy cache policy=//captain.api.mondoo.app/spaces/crazy-banzai-984554
DBG store policy mrn=//assets.api.mondoo.app/spaces/crazy-banzai-984554/assets/2plGlucomFCaHGKtU8vCzmosmh0 owner=//captain.api.mondoo.app/spaces/crazy-banzai-984554 req-id=global uid=
DBG invalidate policy cache policy=//assets.api.mondoo.app/spaces/crazy-banzai-984554/assets/2plGlucomFCaHGKtU8vCzmosmh0
DBG marketplace> fetched policy bundle from upstream policy=//assets.api.mondoo.app/spaces/crazy-banzai-984554/assets/2plGlucomFCaHGKtU8vCzmosmh0 req-id=global
DBG client> got policy bundle
DBG client> got policy filters asset=//assets.api.mondoo.app/spaces/crazy-banzai-984554/assets/2plGlucomFCaHGKtU8vCzmosmh0
DBG skipping filter query, not supported error="cannot find resource for identifier 'gcp'" mql="asset.platform == \"gcp-compute-instance\"\ngcp.compute.instance.networkInterfaces.any(_['accessConfigs'].where(_['name'] == \"External NAT\"))\n"
DBG skipping filter query, not supported error="failed to compile: cannot find resource for identifier 'k8s'" mql="k8s.pod.annotations['policies.k8s.mondoo.com/mondoo-kubernetes-security-pod-runasnonroot'] != 'ignore'"
DBG skipping filter query, not supported error="failed to compile: failed to compile: cannot find resource for identifier 'azure'" mql="asset.platform == \"azure-compute-vm-api\" && azure.subscription.compute.vm.properties[\"storageProfile\"][\"osDisk\"][\"managedDisk\"] != empty"
DBG skipping filter query, not supported error="failed to compile: cannot find resource for identifier 'aws'" mql="aws.cloudtrail.trail.kmsKey != null"
DBG skipping filter query, not supported error="failed to compile: cannot find resource for identifier 'aws'" mql="asset.platform == \"aws-ec2-instance\"\naws.ec2.instance.state != \"terminated\"\n"
DBG skipping filter query, not supported error="cannot find resource for identifier 'azure'" mql="asset.platform == \"azure-sql-server\"\nazure.subscription.sql.server.databases.any(name != \"master\")\n"
DBG skipping filter query, not supported error="failed to compile: failed to compile: cannot find resource for identifier 'aws'" mql="asset.platform == \"aws-security-group\" && aws.ec2.securitygroup.name == \"default\""
DBG skipping filter query, not supported error="failed to compile: cannot find resource for identifier 'gcp'" mql="asset.platform == \"gcp-compute-instance\"\ngcp.compute.instance.name != /^gke-/\n"
DBG skipping filter query, not supported error="failed to compile: cannot find resource for identifier 'azure'" mql="azure.subscription.tags[\"Owner\"] != null"
panic: cannot compute checksum for chunk, it doesn't seem to reference a function on the stack

goroutine 90 [running]:
go.mondoo.com/cnquery/v11/llx.(*Function).checksumV2(0x65a7da0, 0x65a71d0)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/llx/chunk.go:118 +0x274
go.mondoo.com/cnquery/v11/llx.(*Chunk).ChecksumV2(0x65a7d70, 0x1, 0x65a71d0)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/llx/chunk.go:105 +0x1d0
go.mondoo.com/cnquery/v11/llx.(*Block).AddChunk(0x5d8b580, 0x65a71d0, 0x1, 0x65a7d70)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/llx/code.go:57 +0x44
go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks.func2(0x5daf080, {0x512be00, 0x1, 0x10}, 0x1, 0x5d8b580, 0x65a7890)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:1797 +0x438
go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks.func6(0x5daf070, 0x588f8c0, {0x512be00, 0x1, 0x10})
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:1859 +0x68
go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks.func3(0x5daf070, 0x588f8a8, {0x512be00, 0x0, 0x10}, 0x588f920)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:1815 +0x25c
go.mondoo.com/cnquery/v11/mqlc.(*compiler).addValueFieldChunks(0x5dc0900, 0x10000000b)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:1857 +0x514
go.mondoo.com/cnquery/v11/mqlc.(*compiler).postCompile(0x5dc0900)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:1677 +0x32c
go.mondoo.com/cnquery/v11/mqlc.(*compiler).CompileParsed(0x5dc0900, 0x5daee20)
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:2060 +0x50
go.mondoo.com/cnquery/v11/mqlc.CompileAST(0x5daee20, 0x0, {{0x289e8d8, 0x508a3b0}, 0x0, {0x28a3574, 0x3d42320}})
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:2134 +0x3d8
go.mondoo.com/cnquery/v11/mqlc.compile({0x6581320, 0x5e}, 0x0, {{0x289e8d8, 0x508a3b0}, 0x0, {0x28a3574, 0x3d42320}})
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:2158 +0xc0
go.mondoo.com/cnquery/v11/mqlc.Compile({0x6581320, 0x5e}, 0x0, {{0x289e8d8, 0x508a3b0}, 0x0, {0x28a3574, 0x3d42320}})
	/home/runner/go/pkg/mod/go.mondoo.com/cnquery/v11@v11.33.0/mqlc/mqlc.go:2184 +0x38
go.mondoo.com/cnspec/v11/policy/executor.ExecuteFilterQueries({0x28a5f00, 0x549ae60}, {0x5736908, 0xa3, 0x11e}, 0x12a05f200)
	/home/runner/_work/cnspec/cnspec/policy/executor/graph.go:67 +0x140
go.mondoo.com/cnspec/v11/policy/scan.(*localAssetScanner).FilterQueries(...)
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:1036
go.mondoo.com/cnspec/v11/policy/scan.(*localAssetScanner).UpdateFilters(0x5191e8c, 0x5191df0, 0x12a05f200)
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:1042 +0x58
go.mondoo.com/cnspec/v11/policy/scan.(*localAssetScanner).runPolicy(0x5191e8c)
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:961 +0x390
go.mondoo.com/cnspec/v11/policy/scan.(*localAssetScanner).run(0x5191e8c)
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:750 +0x34
go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).runMotorizedAsset.func1(0x57388a0, 0x5722408)
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:601 +0x26c
go.mondoo.com/cnspec/v11/internal/datalakes/inmemory.WithDb({0x28a5f00, 0x4ddc050}, 0x548a600, 0x5441efc)
	/home/runner/_work/cnspec/cnspec/internal/datalakes/inmemory/inmemory.go:52 +0x64
go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).runMotorizedAsset(0x51d4a00, 0x515c980)
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:577 +0x74
go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).RunAssetJob(0x51d4a00, 0x515c980)
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:524 +0xc0
go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).distributeJob.func3()
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:450 +0x494
created by go.mondoo.com/cnspec/v11/policy/scan.(*LocalScanner).distributeJob in goroutine 1
	/home/runner/_work/cnspec/cnspec/policy/scan/local_scanner.go:416 +0x6a4
root@adsbexchange:/home/pi#
pi@adsbexchange:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
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"
root@adsbexchange:/home/pi# cat /sys/firmware/devicetree/base/model
Raspberry Pi 4 Model B Rev 1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant