-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
False
-
Quay Enterprise
-
Undefined
-
I encountered a weird bug when running Clair v4. It crashed in the middle of scanning an image with the following trace:
{"level":"debug","component":"init/NewHttpTransport","component":"libindex/Libindex.Index","manifest":"sha256:bdded901debc402b5e5b85bfd3476cc9feda213b846abb2d3ca91d6d91acb34f","component":"libindex/Libindex.index","component":"internal/indexer/controller/Controller.Index","manifest":"sha256:bdded901debc402b5e5b85bfd3476cc9feda213b846abb2d3ca91d6d91acb34f","state":"CheckManifest","component":"internal/indexer/layerscannner/layerScanner.Scan","manifest":"sha256:bdded901debc402b5e5b85bfd3476cc9feda213b846abb2d3ca91d6d91acb34f","component":"internal/indexer/layerscannner/layerScanner.scan","scanner":"rhel-repository-scanner","kind":"repository","layer":"sha256:c4d668e229cd131e0a8e4f8218dca628d9cf9697572875e355fe4b247b6aa9f0","time":"2021-02-12T09:54:05Z","time":"2021-02-12T09:54:05Z","message":"scan done"} panic: interface conversion: interface {} is nil, not *repo2cpe.MappingFile goroutine 1094 [running]: github.com/quay/claircore/rhel/repo2cpe.(*LocalUpdaterJob).Get(0xc000394a40, 0xfdc340, 0xc000952420, 0xc00374e880, 0x2, 0x4, 0x0, 0xc000a50400, 0x1, 0xc000784360, ...) /remote-source/app/vendor/github.com/quay/claircore/rhel/repo2cpe/updater.go:52 +0x6b2 github.com/quay/claircore/rhel/repo2cpe.(*RepoCPEMapping).RepositoryToCPE(...) /remote-source/app/vendor/github.com/quay/claircore/rhel/repo2cpe/repositorycpe.go:20 github.com/quay/claircore/rhel.(*RepositoryScanner).getCPEsUsingEmbeddedContentSets(0xc000452980, 0xfdc340, 0xc000952420, 0xc000784300, 0xc00dbbaae0, 0xc0049c5c00, 0x355, 0x400, 0xc00020de00, 0x2) /remote-source/app/vendor/github.com/quay/claircore/rhel/repositoryscanner.go:199 +0x2b5 github.com/quay/claircore/rhel.(*RepositoryScanner).Scan(0xc000452980, 0xfdc340, 0xc000952420, 0xc00dbbaae0, 0x0, 0x0, 0x0, 0x0, 0x0) /remote-source/app/vendor/github.com/quay/claircore/rhel/repositoryscanner.go:146 +0x65e github.com/quay/claircore/internal/indexer/layerscanner.(*result).Do(0xc0008a9bf0, 0xfdc340, 0xc002252180, 0x7fb08efc2c20, 0xc000452980, 0xc00dbbaae0, 0x20, 0x20) /remote-source/app/vendor/github.com/quay/claircore/internal/indexer/layerscanner/layerscanner.go:244 +0x1fa github.com/quay/claircore/internal/indexer/layerscanner.(*layerScanner).scanLayer(0xc00dbbac60, 0xfdc340, 0xc002252180, 0xc00dbbaae0, 0x7fb08efc2c20, 0xc000452980, 0x0, 0x0) /remote-source/app/vendor/github.com/quay/claircore/internal/indexer/layerscanner/layerscanner.go:215 +0x8a9 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:174 +0x145 golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0003b61b0, 0xc002531a00) /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
After restart of Clair v4, scanning was completed successfully and I didn't encouter this bug anymore.