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

Ping command creates a lot of goroutines #57

Closed
Kubuxu opened this issue May 25, 2016 · 1 comment
Closed

Ping command creates a lot of goroutines #57

Kubuxu opened this issue May 25, 2016 · 1 comment

Comments

@Kubuxu
Copy link
Member

Kubuxu commented May 25, 2016

To replicate: while true; do; ipfs ping ID -n 1; sleep 0.5; done

Results in creation of following goroutine on receiving side:

gx/ipfs/QmZHf9MrEVGXNppqymCAGnvjYeHfVvg8kJkVtDQ8PhLRMT/yamux.(*Stream).Read(0xc82a8b3ad0, 0xc822fdefe0, 0x20, 0x20, 0x0, 0x0, 0x0)
    /home/kubuxu/go/src/gx/ipfs/QmZHf9MrEVGXNppqymCAGnvjYeHfVvg8kJkVtDQ8PhLRMT/yamux/stream.go:125 +0x3f1
gx/ipfs/QmZFdZY2Pjib1dT5632ZEgtDcaB36H3MGR6vP2diiZMyKS/go-smux-yamux.(*stream).Read(0xc82a8b3ad0, 0xc822fdefe0, 0x20, 0x20, 0xc800000000, 0x0, 0x0)
    /home/kubuxu/go/src/gx/ipfs/QmZFdZY2Pjib1dT5632ZEgtDcaB36H3MGR6vP2diiZMyKS/go-smux-yamux/yamux.go:20 +0x4b
gx/ipfs/QmduCCgTaLnxwwf9RFQy2PMUytrKcEH9msohtVxSBZUdgu/go-peerstream.(*Stream).Read(0xc83e9bce00, 0xc822fdefe0, 0x20, 0x20, 0xc83d4b5f80, 0x0, 0x0)
    /home/kubuxu/go/src/gx/ipfs/QmduCCgTaLnxwwf9RFQy2PMUytrKcEH9msohtVxSBZUdgu/go-peerstream/stream.go:73 +0x6c
gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/net/swarm.(*Stream).Read(0xc83e9bce00, 0xc822fdefe0, 0x20, 0x20, 0x7f7aabfc51d8, 0x0, 0x0)
    /home/kubuxu/go/src/gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/net/swarm/swarm_stream.go:30 +0x4d
gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/metrics/stream.(*meteredStream).Read(0xc841cf6f40, 0xc822fdefe0, 0x20, 0x20, 0x22, 0x0, 0x0)
    /home/kubuxu/go/src/gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/metrics/stream/metered.go:37 +0x75
io.ReadAtLeast(0x7f7aac00eee8, 0xc841cf6f40, 0xc822fdefe0, 0x20, 0x20, 0x20, 0x0, 0x0, 0x0)
    /usr/lib/go/src/io/io.go:297 +0xe6
io.ReadFull(0x7f7aac00eee8, 0xc841cf6f40, 0xc822fdefe0, 0x20, 0x20, 0x0, 0x0, 0x0)
    /usr/lib/go/src/io/io.go:315 +0x62
gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/protocol/ping.(*PingService).PingHandler(0xc820011090, 0x7f7aac00ee40, 0xc841cf6f40)
    /home/kubuxu/go/src/gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/protocol/ping/ping.go:37 +0xc1
gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/protocol/ping.(*PingService).PingHandler-fm(0x7f7aac00ee40, 0xc841cf6f40)
    /home/kubuxu/go/src/gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/protocol/ping/ping.go:29 +0x34
gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/host/basic.(*BasicHost).SetStreamHandler.func1(0x7f7aac00ee80, 0xc841cf6f40, 0x0, 0x0)
    /home/kubuxu/go/src/gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/host/basic/basic_host.go:150 +0x83
created by gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/host/basic.(*BasicHost).newStreamHandler
    /home/kubuxu/go/src/gx/ipfs/QmYT5cN3i8sg7HtwjiWJKybcfs6FvHL5zUoEJMdSuqR6GY/go-libp2p/p2p/host/basic/basic_host.go:116 +0x490

They seem to die out after some time.

Here is goroutine frequency list during pining for prolong amount of time: https://ipfs.io/ipfs/QmWVcqMQKazS7UXr4HS3sPqJYvGJAJfqQSLpeFtVrJjuYP

@whyrusleeping
Copy link
Contributor

fixed in #58

marten-seemann added a commit that referenced this issue Apr 27, 2022
improve the error message returned when peer verification fails
@MarcoPolo MarcoPolo mentioned this issue Jul 7, 2022
41 tasks
marten-seemann pushed a commit that referenced this issue Aug 15, 2022
Add ability to configure allowlist limits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants