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

Upgrade to Go 1.14 #3760

Closed
palourde opened this issue May 15, 2020 · 4 comments
Closed

Upgrade to Go 1.14 #3760

palourde opened this issue May 15, 2020 · 4 comments
Labels
build component:ci Sensu Go build, test, and CI pipeline improvements component:etcd

Comments

@palourde
Copy link
Contributor

It will probably require us to upgrade bolt to v1.3.4 (currently on v1.3.3).

It needs to be done on both OSS & enterprise.

@palourde palourde added the build label May 15, 2020
@nikkictl nikkictl self-assigned this May 18, 2020
@nikkictl
Copy link

nikkictl commented May 18, 2020

In addition to upgrading bolt to v1.3.4, I believe upgrading Go to 1.14 will also require updating etcd to v3.5 well.

Etcd v3.3 has a dependency on bolt v1.3.3, causing an indirect dependency in sensu:

github.com/coreos/bbolt v1.3.3 // indirect

The indirect dependency still triggers the bug (fixed by etcd-io/bbolt#201) in many of our tests:

fatal error: checkptr: unsafe pointer conversion

goroutine 56 [running]:
runtime.throw(0x22c2529, 0x23)
	/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc000137b30 sp=0xc000137b00 pc=0x1076ba2
runtime.checkptrAlignment(0xc000330470, 0x21f62c0, 0x1)
	/usr/local/go/src/runtime/checkptr.go:20 +0xc9 fp=0xc000137b60 sp=0xc000137b30 pc=0x1048719
github.com/coreos/bbolt.(*Bucket).write(0xc000137cd8, 0x0, 0x0, 0x0)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/bbolt@v1.3.3/bucket.go:624 +0x15c fp=0xc000137bc8 sp=0xc000137b60 pc=0x1cefeec
github.com/coreos/bbolt.(*Bucket).CreateBucket(0xc00037e018, 0x2d539d0, 0x7, 0x7, 0x1009fe0, 0x3ea0008, 0xc000317200)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/bbolt@v1.3.3/bucket.go:181 +0x465 fp=0xc000137d88 sp=0xc000137bc8 pc=0x1cec335
github.com/coreos/bbolt.(*Tx).CreateBucket(...)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/bbolt@v1.3.3/tx.go:108
github.com/coreos/etcd/mvcc/backend.(*batchTx).UnsafeCreateBucket(0xc000317200, 0x2d539d0, 0x7, 0x7)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/mvcc/backend/batch_tx.go:48 +0x99 fp=0xc000137e18 sp=0xc000137d88 pc=0x1d55399
github.com/coreos/etcd/mvcc/backend.(*batchTxBuffered).UnsafeCreateBucket(0xc000317200, 0x2d539d0, 0x7, 0x7)
	<autogenerated>:1 +0x62 fp=0xc000137e48 sp=0xc000137e18 pc=0x1d5d0d2
github.com/coreos/etcd/etcdserver/membership.mustCreateBackendBuckets(0x24cdf20, 0xc0003641c0)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/etcdserver/membership/store.go:166 +0x109 fp=0xc000137ee0 sp=0xc000137e48 pc=0x1dc6179
github.com/coreos/etcd/etcdserver/membership.(*RaftCluster).SetBackend(...)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/etcdserver/membership/cluster.go:204
github.com/coreos/etcd/etcdserver.NewServer(0x22a53fb, 0x7, 0x0, 0x0, 0x0, 0x0, 0xc0000a0300, 0x1, 0x1, 0xc0000a0500, ...)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/etcdserver/server.go:363 +0x42bf fp=0xc000138b70 sp=0xc000137ee0 pc=0x1e6735f
github.com/coreos/etcd/embed.StartEtcd(0xc000074c00, 0xc0000ba900, 0x0, 0x0)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/embed/etcd.go:179 +0xd97 fp=0xc0001398b8 sp=0xc000138b70 pc=0x1ff5ce7
github.com/sensu/sensu-go/backend/etcd.NewEtcd(0xc0000b4f00, 0xc00007ec70, 0x22a3756, 0x5)
	/Users/nikkictl/go/src/github.com/sensu/sensu-go/backend/etcd/etcd.go:224 +0x1200 fp=0xc000139cb0 sp=0xc0001398b8 pc=0x20072a0
github.com/sensu/sensu-go/backend/store/etcd/testutil.NewStoreInstance(0x2dbfc18, 0xc000072630, 0xc0fd3bb3d7)
	/Users/nikkictl/go/src/github.com/sensu/sensu-go/backend/store/etcd/testutil/store.go:52 +0x489 fp=0xc000139de8 sp=0xc000139cb0 pc=0x203da29
github.com/sensu/sensu-go/backend/seeds.TestSeedInitialData(0xc0000b0d80)
	/Users/nikkictl/go/src/github.com/sensu/sensu-go/backend/seeds/seeds_test.go:15 +0x65 fp=0xc000139ed0 sp=0xc000139de8 pc=0x204d9b5
testing.tRunner(0xc0000b0d80, 0x22efa58)
	/usr/local/go/src/testing/testing.go:991 +0x1ec fp=0xc000139fd0 sp=0xc000139ed0 pc=0x11c871c
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc000139fd8 sp=0xc000139fd0 pc=0x10aa811
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1042 +0x661

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0000b0c60, 0x22af6af, 0x13, 0x22efa58, 0x0)
	/usr/local/go/src/testing/testing.go:1043 +0x699
testing.runTests.func1(0xc0000b0c60)
	/usr/local/go/src/testing/testing.go:1284 +0xa7
testing.tRunner(0xc0000b0c60, 0xc000145d50)
	/usr/local/go/src/testing/testing.go:991 +0x1ec
testing.runTests(0xc0000ca180, 0x2dadc30, 0x1, 0x1, 0x0)
	/usr/local/go/src/testing/testing.go:1282 +0x528
testing.(*M).Run(0xc0000a0180, 0x0)
	/usr/local/go/src/testing/testing.go:1199 +0x300
main.main()
	_testmain.go:44 +0x224

goroutine 52 [chan receive]:
github.com/coreos/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc00000fe40)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/pkg/logutil/merge_logger.go:173 +0x4b2
created by github.com/coreos/etcd/pkg/logutil.NewMergeLogger
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/pkg/logutil/merge_logger.go:91 +0xfc

goroutine 103 [chan receive]:
github.com/coreos/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc000306e40)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/pkg/logutil/merge_logger.go:173 +0x4b2
created by github.com/coreos/etcd/pkg/logutil.NewMergeLogger
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/pkg/logutil/merge_logger.go:91 +0xfc

goroutine 105 [chan receive]:
github.com/coreos/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc000306fa0)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/pkg/logutil/merge_logger.go:173 +0x4b2
created by github.com/coreos/etcd/pkg/logutil.NewMergeLogger
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/pkg/logutil/merge_logger.go:91 +0xfc

goroutine 111 [select]:
github.com/coreos/etcd/mvcc/backend.(*backend).run(0xc0003641c0)
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/mvcc/backend/backend.go:267 +0x262
created by github.com/coreos/etcd/mvcc/backend.newBackend
	/Users/nikkictl/go/pkg/mod/github.com/coreos/etcd@v3.3.20+incompatible/mvcc/backend/backend.go:161 +0x43d
FAIL	github.com/sensu/sensu-go/backend/seeds	0.394s

Unfortunately, as detailed in #3729, updating etcd now that they have changed the import path and broke their go module, is not quite straightforward. v3.4 still has the bolt dependency on v1.3.3 so it is not a valid candidate for us to update to.

tl;dr: Due to etcd-io/etcd#11154 and etcd-io/etcd@3ffb3ae, we must wait for etcd v3.5 before updating Go to 1.14.

@nikkictl
Copy link

Requires #3729
Blocked by etcd-io/etcd#11154 (etcd v3.5)

@nikkictl nikkictl mentioned this issue May 18, 2020
4 tasks
@nikkictl nikkictl removed their assignment May 18, 2020
@calebhailey calebhailey added the component:ci Sensu Go build, test, and CI pipeline improvements label Jun 8, 2020
@nikkictl
Copy link

We're using the following workaround for 6.0 so that we can upgrade Go, etcd, and bolt: etcd-io/etcd#11154 (comment)

@calebhailey calebhailey added this to the 6.4.0 milestone Feb 8, 2021
@portertech
Copy link
Contributor

Closing in favour of #4059

@portertech portertech removed this from the 6.4.0 milestone Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build component:ci Sensu Go build, test, and CI pipeline improvements component:etcd
Projects
None yet
Development

No branches or pull requests

4 participants