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

SIGQUIT: quit in pkg/transport test #10267

Closed
sudeeshjohn opened this issue Nov 16, 2018 · 8 comments
Closed

SIGQUIT: quit in pkg/transport test #10267

sudeeshjohn opened this issue Nov 16, 2018 · 8 comments

Comments

@sudeeshjohn
Copy link
Contributor

root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport# go test -v -run .
=== RUN   TestNewKeepAliveListener
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-153257807/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-153257807/key.pem"}
--- PASS: TestNewKeepAliveListener (0.03s)
=== RUN   TestNewKeepAliveListenerTLSEmptyConfig
--- PASS: TestNewKeepAliveListenerTLSEmptyConfig (0.00s)
=== RUN   TestNewListenerTLSInfo
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-630622818/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-630622818/key.pem"}
--- PASS: TestNewListenerTLSInfo (0.10s)
=== RUN   TestNewListenerTLSEmptyInfo
--- PASS: TestNewListenerTLSEmptyInfo (0.00s)
=== RUN   TestNewTransportTLSInfo
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-287393881/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-287393881/key.pem"}
--- PASS: TestNewTransportTLSInfo (0.02s)
=== RUN   TestTLSInfoNonexist
--- PASS: TestTLSInfoNonexist (0.00s)
=== RUN   TestTLSInfoEmpty
--- PASS: TestTLSInfoEmpty (0.00s)
=== RUN   TestTLSInfoMissingFields
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-856247268/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-856247268/key.pem"}
--- PASS: TestTLSInfoMissingFields (0.02s)
=== RUN   TestTLSInfoParseFuncError
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-589700595/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-589700595/key.pem"}
--- PASS: TestTLSInfoParseFuncError (0.02s)
=== RUN   TestTLSInfoConfigFuncs
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-405469366/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-405469366/key.pem"}
--- PASS: TestTLSInfoConfigFuncs (0.02s)
=== RUN   TestNewListenerUnixSocket
--- PASS: TestNewListenerUnixSocket (0.00s)
=== RUN   TestNewListenerTLSInfoSelfCert
{"level":"info","msg":"created cert file","path":"/tmp/tlsdir123485853/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/tlsdir123485853/key.pem"}
--- PASS: TestNewListenerTLSInfoSelfCert (0.08s)
=== RUN   TestIsClosedConnError
--- PASS: TestIsClosedConnError (0.00s)
=== RUN   TestReadWriteTimeoutDialer
--- PASS: TestReadWriteTimeoutDialer (0.03s)
=== RUN   TestNewTimeoutListener
--- PASS: TestNewTimeoutListener (0.00s)
=== RUN   TestWriteReadTimeoutListener
--- PASS: TestWriteReadTimeoutListener (0.03s)
=== RUN   TestNewTimeoutTransport
--- PASS: TestNewTimeoutTransport (0.00s)
=== RUN   TestNewTransportTLSInvalidCipherSuites
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-262018904/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-262018904/key.pem"}
SIGQUIT: quit
PC=0x45d7a1 m=0 sigcode=0

goroutine 0 [idle]:
runtime.futex(0xa57388, 0x80, 0x0, 0x0, 0x0, 0xc000000000, 0x0, 0x0, 0x7ffc04479478, 0x40bf6f, ...)
	/go/src/golang/go/src/runtime/sys_linux_amd64.s:535 +0x21
runtime.futexsleep(0xa57388, 0x0, 0xffffffffffffffff)
	/go/src/golang/go/src/runtime/os_linux.go:46 +0x4b
runtime.notesleep(0xa57388)
	/go/src/golang/go/src/runtime/lock_futex.go:151 +0x9f
runtime.stopm()
	/go/src/golang/go/src/runtime/proc.go:1936 +0xa8
runtime.findrunnable(0xc000026f00, 0x0)
	/go/src/golang/go/src/runtime/proc.go:2399 +0x51a
runtime.schedule()
	/go/src/golang/go/src/runtime/proc.go:2525 +0x208
runtime.park_m(0xc000100900)
	/go/src/golang/go/src/runtime/proc.go:2605 +0x9c
runtime.mcall(0x0)
	/go/src/golang/go/src/runtime/asm_amd64.s:299 +0x5b

goroutine 1 [chan receive, 9 minutes]:
testing.(*T).Run(0xc0000aa100, 0x7aa961, 0x26, 0x7b6518, 0x476a01)
	/go/src/golang/go/src/testing/testing.go:902 +0x374
testing.runTests.func1(0xc0000e8000)
	/go/src/golang/go/src/testing/testing.go:1142 +0x78
testing.tRunner(0xc0000e8000, 0xc00008be30)
	/go/src/golang/go/src/testing/testing.go:850 +0xbf
testing.runTests(0xc00000e380, 0xa50ec0, 0x12, 0x12, 0x0)
	/go/src/golang/go/src/testing/testing.go:1140 +0x2a7
testing.(*M).Run(0xc0000d8000, 0x0)
	/go/src/golang/go/src/testing/testing.go:1057 +0x160
main.main()
	_testmain.go:76 +0x13d

goroutine 87 [chan receive, 9 minutes]:
go.etcd.io/etcd/pkg/transport.TestNewTransportTLSInvalidCipherSuites(0xc0000aa100)
	/go/src/go.etcd.io/etcd/pkg/transport/transport_test.go:72 +0x3f1
testing.tRunner(0xc0000aa100, 0x7b6518)
	/go/src/golang/go/src/testing/testing.go:850 +0xbf
created by testing.(*T).Run
	/go/src/golang/go/src/testing/testing.go:901 +0x34d

goroutine 78 [IO wait, 9 minutes]:
internal/poll.runtime_pollWait(0x7f127f62feb8, 0x72, 0x0)
	/go/src/golang/go/src/runtime/netpoll.go:182 +0x55
internal/poll.(*pollDesc).wait(0xc0000d8098, 0x72, 0x0, 0x0, 0x79eead)
	/go/src/golang/go/src/internal/poll/fd_poll_runtime.go:87 +0x9a
internal/poll.(*pollDesc).waitRead(...)
	/go/src/golang/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc0000d8080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/golang/go/src/internal/poll/fd_unix.go:384 +0x1aa
net.(*netFD).accept(0xc0000d8080, 0x10, 0x10, 0x75ce00)
	/go/src/golang/go/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc0002f4018, 0x75ce00, 0xc00017a008, 0xc0000fe700)
	/go/src/golang/go/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0002f4018, 0xc000176f00, 0xc000176f30, 0x40db88, 0x10)
	/go/src/golang/go/src/net/tcpsock.go:260 +0x47
crypto/tls.(*listener).Accept(0xc00000f7e0, 0xc000048700, 0xc0000481f0, 0xc000472010, 0xc000472020)
	/go/src/golang/go/src/crypto/tls/tls.go:53 +0x37
go.etcd.io/etcd/pkg/transport.(*tlsListener).acceptLoop(0xc000144140)
	/go/src/go.etcd.io/etcd/pkg/transport/listener_tls.go:126 +0x20e
created by go.etcd.io/etcd/pkg/transport.newTLSListener
	/go/src/go.etcd.io/etcd/pkg/transport/listener_tls.go:84 +0x3ce

rax    0xca
rbx    0xa57240
rcx    0x45d7a3
rdx    0x0
rdi    0xa57388
rsi    0x80
rbp    0x7ffc04479440
rsp    0x7ffc044793f8
r8     0x0
r9     0x0
r10    0x0
r11    0x286
r12    0x55
r13    0xa25080
r14    0x0
r15    0x0
rip    0x45d7a1
rflags 0x286
cs     0x33
fs     0x0
gs     0x0
*** Test killed with quit: ran too long (10m0s).
exit status 2
FAIL	go.etcd.io/etcd/pkg/transport	600.009s
root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport#

root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport# go version
go version devel +14608976db Thu Nov 15 23:37:20 2018 +0000 linux/amd64
root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport#
@sudeeshjohn
Copy link
Contributor Author

env:

root@ubuntu18:/go/src/go.etcd.io/etcd/clientv3/integration# uname -a
Linux ubuntu18.04-icp-node-4 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu18:/go/src/go.etcd.io/etcd/clientv3/integration# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@ubuntu18:/go/src/go.etcd.io/etcd/clientv3/integration#

@xiang90
Copy link
Contributor

xiang90 commented Nov 16, 2018

it is due to *** Test killed with quit: ran too long (10m0s).

@sudeeshjohn
Copy link
Contributor Author

Agree, but his is not happening with go version 11.1

root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport# go test -v -run .
=== RUN   TestNewKeepAliveListener
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-270039428/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-270039428/key.pem"}
--- PASS: TestNewKeepAliveListener (0.03s)
=== RUN   TestNewKeepAliveListenerTLSEmptyConfig
--- PASS: TestNewKeepAliveListenerTLSEmptyConfig (0.00s)
=== RUN   TestNewListenerTLSInfo
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-093934867/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-093934867/key.pem"}
--- PASS: TestNewListenerTLSInfo (0.08s)
=== RUN   TestNewListenerTLSEmptyInfo
--- PASS: TestNewListenerTLSEmptyInfo (0.00s)
=== RUN   TestNewTransportTLSInfo
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-707021654/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-707021654/key.pem"}
--- PASS: TestNewTransportTLSInfo (0.02s)
=== RUN   TestTLSInfoNonexist
--- PASS: TestTLSInfoNonexist (0.00s)
=== RUN   TestTLSInfoEmpty
--- PASS: TestTLSInfoEmpty (0.00s)
=== RUN   TestTLSInfoMissingFields
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-207720125/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-207720125/key.pem"}
--- PASS: TestTLSInfoMissingFields (0.02s)
=== RUN   TestTLSInfoParseFuncError
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-897707256/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-897707256/key.pem"}
--- PASS: TestTLSInfoParseFuncError (0.02s)
=== RUN   TestTLSInfoConfigFuncs
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-076214775/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-076214775/key.pem"}
--- PASS: TestTLSInfoConfigFuncs (0.02s)
=== RUN   TestNewListenerUnixSocket
--- PASS: TestNewListenerUnixSocket (0.00s)
=== RUN   TestNewListenerTLSInfoSelfCert
{"level":"info","msg":"created cert file","path":"/tmp/tlsdir171773674/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/tlsdir171773674/key.pem"}
--- PASS: TestNewListenerTLSInfoSelfCert (0.08s)
=== RUN   TestIsClosedConnError
--- PASS: TestIsClosedConnError (0.00s)
=== RUN   TestReadWriteTimeoutDialer
--- PASS: TestReadWriteTimeoutDialer (0.02s)
=== RUN   TestNewTimeoutListener
--- PASS: TestNewTimeoutListener (0.00s)
=== RUN   TestWriteReadTimeoutListener
--- PASS: TestWriteReadTimeoutListener (0.02s)
=== RUN   TestNewTimeoutTransport
--- PASS: TestNewTimeoutTransport (0.00s)
=== RUN   TestNewTransportTLSInvalidCipherSuites
{"level":"info","msg":"created cert file","path":"/tmp/etcd-test-tls-529291585/cert.pem"}
{"level":"info","msg":"created key file","path":"/tmp/etcd-test-tls-529291585/key.pem"}
--- PASS: TestNewTransportTLSInvalidCipherSuites (0.06s)
PASS
ok  	go.etcd.io/etcd/pkg/transport	0.405s
root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport#
root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport#
root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport# go version
go version go1.11.1 linux/amd64
root@ubuntu18:/go/src/go.etcd.io/etcd/pkg/transport#

@xiang90
Copy link
Contributor

xiang90 commented Nov 16, 2018

@sudeeshjohn Can you help us debug this issue as you already can reproduce it?

@mkumatag
Copy link
Contributor

mkumatag commented Feb 7, 2019

The test is stuck because it expects handshake error @ https://github.com/etcd-io/etcd/blob/master/pkg/transport/transport_test.go#L65 but a handshake is going through because of latest changes made in 1.12

From the Go 1.12 Release Notes:

TLS 1.3 cipher suites are not configurable. All supported cipher suites are safe, and if PreferServerCipherSuites is set in Config the preference order is based on the available hardware.

Refer golang/go#30109 for more information.

@mkumatag
Copy link
Contributor

mkumatag commented Feb 7, 2019

From the Go 1.12 Release Notes:

TLS 1.3 cipher suites are not configurable. All supported cipher suites are safe, and if PreferServerCipherSuites is set in Config the preference order is based on the available hardware.

Refer golang/go#30109 for more information.

@xiang90 @gyuho due to this limitation, I'm limiting TLS to TLS12 for the test. We need to figureout what needs to be done with CipherSuites when we ship to golang 1.12 in future.

@xiang90
Copy link
Contributor

xiang90 commented Feb 7, 2019

lgtm

@johncming
Copy link
Contributor

johncming commented Mar 11, 2019

the [origin commit] (4bd81d0) it works.
This modification is temporary which can be deleted.

tr.TLSClientConfig.MaxVersion = tls.VersionTLS12

go version:
go version go1.12 darwin/amd64

go src :

https://github.com/golang/go/blob/1c2d4da10f6edf9a83fb0cffaaf9f631f462d26b/src/crypto/tls/handshake_server.go#L308-L311

	if hs.suite == nil {
		c.sendAlert(alertHandshakeFailure)
		return errors.New("tls: no cipher suite supported by both client and server")
	}

no need to add tr.TLSClientConfig.MaxVersion = tls.VersionTLS12.

@xiang90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants