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

downloaded: half open race #12925

Closed
dvovk opened this issue Nov 29, 2024 · 1 comment
Closed

downloaded: half open race #12925

dvovk opened this issue Nov 29, 2024 · 1 comment
Assignees
Labels
imp1 High importance
Milestone

Comments

@dvovk
Copy link
Member

dvovk commented Nov 29, 2024

==================
WARNING: DATA RACE
Write at 0x00c000b015e0 by goroutine 17410:
  github.com/anacrolix/torrent.(*Client).noLongerHalfOpen()
      github.com/anacrolix/torrent/client.go:695 +0xec
  github.com/anacrolix/torrent.(*Client).outgoingConnection()
      github.com/anacrolix/torrent/client.go:897 +0x184
  github.com/anacrolix/torrent.initiateConn.gowrap2()
      github.com/anacrolix/torrent/torrent.go:3143 +0xa0

Previous read at 0x00c000b015e0 by goroutine 21281:
  github.com/anacrolix/torrent.(*Torrent).openNewConns()
      github.com/anacrolix/torrent/torrent.go:1737 +0x34c
  github.com/anacrolix/torrent.(*Torrent).dropConnection()
      github.com/anacrolix/torrent/torrent.go:2012 +0x84
  github.com/anacrolix/torrent.(*PeerConn).drop()
      github.com/anacrolix/torrent/peerconn.go:1267 +0x60
  github.com/anacrolix/torrent.(*Torrent).maybeDropMutuallyCompletePeer()
      github.com/anacrolix/torrent/torrent.go:1305 +0x268
  github.com/anacrolix/torrent.(*PeerConn).peerPiecesChanged()
      github.com/anacrolix/torrent/peerconn.go:1390 +0x60
  github.com/anacrolix/torrent.(*PeerConn).onPeerHasAllPieces()
      github.com/anacrolix/torrent/peerconn.go:577 +0x21c
  github.com/anacrolix/torrent.(*PeerConn).onPeerSentHaveAll()
      github.com/anacrolix/torrent/peerconn.go:581 +0x3c
  github.com/anacrolix/torrent.(*PeerConn).mainReadLoop()
      github.com/anacrolix/torrent/peerconn.go:1027 +0x1440
  github.com/anacrolix/torrent.(*Torrent).runHandshookConn()
      github.com/anacrolix/torrent/client.go:1132 +0x1d0
  github.com/anacrolix/torrent.(*Torrent).logRunHandshookConn()
      github.com/anacrolix/torrent/torrent.go:2111 +0x5c
  github.com/anacrolix/torrent.(*Torrent).runHandshookConnLoggingErr()
      github.com/anacrolix/torrent/torrent.go:2118 +0x70
  github.com/anacrolix/torrent.(*Client).outgoingConnection()
      github.com/anacrolix/torrent/client.go:915 +0x5dc
  github.com/anacrolix/torrent.initiateConn.gowrap2()
      github.com/anacrolix/torrent/torrent.go:3143 +0xa0

Goroutine 17410 (running) created at:
  github.com/anacrolix/torrent.initiateConn()
      github.com/anacrolix/torrent/torrent.go:3143 +0x5a8
  github.com/anacrolix/torrent.(*Torrent).openNewConns()
      github.com/anacrolix/torrent/torrent.go:1749 +0x538
  github.com/anacrolix/torrent.(*Torrent).addPeer()
      github.com/anacrolix/torrent/torrent.go:394 +0x95c
  github.com/anacrolix/torrent.(*Torrent).addPeers()
      github.com/anacrolix/torrent/torrent.go:2351 +0x128
  github.com/anacrolix/torrent.(*Torrent).AddPeers()
      github.com/anacrolix/torrent/t.go:365 +0x6c
  github.com/anacrolix/torrent.(*trackerScraper).announce()
      github.com/anacrolix/torrent/tracker_scraper.go:219 +0x15bc
  github.com/anacrolix/torrent.(*trackerScraper).Run()
      github.com/anacrolix/torrent/tracker_scraper.go:258 +0x2f8
  github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1.gowrap1()
      github.com/anacrolix/torrent/torrent.go:2182 +0x38

      Goroutine 21281 (finished) created at:
      github.com/anacrolix/torrent.initiateConn()
          github.com/anacrolix/torrent/torrent.go:3143 +0x5a8
      github.com/anacrolix/torrent.(*Torrent).openNewConns()
          github.com/anacrolix/torrent/torrent.go:1749 +0x538
      github.com/anacrolix/torrent.(*Torrent).addPeer()
          github.com/anacrolix/torrent/torrent.go:394 +0x95c
      github.com/anacrolix/torrent.(*Torrent).addPeers()
          github.com/anacrolix/torrent/torrent.go:2351 +0x128
      github.com/anacrolix/torrent.(*Torrent).AddPeers()
          github.com/anacrolix/torrent/t.go:365 +0x6c
      github.com/anacrolix/torrent.(*trackerScraper).announce()
          github.com/anacrolix/torrent/tracker_scraper.go:219 +0x15bc
      github.com/anacrolix/torrent.(*trackerScraper).Run()
          github.com/anacrolix/torrent/tracker_scraper.go:258 +0x2f8
      github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1.gowrap1()
          github.com/anacrolix/torrent/torrent.go:2182 +0x38
    ==================
@dvovk dvovk added the imp1 High importance label Nov 29, 2024
@dvovk dvovk added this to the 3.0.0-beta1 milestone Nov 29, 2024
@dvovk dvovk self-assigned this Nov 29, 2024
yperbasis added a commit that referenced this issue Dec 3, 2024
yperbasis added a commit that referenced this issue Dec 3, 2024
Submodule `execution-spec-tests` was inadvertently deleted by PR #10915
and then PR #12925 broke the tests, which went unnoticed because of the
submodule deletion.
@dvovk
Copy link
Member Author

dvovk commented Dec 6, 2024

erigontech/torrent#37

@dvovk dvovk closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imp1 High importance
Projects
None yet
Development

No branches or pull requests

1 participant