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

tls: flaky TestInvalidCerts #1529

Closed
marten-seemann opened this issue May 25, 2022 · 3 comments · Fixed by #1560
Closed

tls: flaky TestInvalidCerts #1529

marten-seemann opened this issue May 25, 2022 · 3 comments · Fixed by #1560
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@marten-seemann
Copy link
Contributor

      --- FAIL: TestInvalidCerts/client_offending:_signature_is_invalid (0.03s)
  panic: runtime error: invalid memory address or nil pointer dereference [recovered]
  	panic: runtime error: invalid memory address or nil pointer dereference
  [signal 0xc0000005 code=0x0 addr=0x10 pc=0xeae8a3]
  
  goroutine 144 [running]:
  testing.tRunner.func1.2({0xeea760, 0x12c5398})
  	C:/hostedtoolcache/windows/go/1.17.10/x64/src/testing/testing.go:1209 +0x2ab
  testing.tRunner.func1(0x118843c0)
  	C:/hostedtoolcache/windows/go/1.17.10/x64/src/testing/testing.go:1212 +0x27d
  panic({0xeea760, 0x12c5398})
  	C:/hostedtoolcache/windows/go/1.17.10/x64/src/runtime/panic.go:1038 +0x1bc
  github.com/libp2p/go-libp2p/p2p/security/tls.TestInvalidCerts.func19(0x118843c0)
  	D:/a/go-libp2p/go-libp2p/p2p/security/tls/transport_test.go:494 +0x4f3
  testing.tRunner(0x118843c0, 0x11b4aa50)
  	C:/hostedtoolcache/windows/go/1.17.10/x64/src/testing/testing.go:1259 +0xe6
  created by testing.(*T).Run
  	C:/hostedtoolcache/windows/go/1.17.10/x64/src/testing/testing.go:1306 +0x33a
@marten-seemann marten-seemann added the kind/bug A bug in existing code (including security flaws) label May 25, 2022
@marten-seemann marten-seemann self-assigned this May 25, 2022
@marten-seemann
Copy link
Contributor Author

This only fails on Windows, but with different error messages:

=== RUN   TestInvalidCerts/server_offending:_signature_is_malformed
    transport_test.go:60:
                Error Trace:    transport_test.go:60
                                                        transport_test.go:512
                Error:          Received unexpected error:
                                dial tcp 127.0.0.1:49534: connectex: Only one usage of each socket address (protocol/network address/port) is normally permitted.
                Test:           TestInvalidCerts/server_offending:_signature_is_malformed
--- FAIL: TestInvalidCerts (0.03s)
=== RUN   TestInvalidCerts/client_offending:_signature_is_invalid
    transport_test.go:490: unexpected error: read tcp 127.0.0.1:64919->127.0.0.1:64916: wsarecv: An existing connection was forcibly closed by the remote host.
--- FAIL: TestInvalidCerts (0.03s)
=== RUN   TestInvalidCerts/client_offending:_signature_is_invalid
    transport_test.go:60:
                Error Trace:    transport_test.go:60
                                                        transport_test.go:470
                Error:          Received unexpected error:
                                dial tcp 127.0.0.1:49509: connectex: Only one usage of each socket address (protocol/network address/port) is normally permitted.
                Test:           TestInvalidCerts/client_offending:_signature_is_invalid
    transport_test.go:56:
                Error Trace:    transport_test.go:56
                                                        asm_arm64.s:1133
                Error:          Received unexpected error:
                                accept tcp 127.0.0.1:49509: use of closed network connection
                Test:           TestInvalidCerts/client_offending:_signature_is_invalid
--- FAIL: TestInvalidCerts (0.03s)

@marten-seemann
Copy link
Contributor Author

This is very frustrating. Windows doesn't allow us to reliably dial a TCP connection. A damn TCP connection!!

@MarcoPolo
Copy link
Collaborator

Is there some connection in a previous test that failed to get closed/cleaned up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants