-
Bug
-
Resolution: Done
-
Blocker
-
quay-v3.6.1
-
False
-
False
-
Description:
This is an issue found when using Clair V4 to scan images, now after deployed Quay with Operator, mirror images from Redhat registry, when Clair Scan images, the Clair POD was crashed, checked Cliar APP POD logs and get following error message, for detailed Cliar POD log, see Quay_361_clair_pod.logs
{"level":"info","component":"rpm/Scanner.Scan","kind":"package","layer":"sha256:85f1b41dcb501fa64d72746685b7aaab91e0f877ae2f49d1064e935f6fdef879","manifest":"sha256:d426203266792ebba4adb63e77fa602dc0e484f1027d2f7459c34d1ab3a696d3","scanner":"rpm","state":"ScanLayers","version":"4","file":348,"dir":120,"dir(out of order)":88,"symlink":17,"link":87,"whiteout":27,"time":"2021-11-04T06:06:18Z","message":"extracted layer"}
panic: runtime error: slice bounds out of range [-1:]
Clair Version: "version":"v4.3.2"
Quay Image: quay-operator-bundle-container-v3.6.1-3
Target Images sources to be scanned: registry.redhat.io/rhscl/redis-5-rhel7
Quay PODs:
oc get pod NAME READY STATUS RESTARTS AGE quay-operator.v3.6.1-675f6f4758-x54bq 1/1 Running 0 49m quay361-clair-app-6d7444b7dc-bhjjm 0/1 CrashLoopBackOff 6 29m quay361-clair-app-6d7444b7dc-gbpjc 0/1 CrashLoopBackOff 6 29m quay361-clair-postgres-55c8fddbd6-ddd4n 1/1 Running 1 30m quay361-quay-app-66895ddcdf-2j5vt 1/1 Running 1 29m quay361-quay-app-66895ddcdf-zh5j5 1/1 Running 2 29m quay361-quay-app-upgrade-rsl9p 0/1 Completed 0 29m quay361-quay-config-editor-7f5cdd6645-cfz5x 1/1 Running 0 29m quay361-quay-database-566c45dfc6-vk4nl 1/1 Running 0 30m quay361-quay-mirror-6b99cf4fcb-h8h9g 1/1 Running 0 29m quay361-quay-mirror-6b99cf4fcb-x7kcr 1/1 Running 0 29m quay361-quay-postgres-init-wgwxh 0/1 Completed 0 29m quay361-quay-redis-557ddddb48-l8gwx 1/1 Running 0 30m oc get pod quay361-clair-app-6d7444b7dc-gbpjc -o json | jq '.spec.containers[0].image' "registry.redhat.io/quay/clair-rhel8@sha256:1984d6b85981f75dbf4eda5744738fffe05ecb09c3b1f31dc0e321bdb8fa061a"
Clair POD logs:
{"level":"info","component":"pkg/ovalutil/Fetcher.Fetch","updater":"RHEL7-satellite-tools-6.5","database":"https://access.redhat.com/security/data/oval/v2/RHEL7/satellite-tools-6.5.oval.xml.bz2","time":"2021-11-04T06:11:59Z","message":"starting fetch"} {"level":"info","component":"rpm/Scanner.Scan","kind":"package","layer":"sha256:f18b2939e762ebded8483d41b0af475dcb865bc2f7eb440c9b9404f646a68328","manifest":"sha256:deb45f1b9b5423d88166149ae88b385ac2a5b2f0b609e5935afe141f0b7ba628","scanner":"rpm","state":"ScanLayers","version":"4","file":332,"dir":308,"dir(out of order)":158,"symlink":20,"link":149,"whiteout":37,"time":"2021-11-04T06:11:59Z","message":"extracted layer"} panic: runtime error: slice bounds out of range [-1:]goroutine 3289 [running]: golang.org/x/text/transform.(*link).src(...) /remote-source/app/vendor/golang.org/x/text/transform/transform.go:370 golang.org/x/text/transform.(*chain).Transform(0xc00050ac60, 0xc00058ae00, 0x100, 0x100, 0xc00058ad80, 0x0, 0x80, 0x1, 0x0, 0x0, ...) /remote-source/app/vendor/golang.org/x/text/transform/transform.go:422 +0x878 golang.org/x/text/transform.String(0x1135fe8, 0xc00050ac60, 0xc000cf1a2b, 0xe, 0xc00050ac60, 0xb, 0xb, 0x0, 0x0) /remote-source/app/vendor/golang.org/x/text/transform/transform.go:652 +0x5cf github.com/quay/claircore/rhel/dockerfile.(*labelParser).Run(0xc00050a240, 0x1127d20, 0xc000ccbc80) /remote-source/app/vendor/github.com/quay/claircore/rhel/dockerfile/dockerfile.go:135 +0x2ad github.com/quay/claircore/rhel/dockerfile.GetLabels(0x1141230, 0xc000c34360, 0x1127d20, 0xc000ccbc80, 0x0, 0x0, 0x0) /remote-source/app/vendor/github.com/quay/claircore/rhel/dockerfile/dockerfile.go:26 +0x93 github.com/quay/claircore/rhel.extractBuildNVR(0x1141230, 0xc000c34360, 0xc00100e980, 0x34, 0xc000ccbc80, 0x0, 0x0, 0x0, 0x0, 0xc000c34370, ...) /remote-source/app/vendor/github.com/quay/claircore/rhel/repositoryscanner.go:315 +0x66 github.com/quay/claircore/rhel.(*RepositoryScanner).getCPEsUsingContainerAPI(0xc00070b860, 0x1141230, 0xc000c34360, 0xc00070b7a0, 0xc000c34360, 0xc000f173a0, 0x0, 0x0, 0x0) /remote-source/app/vendor/github.com/quay/claircore/rhel/repositoryscanner.go:248 +0x14f github.com/quay/claircore/rhel.(*RepositoryScanner).Scan(0xc00070b860, 0x1141268, 0xc000cca060, 0xc00070b7a0, 0x0, 0x0, 0x0, 0x0, 0x0) /remote-source/app/vendor/github.com/quay/claircore/rhel/repositoryscanner.go:187 +0xafb github.com/quay/claircore/internal/indexer/layerscanner.(*result).Do(0xc000473e58, 0x1141268, 0xc0007b02a0, 0x7f0568257108, 0xc00070b860, 0xc00070b7a0, 0x20, 0x20) /remote-source/app/vendor/github.com/quay/claircore/internal/indexer/layerscanner/layerscanner.go:241 +0x299 github.com/quay/claircore/internal/indexer/layerscanner.(*layerScanner).scanLayer(0xc00091e840, 0x11411c0, 0xc0007b02a0, 0xc00070b7a0, 0x7f0568257108, 0xc00070b860, 0x0, 0x0) /remote-source/app/vendor/github.com/quay/claircore/internal/indexer/layerscanner/layerscanner.go:212 +0x85c github.com/quay/claircore/internal/indexer/layerscanner.(*layerScanner).Scan.func1.1(0x0, 0x0) /remote-source/app/vendor/github.com/quay/claircore/internal/indexer/layerscanner/layerscanner.go:173 +0x147 golang.org/x/sync/errgroup.(*Group).Go.func1(0xc00057ff50, 0xc000ca1340) /remote-source/app/vendor/golang.org/x/sync/errgroup/errgroup.go:57 +0x59 created by golang.org/x/sync/errgroup.(*Group).Go /remote-source/app/vendor/golang.org/x/sync/errgroup/errgroup.go:54 +0x66