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 golang/sys for go 1.17 #4543

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

yycptt
Copy link
Contributor

@yycptt yycptt commented Oct 5, 2021

What changed?

  • Upgrade golang/sys to latest
  • Changed is done by running
go get golang.org/x/sys
go mod tidy

Why?

  • Encountered following error when running integration test with golang 1.17
➜ cadence (update-golang-sys) ✗ go version
go version go1.17.1 darwin/amd64
➜ cadence (update-golang-sys) ✗ go test -v ./host -run TestIntegrationSuite -testify.m TestStartWorkflowExecution
=== RUN   TestIntegrationSuite
2021-10-05T16:24:51.989-0700    INFO    loggerimpl/logger.go:119        Running integration test against test cluster   {"logging-call-at": "integrationbase.go:105"}
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff204efc9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204efc9e
stack: frame={sp:0x70000cc2ee58, fp:0x70000cc2eea8} stack=[0x70000cbaf338,0x70000cc2ef38)
0x000070000cc2ed58:  0x010070000cc2ed78  0x0000000000000004 
0x000070000cc2ed68:  0x000000000000001f  0x00007fff204efc9e 
0x000070000cc2ed78:  0x0b01dfacedebac1e  0x0000000000000001 
0x000070000cc2ed88:  0x00000000040374f1 <runtime.throw+0x0000000000000071>  0x000070000cc2ee28 
0x000070000cc2ed98:  0x0000000006550cef  0x000070000cc2ede0 
0x000070000cc2eda8:  0x00000000040377a8 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000c0006821a0 
0x000070000cc2edb8:  0x0000000000000001  0x0000000000000001 
0x000070000cc2edc8:  0x000070000cc2ee28  0x00000000040374f1 <runtime.throw+0x0000000000000071> 
0x000070000cc2edd8:  0x000000c0006821a0  0x000070000cc2ee18 
0x000070000cc2ede8:  0x0000000004037730 <runtime.fatalthrow+0x0000000000000050>  0x000070000cc2edf8 
0x000070000cc2edf8:  0x0000000004037760 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000c0006821a0 
0x000070000cc2ee08:  0x00000000040374f1 <runtime.throw+0x0000000000000071>  0x000070000cc2ee28 
0x000070000cc2ee18:  0x000070000cc2ee48  0x00000000040374f1 <runtime.throw+0x0000000000000071> 
0x000070000cc2ee28:  0x000070000cc2ee30  0x0000000004037520 <runtime.throw.func1+0x0000000000000000> 
0x000070000cc2ee38:  0x0000000006575a1b  0x000000000000002a 
0x000070000cc2ee48:  0x000070000cc2ee98  0x000000000404db16 <runtime.sigpanic+0x0000000000000396> 
0x000070000cc2ee58: <0x0000000006575a1b  0x00000000040403be <runtime.checkTimers+0x000000000000005e> 
0x000070000cc2ee68:  0x000070000cc2eed8  0x00000000040283c6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x000070000cc2ee78:  0x000000c000b10000  0x0000000000002000 
0x000070000cc2ee88:  0x000000c000000008  0x0000000200000001 
0x000070000cc2ee98:  0x000070000cc2eee0 !0x00007fff204efc9e 
0x000070000cc2eea8: >0x000070000cc2eee0  0x0000000007ef0000 
0x000070000cc2eeb8:  0x0000000000000500  0x000000000445bae5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x000070000cc2eec8:  0x000000000406cedf <runtime.syscall+0x000000000000001f>  0x000000c000a963a0 
0x000070000cc2eed8:  0x000000000406c84c <runtime.nanotime_trampoline+0x000000000000000c>  0x000000c000a96370 
0x000070000cc2eee8:  0x000000000406ad30 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x000070000cc2eef8:  0x000000c000421200  0x1200000400000002 
0x000070000cc2ef08:  0x000000c0006821a0  0x000000c000425ba0 
0x000070000cc2ef18:  0x0000000000001cb8  0x000000c0000d5520 
0x000070000cc2ef28:  0x0000000004068e49 <runtime.systemstack+0x0000000000000049>  0x000070000cc2ef50 
runtime.throw({0x6575a1b, 0x40403be})
        /usr/local/Cellar/go/1.17.1/libexec/src/runtime/panic.go:1198 +0x71
...............

How did you test it?

  • Tested using existing integration tests.

Potential risks

Release notes

Documentation Changes

@yycptt yycptt requested a review from a team October 5, 2021 23:34
Copy link
Member

@Groxx Groxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that looks pretty straightforward to me.

Does this still work with go 1.13 (through 1.16), or should we be increasing our minimum go version as well?

@yycptt
Copy link
Contributor Author

yycptt commented Oct 5, 2021

Yeah, that looks pretty straightforward to me.

Does this still work with go 1.13 (through 1.16), or should we be increasing our minimum go version as well?

Yeah I think it still works for 1.13-1.16. For 1.13, our tests on buildkite are using that version and they've passed.
For 1.16, I tried it locally and it works, here the output

➜ cadence (update-golang-sys) ✔ go version
go version go1.16.8 darwin/amd64
➜ cadence (update-golang-sys) ✔ go test -v ./host -run TestIntegrationSuite -testify.m TestStartWorkflowExecution
=== RUN   TestIntegrationSuite
2021-10-05T16:57:18.463-0700    INFO    loggerimpl/logger.go:119        Running integration test against test cluster   {"logging-call-at": "integrationbase.go:105"}
time="2021-10-05T16:57:18-07:00" level=info msg="dropped namespace" keyspace=test_ofoooffkok
2021/10/05 16:57:18 Starting schema setup, config=&{SchemaFilePath:/var/folders/9m/xl3rrl4d1gv7tqvnv0q3f4d40000gn/T/_cadence_744183310 InitialVersion: Overwrite:true DisableVersioning:true}
2021/10/05 16:57:18 Dropping following tables: []
2021/10/05 16:57:18 Dropping following types: []
2021/10/05 16:57:18 ----- Creating types and tables -----
.....................

@coveralls
Copy link

Pull Request Test Coverage Report for Build c8a13130-4dba-487c-9497-00a4b118e805

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 19 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.06%) to 56.466%

Files with Coverage Reduction New Missed Lines %
common/membership/rpServiceResolver.go 2 73.58%
common/task/parallelTaskProcessor.go 2 92.48%
common/types/mapper/thrift/shared.go 2 64.52%
service/history/queue/transfer_queue_processor.go 2 57.76%
service/matching/matcher.go 2 91.46%
service/history/queue/timer_queue_processor_base.go 4 78.6%
common/task/fifoTaskScheduler.go 5 82.47%
Totals Coverage Status
Change from base Build 03958339-4e11-439a-8c48-1be3cdc29f3b: 0.06%
Covered Lines: 80595
Relevant Lines: 142732

💛 - Coveralls

Copy link
Member

@Groxx Groxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yea, we use 1.13 in the buildkite images. Thanks for pointing that out :)

LGTM!

@yycptt yycptt merged commit c7e94f2 into cadence-workflow:master Oct 6, 2021
@yycptt yycptt deleted the update-golang-sys branch October 6, 2021 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants