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

dl: race in piceHashers at shutdown #11411

Closed
AskAlexSharov opened this issue Jul 31, 2024 · 0 comments
Closed

dl: race in piceHashers at shutdown #11411

AskAlexSharov opened this issue Jul 31, 2024 · 0 comments
Assignees

Comments

@AskAlexSharov
Copy link
Collaborator

==================
WARNING: DATA RACE
Read at 0x00c00f8c2310 by goroutine 934:
  github.com/anacrolix/torrent.(*Torrent).processHashResults()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:2890 +0x30a
  github.com/anacrolix/torrent.(*Torrent).tryCreateMorePieceHashers.func1.gowrap2()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:2776 +0x33

Previous write at 0x00c00f8c2310 by goroutine 42872:
  github.com/anacrolix/torrent.(*Torrent).close()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:1112 +0x5b2
  github.com/anacrolix/torrent.(*Client).Close()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/client.go:444 +0x10c
  github.com/erigontech/erigon-lib/downloader.(*Downloader).Close()
      /home/ubuntu/erigon/erigon-lib/downloader/downloader.go:2766 +0x118
  github.com/erigontech/erigon/eth.(*Ethereum).Stop()
      /home/ubuntu/erigon/eth/backend.go:1586 +0x104
  github.com/erigontech/erigon/node.(*Node).stopServices()
      /home/ubuntu/erigon/node/node.go:221 +0x148
  github.com/erigontech/erigon/node.(*Node).Close()
      /home/ubuntu/erigon/node/node.go:164 +0x1b7
  github.com/erigontech/erigon/turbo/debug.ListenSignals.gowrap2()
      /home/ubuntu/erigon/turbo/debug/signal.go:46 +0x42

Goroutine 934 (running) created at:
  github.com/anacrolix/torrent.(*Torrent).tryCreateMorePieceHashers.func1()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:2776 +0x216
  github.com/anacrolix/torrent.(*Torrent).tryCreateMorePieceHashers()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:2778 +0x57
  github.com/anacrolix/torrent.(*Torrent).onSetInfo()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:602 +0x5f7
  github.com/anacrolix/torrent.(*Torrent).setInfoBytes()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:638 +0x8f
  github.com/anacrolix/torrent.(*Torrent).SetInfoBytes()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/torrent.go:1915 +0x110
  github.com/anacrolix/torrent.(*Torrent).MergeSpec()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/client.go:1485 +0xd4
  github.com/anacrolix/torrent.(*Client).AddTorrentSpec()
      /home/ubuntu/go/pkg/mod/github.com/erigontech/torrent@v1.54.2-alpha-33/client.go:1470 +0x1ba
  github.com/erigontech/erigon-lib/downloader._addTorrentFile()
      /home/ubuntu/erigon/erigon-lib/downloader/util.go:340 +0xa9d
  github.com/erigontech/erigon-lib/downloader.addTorrentFile()
      /home/ubuntu/erigon/erigon-lib/downloader/util.go:317 +0x284
  github.com/erigontech/erigon-lib/downloader.(*Downloader).addTorrentFilesFromDisk.func2()
      /home/ubuntu/erigon/erigon-lib/downloader/downloader.go:2735 +0x10a
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/ubuntu/go/pkg/mod/golang.org/x/sync@v0.7.0/errgroup/errgroup.go:78 +0x91

Goroutine 42872 (running) created at:
  github.com/erigontech/erigon/turbo/debug.ListenSignals()
      /home/ubuntu/erigon/turbo/debug/signal.go:46 +0x377
  github.com/erigontech/erigon/node.StartNode.gowrap1()
      /home/ubuntu/erigon/node/node.go:423 +0x5d
==================
AskAlexSharov added a commit that referenced this issue Aug 13, 2024
Fixes:
#5145
#11411
#11424

---------

Co-authored-by: Mark Holt <mark@disributed.vision>
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
@mh0lt mh0lt closed this as completed Aug 30, 2024
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

4 participants