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

sealer panic when building cluster image #1692

Closed
zhabinecho opened this issue Sep 7, 2022 · 3 comments · Fixed by #1732
Closed

sealer panic when building cluster image #1692

zhabinecho opened this issue Sep 7, 2022 · 3 comments · Fixed by #1732
Labels
help wanted Extra attention is needed kind/bug Something isn't working

Comments

@zhabinecho
Copy link

What happen?

No response

Relevant log output?

Pulling image: docker.io/bitnami/mysql:8.0.29-debian-10-r23
Pulling image: docker.io/bitnami/bitnami-shell :10-debian-10-r431
Pulling image: docker.io/bitnami/mysqld-exporter:0.14.0-debian-10-r75
Pulling image: docker.io/bitnami/redis:6.2.7-debian-10-r23
Pulling image: docker.io/bitnami/redis-sentinel :6.2.7-debian-10-r23
Pulling image: docker.io/bitnami/redis-exporter: 1.37.0-debian-10-r63
Pulling image: docker.io/bitnami/bitnami-shell: 10-debian-10-r432
8904a6c7c467: Download complete
e6a50b627bcb: Download complete
dbb9bc619c4f: Download complete
213ec9aee27d: Download complete
c672fbd02587: Download complete
2232dadbeacf: Download complete
6a2a8eddaea3: Download complete
76762d319f3: Download complete
ef053557858e: Download complete
92c6c9bd0d84: Downloading [====>]200.5MB/204.5MB
e992a8800eca: Download complete
133767f7d45f: Download complete
c3461af354fa: Download complete
5ee56c8db25f: Download complete
db26075ba035: Download complete
panic: runtime error: slice bounds out of range [:19] with length 0
goroutine 274 [running] :
github.com/sealerio/sealer/pkg/image/save.(*DefaultImageSaver).saveBlobs.funcZ()
/Users/huaiyou.cyz/go/src/github.com/VinceCui/sealer/pkg/image/save/save.go:311+0xb76
golang.org/x/sync/errgroup.(*Group).Go. func1()
/Users/huaiyou.cyz/go/src/github.com/VinceCui/sealer/vendor/golang.org/x/sync/errgroup/errgroup.go:57+0x67
created by golang.org/x/sync/errgroup.(*Group).Go
/Users/huaiyou.cyz/go/src/github.com/VinceCui/sealer/vendor/golang.org/x/sync/errgroup/errgroup.go:54+0x92

What you expected to happen?

build success

How to reproduce it (as minimally and precisely as possible)?

No response

Anything else we need to know?

No response

What is the version of Sealer you using?

No response

What is your OS environment?

No response

What is the Kernel version?

No response

Other environment you want to tell us?

  • Cloud provider or hardware configuration:
  • Install tools:
  • Others:
@zhabinecho zhabinecho added the kind/bug Something isn't working label Sep 7, 2022
@justadogistaken
Copy link
Member

	for _, blob := range blobLists {
		tmpBlob := blob
		numCh <- struct{}{}
		eg.Go(func() error {
			defer func() {
				<-numCh
			}()

			simpleDgst := string(tmpBlob)[7:19]

			_, err = blobStore.Stat(is.ctx, tmpBlob)

problem in at simpleDgst := string(tmpBlob)[7:19].
Could you help to fix this bug? check the length of tmpBlob can solve this problem.

@justadogistaken justadogistaken added the help wanted Extra attention is needed label Sep 8, 2022
@YTGhost
Copy link
Member

YTGhost commented Sep 22, 2022

@justadogistaken Why length of string(tmpBlob) is 0, I think we need to find out the reason for this instead of just checking the length?

@justadogistaken
Copy link
Member

@YTGhost
For this case, the empty digest returned by distribution(registry). It may be related to some problems of manifest.
What we can do here:
(1) Check the string length. I think it's natual when we do string[x:y].
(2) Or we make sure the list does not contain empty one. (checking in getBlobList)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants