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

test suite requires deprecated GODEBUG=tls13=0 to pass #5533

Closed
morgo opened this issue Dec 8, 2019 · 2 comments · Fixed by #6185
Closed

test suite requires deprecated GODEBUG=tls13=0 to pass #5533

morgo opened this issue Dec 8, 2019 · 2 comments · Fixed by #6185

Comments

@morgo
Copy link
Contributor

morgo commented Dec 8, 2019

This unit test fails consistently when using go 1.13. As we will plan to upgrade to go 1.13 in the future, we should no doubt fix it:

The unit test currently has a workaround set in the Makefile, of export GODEBUG=tls13=0. This is require for the unit tests to not produce the following error. According to the go docs, this workaround will be removed in go 1.14.

ok  	vitess.io/vitess/go/memcache	0.002s
E1208 20:51:09.808962    6454 server.go:320] Cannot read post-SSL client handshake response from client 1 ([::1]:36288): tls: client didn't provide a certificate
io.ReadFull(header size) failed
W1208 20:51:09.809726    6454 auth_server_static.go:195] Config parsed using legacy configuration. Please update to the latest format: {"user":[{"Password": "xxx"}, ...]}
W1208 20:51:10.991662    6454 server.go:363] Error authenticating user using MySQL native password: Access denied for user 'user1' (errno 1045) (sqlstate 28000)
W1208 20:51:10.992049    6454 server.go:363] Error authenticating user using MySQL native password: Access denied for user 'user1' (errno 1045) (sqlstate 28000)
W1208 20:51:11.005966    6454 server.go:451] Slow connection from client 1 (127.0.0.1:41664): 446.373µs
E1208 20:51:11.014685    6454 server.go:273] mysql_server caught panic:
test panic attack!
/home/morgo/vitess/go/mysql/server_test.go:93 (0x8a5e97)
	io/vitess/go/mysql.(*testHandler).ComQuery: panic("test panic attack!")
/home/morgo/vitess/go/mysql/conn.go:1070 (0x8465f7)
	io/vitess/go/mysql.(*Conn).execQuery: err := handler.ComQuery(c, query, func(qr *sqltypes.Result) error {
/home/morgo/vitess/go/mysql/conn.go:771 (0x845e6d)
	io/vitess/go/mysql.(*Conn).handleNextCommand: if err := c.execQuery(sql, handler, more); err != nil {
/home/morgo/vitess/go/mysql/server.go:458 (0x863dfd)
	io/vitess/go/mysql.(*Listener).handle: err := c.handleNextCommand(l.handler)
/usr/local/go/src/runtime/asm_amd64.s:1357 (0x460c00)
	goexit: BYTE	$0x90	// NOP
E1208 20:51:11.034205    6454 conn.go:1117] Error in the middle of a stream to client 5 (127.0.0.1:41672): forced error after send (errno 1047) (sqlstate 08S01)
W1208 20:51:11.063186    6454 server.go:395] Error authenticating user using MySQL native password: Access denied for user 'user1' (errno 1045) (sqlstate 28000)
W1208 20:51:11.068802    6454 server.go:395] Error authenticating user using MySQL native password: Access denied for user 'user2' (errno 1045) (sqlstate 28000)
--- FAIL: TestTLSServer (0.23s)
    server_test.go:1043: No count found for version TLS12
FAIL
FAIL	vitess.io/vitess/go/mysql	2.349s
ok  	vitess.io/vitess/go/mysql/ldapauthserver	0.003s
@morgo morgo added the Type: Bug label Dec 8, 2019
@enisoc
Copy link
Member

enisoc commented Dec 9, 2019

The part of the log that tells the actual error is:

--- FAIL: TestTLSServer (0.23s)
    server_test.go:1043: No count found for version TLS12

It might be as simple as the fact that Go 1.13 changes the default TLS version to 1.3:

https://golang.org/doc/go1.13#tls_1_3

So we probably just need to change the test to accept either 1.2 or 1.3, to maintain compatibility with older Go versions.

@morgo
Copy link
Contributor Author

morgo commented Dec 9, 2019

I can confirm that setting export GODEBUG=tls13=0 made the test pass. I have some other changes to the Makefile in #5527 ; so I will add a line in here for disabling tls13. But I will leave this issue open, as this option is to be removed in go 1.14.

@morgo morgo changed the title failing unit test: go/mysql with go 1.13 test suite requires deprecated GODEBUG=tls13=0 to pass Dec 9, 2019
systay pushed a commit that referenced this issue Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants