Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

failing hole punching test #213

Closed
marten-seemann opened this issue Jul 20, 2021 · 4 comments · Fixed by #257
Closed

failing hole punching test #213

marten-seemann opened this issue Jul 20, 2021 · 4 comments · Fixed by #257

Comments

@marten-seemann
Copy link
Collaborator

• Failure [5.530 seconds]
Connection
/home/runner/work/go-libp2p-quic-transport/go-libp2p-quic-transport/conn_test.go:28
  hole punches [It]
  /home/runner/work/go-libp2p-quic-transport/go-libp2p-quic-transport/conn_test.go:367

  didn't expect to accept any connections

  /home/runner/work/go-libp2p-quic-transport/go-libp2p-quic-transport/conn_test.go:380

  Full Stack Trace
  github.com/libp2p/go-libp2p-quic-transport.glob..func2.12.1(0xc00003b7a0, 0xe83860, 0xc000310050)
  	/home/runner/work/go-libp2p-quic-transport/go-libp2p-quic-transport/conn_test.go:380 +0xcc
  created by github.com/libp2p/go-libp2p-quic-transport.glob..func2.12
  	/home/runner/work/go-libp2p-quic-transport/go-libp2p-quic-transport/conn_test.go:376 +0x3ed
------------------------------
@marten-seemann
Copy link
Collaborator Author

Weirdly, this now stopped failing locally (on OSX), but now fails randomly on CI. This won't make debugging easier.

@Stebalien
Copy link
Member

AH! I have a guess.

We now shut down the transport as of #216. Maybe we need to block until this finishes?

@marten-seemann
Copy link
Collaborator Author

We now shut down the transport as of #216. Maybe we need to block until this finishes?

We already do that, don't we:

defer func() {
r.mutex.Lock()
for _, conn := range r.global {
conn.Close()
}
for _, conns := range r.unicast {
for _, conn := range conns {
conn.Close()
}
}
r.mutex.Unlock()
close(r.gcStopChan)
}()

@Stebalien
Copy link
Member

Hm. You're right. I was thinking about https://github.com/lucas-clemente/quic-go/blob/89061486820236ffe76c3770d04fd455f5455251/closed_session.go#L49-L58, but that doesn't keep the socket open.

I have no idea. We're using random ports anyways...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants