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

[3.4] panic: runtime error: index out of range [0] with length 0 [recovered] #14259

Closed
ahrtr opened this issue Jul 22, 2022 · 8 comments
Closed

Comments

@ahrtr
Copy link
Member

ahrtr commented Jul 22, 2022

The issue was found in 3.4 pipeline.

--- FAIL: TestWatchReconnRequest (1.12s)
panic: runtime error: index out of range [0] with length 0 [recovered]
	panic: runtime error: index out of range [0] with length 0
goroutine 68799 [running]:
testing.tRunner.func1.2(0xef8e00, 0xc000a222a0)
	/opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1153 +0x332
testing.tRunner.func1(0xc0005dc780)
	/opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1156 +0x4b6
panic(0xef8e00, 0xc000a222a0)
	/opt/hostedtoolcache/go/1.16.15/x64/src/runtime/panic.go:965 +0x1b9
go.etcd.io/etcd/clientv3/integration.putAndWatch(0xc0005dc780, 0xc0002864c0, 0x10a3890, 0x1, 0x10a3890, 0x1)
	/home/runner/work/etcd/etcd/clientv3/integration/watch_test.go:341 +0x40c
go.etcd.io/etcd/clientv3/integration.testWatchReconnRequest(0xc0005dc780, 0xc0002864c0)
	/home/runner/work/etcd/etcd/clientv3/integration/watch_test.go:220 +0x290
go.etcd.io/etcd/clientv3/integration.runWatchTest(0xc0005dc780, 0xfc87b0)
	/home/runner/work/etcd/etcd/clientv3/integration/watch_test.go:64 +0x24f
go.etcd.io/etcd/clientv3/integration.TestWatchReconnRequest(0xc0005dc780)
	/home/runner/work/etcd/etcd/clientv3/integration/watch_test.go:181 +0x37
testing.tRunner(0xc0005dc780, 0xfc86d8)
	/opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1203 +0xe5
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1248 +0x2b3
FAIL	go.etcd.io/etcd/clientv3/integration	260.996s
FAIL
Error: Process completed with exit code 1.

Refer to https://github.com/etcd-io/etcd/runs/7462977558?check_suite_focus=true

@zhangzerui20
Copy link

Can I try my hand at this?

@ahrtr
Copy link
Member Author

ahrtr commented Jul 22, 2022

Can I try my hand at this?

Any help is appreciated!

@ahrtr
Copy link
Member Author

ahrtr commented Jul 26, 2022

@zhangzerui20 any update on this issue?

tjungblu added a commit to tjungblu/etcd that referenced this issue Jul 29, 2022
The test should fail early on an insufficient cluster instead of
panicking during the test.

Fixes issue etcd-io#14259.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
@tjungblu
Copy link
Contributor

Sorry to jump this one, maybe @zhangzerui20 actually has a real fix in store.

I couldn't really reproduce this on my box and I figured the members are not changed anywhere on the execution path (or any other races for that matter). My assumption is that the integration cluster didn't create enough members to begin with, so I added an assertion before running the test. #14285

@zhangzerui20
Copy link

@zhangzerui20 any update on this issue?

Not yet, I'm trying to reproduce this issue.

@halegreen
Copy link
Contributor

halegreen commented Oct 15, 2022

Can I try this issue too? Is this error happend on release-3.4 branch?

halegreen added a commit to halegreen/etcd that referenced this issue Oct 15, 2022
Fixes issue: etcd-io#14259

Signed-off-by: Wang Xiaoxiao 1141195807@qq.com
@halegreen
Copy link
Contributor

Not reproduce this error on my local dev env either.
Going deep to find why the test fails in 3.4 pipeline , may need more context infos, like the git branch, running on 3.4 pipeline which leads to this error.

While I guess for now we can check the watch response error not nil to avoid test runtime panic , #14591

@ahrtr ahrtr assigned halegreen and unassigned zhangzerui20 Oct 15, 2022
halegreen added a commit to halegreen/etcd that referenced this issue Oct 16, 2022
Fixes issue: etcd-io#14259

Signed-off-by: 王霄霄 <1141195807@qq.com>
@ahrtr
Copy link
Member Author

ahrtr commented Oct 16, 2022

Resolved in #14594

@ahrtr ahrtr closed this as completed Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants