Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Obey dial timeouts #83

Open
Stebalien opened this issue Oct 25, 2019 · 1 comment
Open

Obey dial timeouts #83

Stebalien opened this issue Oct 25, 2019 · 1 comment
Assignees

Comments

@Stebalien
Copy link
Member

We need to add timeouts/deadlines to reads/writes when dialing. This should not happen:

goroutine 1813864247 [3h33m0s]:
sync.runtime_SemacquireMutex [0xc0f7765c04, 0x0]
        /usr/lib/go/src/runtime/sema.go:71
sync.(*Mutex).Lock [0xc0f7765c00]
        /usr/lib/go/src/sync/mutex.go:134
sync.(*Once).Do [0xc0f7765c00, 0xc01001b668]
        /usr/lib/go/src/sync/once.go:40
github.com/multiformats/go-multistream.(*lazyClientConn).Read [0xc0f7765c00, 0xc0b4a08000, 0x1, 0x1000, 0x25, 0x25, 0x26]
        pkg/mod/github.com/multiformats/[email protected]/lazyClient.go:64
github.com/libp2p/go-libp2p/p2p/host/basic.(*streamWrapper).Read [0xc01ebbd040, 0xc0b4a08000, 0x1, 0x1000, 0xc01001b6c0, 0xc01001b740, 0xf0f6d2]
        pkg/mod/github.com/libp2p/[email protected]/p2p/host/basic/basic_host.go:732
github.com/libp2p/go-libp2p-circuit.(*delimitedReader).ReadByte [0xc1695b6300, 0x76, 0x0, 0x0]
        pkg/mod/github.com/libp2p/[email protected]/util.go:92
encoding/binary.ReadUvarint [0x1a9a6a0, 0xc1695b6300, 0x0, 0x0, 0x75]
        /usr/lib/go/src/encoding/binary/varint.go:110
github.com/libp2p/go-libp2p-circuit.(*delimitedReader).ReadMsg [0xc1695b6300, 0x1abf380, 0xc0ff1f5880, 0x0, 0x0]
        pkg/mod/github.com/libp2p/[email protected]/util.go:97
github.com/libp2p/go-libp2p-circuit.(*Relay).DialPeer [0xc000184900, 0x1ac53c0, 0xc185e62cc0, 0xc0cfca4780, 0x22, 0x0, 0x0, 0x0, 0xc0a20b0900, 0x22, ...]
        pkg/mod/github.com/libp2p/[email protected]/relay.go:172
github.com/libp2p/go-libp2p-circuit.(*Relay).tryDialRelays [0xc000184900, 0x1ac53c0, 0xc106b30600, 0xc0a20b0900, 0x22, 0xc046de0c70, 0x1, 0x1, 0x0, 0x0, ...]
        pkg/mod/github.com/libp2p/[email protected]/dial.go:79
github.com/libp2p/go-libp2p-circuit.(*Relay).Dial [0xc000184900, 0x1ac53c0, 0xc106b30600, 0x1adbda0, 0xc0f9bde000, 0xc0a20b0900, 0x22, 0xc000107e80, 0x2, 0x2]
        pkg/mod/github.com/libp2p/[email protected]/dial.go:47
github.com/libp2p/go-libp2p-circuit.(*RelayTransport).Dial [0xc000184900, 0x1ac53c0, 0xc106b30600, 0x1adbda0, 0xc0f9bde000, 0xc0a20b0900, 0x22, 0x97bc38, 0x10, 0x1947708, ...]
        pkg/mod/github.com/libp2p/[email protected]/dial.go:15
github.com/libp2p/go-libp2p-swarm.(*Swarm).dialAddr [0xc0004f0b40, 0x1ac53c0, 0xc106b30600, 0xc0a20b0900, 0x22, 0x1adbda0, 0xc0f9bde000, 0x0, 0xc171fca510, 0xc106b30600, ...]
        pkg/mod/github.com/libp2p/[email protected]/swarm_dial.go:461
github.com/libp2p/go-libp2p-swarm.(*dialLimiter).executeDial [0xc0005702d0, 0xc180a437c0]
        pkg/mod/github.com/libp2p/[email protected]/limiter.go:217
created by github.com/libp2p/go-libp2p-swarm. [*dialLimiter).addCheckFdLimi]
        pkg/mod/github.com/libp2p/[email protected]/limiter.go:167
@Stebalien
Copy link
Member Author

Stebalien commented Oct 25, 2019

In theory, this can completely stall any and all dials to this peer.

Nvm, it's not that bad.

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

No branches or pull requests

2 participants