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

Race in dial #120

Closed
Kubuxu opened this issue Sep 28, 2016 · 1 comment
Closed

Race in dial #120

Kubuxu opened this issue Sep 28, 2016 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws) status/ready Ready to be worked

Comments

@Kubuxu
Copy link
Member

Kubuxu commented Sep 28, 2016

WARNING: DATA RACE
Write at 0x00c4202a8270 by goroutine 29:
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*DialSync).DialLock.func1()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/dial_sync.go:8
4 +0x16d

Previous read at 0x00c4202a8270 by goroutine 9:
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*activeDial).wait()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/dial_sync.go:4
1 +0xa5
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*DialSync).DialLock()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/dial_sync.go:9
1 +0x133
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*Swarm).gatedDialAttempt()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/swarm_dial.go:
191 +0x404
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*Swarm).Dial()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/swarm_dial.go:
161 +0x141
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*Network).DialPeer()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/swarm_net.go:3
7 +0x229
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic.(*BasicHost).dialPeer()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic/basic_host.go
:282 +0x26f
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic.(*BasicHost).Connect()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic/basic_host.go
:275 +0x13c
  github.com/libp2p/go-libp2p-kad-dht.connectNoSync()
      /home/kubuxu/go/src/github.com/libp2p/go-libp2p-kad-dht/dht_test.go:97 +0x223
  github.com/libp2p/go-libp2p-kad-dht.connect()
      /home/kubuxu/go/src/github.com/libp2p/go-libp2p-kad-dht/dht_test.go:103 +0x64
  github.com/libp2p/go-libp2p-kad-dht.TestValueGetSet()
      /home/kubuxu/go/src/github.com/libp2p/go-libp2p-kad-dht/dht_test.go:166 +0x414
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:610 +0xc9

Goroutine 29 (running) created at:
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*DialSync).DialLock()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/dial_sync.go:85 +0x410
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*Swarm).gatedDialAttempt()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/swarm_dial.go:191 +0x404
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*Swarm).Dial()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/swarm_dial.go:161 +0x141
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm.(*Network).DialPeer()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/net/swarm/swarm_net.go:37 +0x229
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic.(*BasicHost).dialPeer()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic/basic_host.go:282 +0x26f
  gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic.(*BasicHost).Connect()
      /home/kubuxu/go/src/gx/ipfs/QmYD8kZ8i5LVz5BBv6TdrWYRE7YZRs1dZXC3zmBHvQTwPC/go-libp2p/p2p/host/basic/basic_host.go:275 +0x13c
  github.com/libp2p/go-libp2p-kad-dht.connectNoSync()
      /home/kubuxu/go/src/github.com/libp2p/go-libp2p-kad-dht/dht_test.go:97 +0x223
  github.com/libp2p/go-libp2p-kad-dht.connect()
      /home/kubuxu/go/src/github.com/libp2p/go-libp2p-kad-dht/dht_test.go:103 +0x64
  github.com/libp2p/go-libp2p-kad-dht.TestValueGetSet()
      /home/kubuxu/go/src/github.com/libp2p/go-libp2p-kad-dht/dht_test.go:166 +0x414
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:610 +0xc9
@whyrusleeping whyrusleeping added status/ready Ready to be worked kind/bug A bug in existing code (including security flaws) labels Sep 28, 2016
@whyrusleeping
Copy link
Contributor

resolved in: libp2p/go-libp2p-swarm#2

@whyrusleeping whyrusleeping added status/ready Ready to be worked and removed status/ready Ready to be worked libp2p-backlog labels Nov 2, 2016
marten-seemann added a commit that referenced this issue Dec 22, 2021
marten-seemann pushed a commit that referenced this issue Aug 17, 2022
Introduce EvtPeerConnectednessChanged event
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) status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

3 participants