erigon icon indicating copy to clipboard operation
erigon copied to clipboard

fatal error: runtime: out of memory when sync node on goerli testnet

Open hadv opened this issue 3 years ago • 3 comments

I run erigon version 2022.99.99-dev-64bc837c on Linux Debian 10x with 16GB RAM but always face the OOM exception.

Steps to reproduce the behaviour

just run erigon like /build/bin/erigon --chain=goerli --prune htc --torrent.download.rate=20mb

Backtrace

[INFO] [08-15|03:37:13.711] [txpool] stat                            block=7382818 pending=0 baseFee=0 queued=0 alloc=9.5GB sys=10.0GB
fatal error: runtime: out of memory

runtime stack:
runtime.throw({0x19b2c48?, 0x400000?})
	runtime/panic.go:992 +0x71
runtime.sysMap(0xc2bf000000, 0x6e53e49ead38?, 0x6e53e49eada0?)
	runtime/mem_linux.go:189 +0x11b
runtime.(*mheap).grow(0x2d74960, 0x116?)
	runtime/mheap.go:1404 +0x225
runtime.(*mheap).allocSpan(0x2d74960, 0x116, 0x0, 0x1)
	runtime/mheap.go:1170 +0x171
runtime.(*mheap).alloc.func1()
	runtime/mheap.go:912 +0x65
runtime.systemstack()
	runtime/asm_amd64.s:469 +0x49

goroutine 6503 [running]:
runtime.systemstack_switch()
	runtime/asm_amd64.s:436 fp=0xc1f0877670 sp=0xc1f0877668 pc=0x48cc20
runtime.(*mheap).alloc(0x0?, 0x2ba1440?, 0xe8?)
	runtime/mheap.go:906 +0x65 fp=0xc1f08776b8 sp=0xc1f0877670 pc=0x44c7c5
runtime.(*mcache).allocLarge(0xc02c9b4680?, 0x22c000, 0x1)
	runtime/mcache.go:213 +0x85 fp=0xc1f0877708 sp=0xc1f08776b8 pc=0x43ccc5
runtime.mallocgc(0x22c000, 0x0, 0x0)
	runtime/malloc.go:1096 +0x5a5 fp=0xc1f0877780 sp=0xc1f0877708 pc=0x4330c5
runtime.growslice(0xdd2565c8fd25c704?, {0x2d8f780?, 0xc0a446d9a1378f25?, 0x2f685984d0e80d83?}, 0x9b0e94404b4c8308?)
	runtime/slice.go:272 +0x4ac fp=0xc1f08777e8 sp=0xc1f0877780 pc=0x47386c
google.golang.org/protobuf/internal/impl.mergeBytesNoZero({0xc02cdb4188?}, {0xc030698a98?}, 0xc02883b490?, {})
	google.golang.org/[email protected]/internal/impl/merge.go:167 +0x4c fp=0xc1f0877848 sp=0xc1f08777e8 pc=0x9409ac
google.golang.org/protobuf/internal/impl.(*MessageInfo).mergePointer(0xc00024a8f8, {0x48cc6e?}, {0xc0361e44a8?}, {})
	google.golang.org/[email protected]/internal/impl/merge.go:52 +0xeb fp=0xc1f0877a98 sp=0xc1f0877848 pc=0x93f68b
google.golang.org/protobuf/internal/impl.(*MessageInfo).merge(0xc000057400?, {{}, {0x2027fe0?, 0xc0302f1a90?}, {0x2027fe0?, 0xc02cdb4190?}})
	google.golang.org/[email protected]/internal/impl/merge.go:32 +0x115 fp=0xc1f0877ac0 sp=0xc1f0877a98 pc=0x93f4f5
google.golang.org/protobuf/internal/impl.(*MessageInfo).merge-fm({{}, {0x2027fe0?, 0xc0302f1a90?}, {0x2027fe0?, 0xc02cdb4190?}})
	<autogenerated>:1 +0x49 fp=0xc1f0877af8 sp=0xc1f0877ac0 pc=0x953fe9
google.golang.org/protobuf/proto.mergeOptions.mergeMessage({}, {0x2027fe0, 0xc02cdb4190}, {0x2027fe0, 0xc0302f1a90})
	google.golang.org/[email protected]/proto/merge.go:73 +0x6d fp=0xc1f0877b68 sp=0xc1f0877af8 pc=0x8e340d
google.golang.org/protobuf/proto.Merge({0x20069c0?, 0xc02cdb4190?}, {0x20069c0, 0xc0302f1a90})
	google.golang.org/[email protected]/proto/merge.go:36 +0xdd fp=0xc1f0877c10 sp=0xc1f0877b68 pc=0x8e313d
github.com/ledgerwatch/erigon-lib/direct.(*SentryMessagesStreamC).RecvMsg(0xc1f0877d28?, {0x1892ec0?, 0xc02cdb4190})
	github.com/ledgerwatch/[email protected]/direct/sentry_client.go:289 +0x95 fp=0xc1f0877c50 sp=0xc1f0877c10 pc=0xa74d75
github.com/ledgerwatch/erigon/cmd/sentry/sentry.pumpStreamLoop[...]({0x2018588, 0xc0005f4380?}, {0x2028dd8, 0xc028b18840?}, {0x199e10c, 0xb}, 0xc025d99f70, 0x1df85d8, 0xc02c0835f0, 0x0)
	github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_multi_client.go:228 +0x3e7 fp=0xc1f0877d78 sp=0xc1f0877c50 pc=0x15281c7
github.com/ledgerwatch/erigon/cmd/sentry/sentry.sentryReconnectAndPumpStreamLoop[...]({0x2018588, 0xc0005f4380}, {0x2028dd8, 0xc028b18840}, 0xc1f0877f60, {0x199e10c, 0xb}, 0xc02bc33780, 0x1df85d8, 0xc02c0835f0, ...)
	github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_multi_client.go:164 +0x4d4 fp=0xc1f0877ef0 sp=0xc1f0877d78 pc=0x1527bf4
github.com/ledgerwatch/erigon/cmd/sentry/sentry.(*MultiClient).RecvMessageLoop(0xc027fb5c20, {0x2018588, 0xc0005f4380}, {0x2028dd8, 0xc028b18840}, 0xc000134a20?)
	github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_multi_client.go:109 +0x239 fp=0xc1f0877fa0 sp=0xc1f0877ef0 pc=0x1521719
github.com/ledgerwatch/erigon/cmd/sentry/sentry.(*MultiClient).StartStreamLoops.func1()
	github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_multi_client.go:56 +0x39 fp=0xc1f0877fe0 sp=0xc1f0877fa0 pc=0x1520cf9
runtime.goexit()
	runtime/asm_amd64.s:1571 +0x1 fp=0xc1f0877fe8 sp=0xc1f0877fe0 pc=0x48ee41
created by github.com/ledgerwatch/erigon/cmd/sentry/sentry.(*MultiClient).StartStreamLoops
	github.com/ledgerwatch/erigon/cmd/sentry/sentry/sentry_multi_client.go:56 +0x125

goroutine 1 [chan receive, 5 minutes]:
github.com/ledgerwatch/erigon/node.(*Node).Wait(...)
	github.com/ledgerwatch/erigon/node/node.go:265
github.com/ledgerwatch/erigon/turbo/node.(*ErigonNode).Serve(0xc02e80f3a0)
	github.com/ledgerwatch/erigon/turbo/node/node.go:32 +0x7c
main.runErigon(0xc00052a840?)
	github.com/ledgerwatch/erigon/cmd/erigon/main.go:63 +0x325
github.com/urfave/cli.HandleAction({0x16c7000?, 0x1dfadf8?}, 0xc00048a700?)
	github.com/urfave/[email protected]/app.go:526 +0x50
github.com/urfave/cli.(*App).Run(0xc00048a700, {0xc00003c0a0, 0x5, 0x5})
	github.com/urfave/[email protected]/app.go:286 +0x7c5
main.main()
	github.com/ledgerwatch/erigon/cmd/erigon/main.go:34 +0x75

goroutine 6 [sleep]:
time.Sleep(0x22ecb25c00)
	runtime/time.go:194 +0x12e
github.com/VictoriaMetrics/metrics.summariesSwapCron(0x45d964b800)
	github.com/VictoriaMetrics/[email protected]/summary.go:237 +0x36
created by github.com/VictoriaMetrics/metrics.registerSummaryLocked
	github.com/VictoriaMetrics/[email protected]/summary.go:211 +0x125

goroutine 27 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 289 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb5260)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 91 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb4b60)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 155263 [IO wait]:
internal/poll.runtime_pollWait(0x6e53f8079948, 0x77)
	runtime/netpoll.go:302 +0x89
internal/poll.(*pollDesc).wait(0xc252d07c00?, 0x0?, 0x0)
	internal/poll/fd_poll_runtime.go:83 +0x32
internal/poll.(*pollDesc).waitWrite(...)
	internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).WaitWrite(...)
	internal/poll/fd_unix.go:741
net.(*netFD).connect(0xc252d07c00, {0x20185f8?, 0xc030c65c20}, {0xc0262e93f0?, 0x4331e5?}, {0x2009b40?, 0xc25636fee0?})
	net/fd_unix.go:141 +0x716
net.(*netFD).dial(0xc252d07c00, {0x20185f8, 0xc030c65c20}, {0x201e048?, 0x0?}, {0x201e048?, 0xc02c2a9800}, 0x0?)
	net/sock_posix.go:149 +0x394
net.socket({0x20185f8, 0xc030c65c20}, {0x1990e6a, 0x3}, 0x2, 0x1, 0x0?, 0xe0?, {0x201e048, 0x0}, ...)
	net/sock_posix.go:70 +0x2b2
net.internetSocket({0x20185f8, 0xc030c65c20}, {0x1990e6a, 0x3}, {0x201e048, 0x0}, {0x201e048, 0xc02c2a9800}, 0xc029cb7f00?, 0x0, ...)
	net/ipsock_posix.go:142 +0xf8
net.(*sysDialer).doDialTCP(0xc252d07b80, {0x20185f8, 0xc030c65c20}, 0x0, 0x17661e0?)
	net/tcpsock_posix.go:65 +0xa5
net.(*sysDialer).dialTCP(0x1?, {0x20185f8?, 0xc030c65c20?}, 0x0?, 0x489c1b?)
	net/tcpsock_posix.go:61 +0x59
net.(*sysDialer).dialSingle(0xc252d07b80, {0x20185f8, 0xc030c65c20}, {0x2010650?, 0xc02c2a9800})
	net/dial.go:583 +0x28b
net.(*sysDialer).dialSerial(0xc252d07b80, {0x20185f8, 0xc030c65c20}, {0xc02b656460?, 0x1, 0x1991759?})
	net/dial.go:551 +0x312
net.(*Dialer).DialContext(0x2d4a780, {0x20185f8, 0xc030c65c20}, {0x1990e6a, 0x3}, {0xc029cb7ef0, 0xf})
	net/dial.go:428 +0x736
net/http.(*Transport).dial(0x0?, {0x20185f8?, 0xc030c65c20?}, {0x1990e6a?, 0xc062d83b40?}, {0xc029cb7ef0?, 0x2011820?})
	net/http/transport.go:1178 +0xb8
net/http.(*Transport).dialConn(0xc02a716500, {0x20185f8, 0xc030c65c20}, {{}, 0x0, {0xc25636b0a0, 0x4}, {0xc029cb7ef0, 0xf}, 0x0})
	net/http/transport.go:1607 +0x83f
net/http.(*Transport).dialConnFor(0xd13de6?, 0xc00066b130)
	net/http/transport.go:1449 +0xb0
created by net/http.(*Transport).queueForDial
	net/http/transport.go:1418 +0x3d2

goroutine 151884 [chan receive]:
github.com/anacrolix/torrent.DialFirst.func3(0xc02b6dbcb0, 0xc026ecaba8, 0x1ffd010?)
	github.com/anacrolix/[email protected]/client.go:648 +0x97
github.com/anacrolix/torrent.DialFirst({0x20185f8, 0xc02bc460c0}, {0xc02995a570, 0x13}, {0xc025a2e100, 0x4, 0xb2b662?})
	github.com/anacrolix/[email protected]/client.go:650 +0x1cf
github.com/anacrolix/torrent.(*Client).dialFirst(...)
	github.com/anacrolix/[email protected]/client.go:614
github.com/anacrolix/torrent.(*Client).establishOutgoingConnEx(0xc00017c900?, 0x19c1ad9?, {0x200a140?, 0xc028aec8e0?}, 0x47?)
	github.com/anacrolix/[email protected]/client.go:727 +0x119
github.com/anacrolix/torrent.(*Client).establishOutgoingConn(0xc00017c900, 0x20185c0?, {0x200a140, 0xc028aec8e0})
	github.com/anacrolix/[email protected]/client.go:767 +0xbe
github.com/anacrolix/torrent.(*Client).outgoingConnection(0xc00017c900, 0x465505?, {0x200a140?, 0xc028aec8e0}, {0x199066f, 0x2}, 0x0)
	github.com/anacrolix/[email protected]/client.go:779 +0xc5
created by github.com/anacrolix/torrent.(*Torrent).initiateConn
	github.com/anacrolix/[email protected]/torrent.go:2269 +0x25d

goroutine 16 [select, 5 minutes]:
github.com/anacrolix/torrent.(*Client).acceptLimitClearer(0xc00017c900)
	github.com/anacrolix/[email protected]/client.go:1652 +0x9b
created by github.com/anacrolix/torrent.NewClient
	github.com/anacrolix/[email protected]/client.go:222 +0x2fc

goroutine 388 [select]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb5500)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 87 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb47e0)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 386 [select]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb5340)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 69 [runnable]:
internal/poll.runtime_pollWait(0x7f6710faf9b8, 0x72)
	runtime/netpoll.go:302 +0x89
internal/poll.(*pollDesc).wait(0xc025a32080?, 0xc2b4d612c0?, 0x0)
	internal/poll/fd_poll_runtime.go:83 +0x32
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:88
internal/poll.(*FD).Accept(0xc025a32080)
	internal/poll/fd_unix.go:614 +0x22c
net.(*netFD).accept(0xc025a32080)
	net/fd_unix.go:172 +0x35
net.(*TCPListener).accept(0xc0254567b0)
	net/tcpsock_posix.go:139 +0x28
net.(*TCPListener).Accept(0xc0254567b0)
	net/tcpsock.go:288 +0x3d
github.com/anacrolix/torrent.(*Client).acceptConnections(0xc00017c900, {0x775d7a3c2490?, 0xc0006aa690})
	github.com/anacrolix/[email protected]/client.go:500 +0x64
created by github.com/anacrolix/torrent.NewClient
	github.com/anacrolix/[email protected]/client.go:269 +0x12ca

goroutine 89 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb49a0)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 88 [select]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb48c0)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 67 [semacquire]:
sync.runtime_SemacquireMutex(0x1c?, 0xb8?, 0x4348b0?)
	runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0x2d4b160)
	sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
	sync/mutex.go:81
github.com/anacrolix/sync.(*Mutex).Lock(0x2d4b160)
	github.com/anacrolix/[email protected]/mutex.go:26 +0x47
github.com/anacrolix/go-libutp.(*Socket).processReceivedMessages(0xc000135200, {0xc003e5c300, 0x2, 0x2?})
	github.com/anacrolix/[email protected]/socket.go:232 +0x5e
github.com/anacrolix/go-libutp.(*Socket).packetReader(0xc000135200)
	github.com/anacrolix/[email protected]/socket.go:227 +0x2a5
created by github.com/anacrolix/go-libutp.NewSocket
	github.com/anacrolix/[email protected]/socket.go:147 +0x276

goroutine 66 [semacquire]:
sync.runtime_SemacquireMutex(0x4dff4c12346fd1b6?, 0xd7?, 0xeeabc1d5eb36a603?)
	runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0x2d4b160)
	sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
	sync/mutex.go:81
github.com/anacrolix/sync.(*Mutex).Lock(0x2d4b160)
	github.com/anacrolix/[email protected]/mutex.go:26 +0x47
github.com/anacrolix/go-libutp.(*Socket).processReceivedMessages(0xc000134a20, {0xc003e5c000, 0xe, 0xe?})
	github.com/anacrolix/[email protected]/socket.go:232 +0x5e
github.com/anacrolix/go-libutp.(*Socket).packetReader(0xc000134a20)
	github.com/anacrolix/[email protected]/socket.go:227 +0x2a5
created by github.com/anacrolix/go-libutp.NewSocket
	github.com/anacrolix/[email protected]/socket.go:147 +0x276

goroutine 70 [chan receive]:
github.com/anacrolix/go-libutp.(*Socket).Accept(0xd06305?)
	github.com/anacrolix/[email protected]/socket.go:387 +0x2b
github.com/anacrolix/torrent.(*Client).acceptConnections(0xc00017c900, {0x775d7a3c24e0?, 0xc0254462e0})
	github.com/anacrolix/[email protected]/client.go:500 +0x64
created by github.com/anacrolix/torrent.NewClient
	github.com/anacrolix/[email protected]/client.go:269 +0x12ca

goroutine 68 [runnable]:
internal/poll.(*FD).SetsockoptInt(0xc030ae30e0?, 0xc00092fdb0?, 0x433547?, 0xc00092fc90?)
	internal/poll/sockopt.go:17 +0x11f
net.setNoDelay(0xc2b7274600, 0x40?)
	net/tcpsockopt_posix.go:15 +0x31
net.newTCPConn(...)
	net/tcpsock.go:222
net.(*TCPListener).accept(0xc025456798)
	net/tcpsock_posix.go:143 +0x77
net.(*TCPListener).Accept(0xc025456798)
	net/tcpsock.go:288 +0x3d
github.com/anacrolix/torrent.(*Client).acceptConnections(0xc00017c900, {0x775d7a3c2490?, 0xc0006aa600})
	github.com/anacrolix/[email protected]/client.go:500 +0x64
created by github.com/anacrolix/torrent.NewClient
	github.com/anacrolix/[email protected]/client.go:269 +0x12ca

goroutine 90 [select]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025eb4a80)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 71 [chan receive]:
github.com/anacrolix/go-libutp.(*Socket).Accept(0xd06305?)
	github.com/anacrolix/[email protected]/socket.go:387 +0x2b
github.com/anacrolix/torrent.(*Client).acceptConnections(0xc00017c900, {0x775d7a3c24e0?, 0xc025446300})
	github.com/anacrolix/[email protected]/client.go:500 +0x64
created by github.com/anacrolix/torrent.NewClient
	github.com/anacrolix/[email protected]/client.go:269 +0x12ca

goroutine 3037 [select, 5 minutes]:
github.com/ledgerwatch/erigon-lib/kv/remotedbserver.(*KvServer).StateChanges(0xc02cfad100, 0xc00017c968?, {0x2020ca0, 0xc02ee46180})
	github.com/ledgerwatch/[email protected]/kv/remotedbserver/server.go:289 +0x116
github.com/ledgerwatch/erigon-lib/direct.(*StateDiffClientDirect).StateChanges.func1()
	github.com/ledgerwatch/[email protected]/direct/state_diff_client.go:55 +0x78
created by github.com/ledgerwatch/erigon-lib/direct.(*StateDiffClientDirect).StateChanges
	github.com/ledgerwatch/[email protected]/direct/state_diff_client.go:53 +0x12a

goroutine 210 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 26 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 230 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 258 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 83 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 226 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 227 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 157632 [semacquire]:
sync.runtime_SemacquireMutex(0xc062d84c48?, 0x8a?, 0xc133bdd810?)
	runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc025e2c210)
	sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
	sync/mutex.go:81
context.removeChild({0x2018588?, 0xc025e2c200?}, {0x200de00, 0xc133bdd800})
	context/context.go:319 +0x65
context.(*timerCtx).cancel(0xc133bdd800, 0x1, {0x2004ec0?, 0xc00007c2e0?})
	context/context.go:486 +0x55
context.WithDeadline.func3()
	context/context.go:459 +0x30
net.(*Dialer).DialContext(0xc02615ed20, {0x2018588, 0xc025e2c200}, {0x1990e6a, 0x3}, {0xc02a04d9c8, 0x13})
	net/dial.go:443 +0x8d3
github.com/ledgerwatch/erigon/p2p.tcpDialer.Dial({0x6e53e4035728?}, {0x2018588, 0xc025e2c200}, 0x60?)
	github.com/ledgerwatch/erigon/p2p/dial.go:69 +0x5a
github.com/ledgerwatch/erigon/p2p.(*dialTask).dial(0xc030f225d0, 0xc026150420, 0xc040a87420)
	github.com/ledgerwatch/erigon/p2p/dial.go:544 +0x67
github.com/ledgerwatch/erigon/p2p.(*dialTask).run(0xc030f225d0, 0x465505?)
	github.com/ledgerwatch/erigon/p2p/dial.go:494 +0x6b
github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial.func1()
	github.com/ledgerwatch/erigon/p2p/dial.go:465 +0x51
created by github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial
	github.com/ledgerwatch/erigon/p2p/dial.go:463 +0x3f2

goroutine 259 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 228 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 229 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 144 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 143 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 103 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run(0xc025a540e0)
	github.com/anacrolix/[email protected]/tracker_scraper.go:249 +0x49c
created by github.com/anacrolix/torrent.(*Torrent).startScrapingTracker.func1
	github.com/anacrolix/[email protected]/torrent.go:1687 +0x254

goroutine 1364 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 152870 [IO wait]:
internal/poll.runtime_pollWait(0x6e53f8079768, 0x77)
	runtime/netpoll.go:302 +0x89
internal/poll.(*pollDesc).wait(0xc22d50ad00?, 0x0?, 0x0)
	internal/poll/fd_poll_runtime.go:83 +0x32
internal/poll.(*pollDesc).waitWrite(...)
	internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).WaitWrite(...)
	internal/poll/fd_unix.go:741
net.(*netFD).connect(0xc22d50ad00, {0x20185f8?, 0xc02bde51a0}, {0xc0261ba8e0?, 0x4331e5?}, {0x2009b40?, 0xc22cbed2e0?})
	net/fd_unix.go:141 +0x716
net.(*netFD).dial(0xc22d50ad00, {0x20185f8, 0xc02bde51a0}, {0x201e048?, 0x0?}, {0x201e048?, 0xc02b7dfb30}, 0xc00007c090?)
	net/sock_posix.go:149 +0x394
net.socket({0x20185f8, 0xc02bde51a0}, {0x1990e6a, 0x3}, 0x2, 0x1, 0x0?, 0xd0?, {0x201e048, 0x0}, ...)
	net/sock_posix.go:70 +0x2b2
net.internetSocket({0x20185f8, 0xc02bde51a0}, {0x1990e6a, 0x3}, {0x201e048, 0x0}, {0x201e048, 0xc02b7dfb30}, 0xc02ba283b0?, 0x0, ...)
	net/ipsock_posix.go:142 +0xf8
net.(*sysDialer).doDialTCP(0xc22d50ac80, {0x20185f8, 0xc02bde51a0}, 0x0, 0x17661e0?)
	net/tcpsock_posix.go:65 +0xa5
net.(*sysDialer).dialTCP(0x2d8f7dd?, {0x20185f8?, 0xc02bde51a0?}, 0xc0261bab70?, 0x492b7d?)
	net/tcpsock_posix.go:61 +0x59
net.(*sysDialer).dialSingle(0xc22d50ac80, {0x20185f8, 0xc02bde51a0}, {0x2010650?, 0xc02b7dfb30})
	net/dial.go:583 +0x28b
net.(*sysDialer).dialSerial(0xc22d50ac80, {0x20185f8, 0xc02bde51a0}, {0xc02a6a26c0?, 0x1, 0x1991759?})
	net/dial.go:551 +0x312
net.(*Dialer).DialContext(0xc02615ed20, {0x2018588, 0xc025e2c200}, {0x1990e6a, 0x3}, {0xc02f6d81c8, 0x13})
	net/dial.go:428 +0x736
github.com/ledgerwatch/erigon/p2p.tcpDialer.Dial({0x0?}, {0x2018588, 0xc025e2c200}, 0x1688260?)
	github.com/ledgerwatch/erigon/p2p/dial.go:69 +0x5a
github.com/ledgerwatch/erigon/p2p.(*dialTask).dial(0xc02b7df770, 0xc026150420, 0xc030cf38c0)
	github.com/ledgerwatch/erigon/p2p/dial.go:544 +0x67
github.com/ledgerwatch/erigon/p2p.(*dialTask).run(0xc02b7df770, 0x0?)
	github.com/ledgerwatch/erigon/p2p/dial.go:494 +0x6b
github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial.func1()
	github.com/ledgerwatch/erigon/p2p/dial.go:465 +0x51
created by github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial
	github.com/ledgerwatch/erigon/p2p/dial.go:463 +0x3f2

goroutine 157652 [semacquire]:
sync.runtime_SemacquireMutex(0xc034f77c48?, 0x8a?, 0xc133bddb10?)
	runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc025e2c210)
	sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
	sync/mutex.go:81
context.removeChild({0x2018588?, 0xc025e2c200?}, {0x200de00, 0xc133bddb00})
	context/context.go:319 +0x65
context.(*timerCtx).cancel(0xc133bddb00, 0x1, {0x2004ec0?, 0xc00007c2e0?})
	context/context.go:486 +0x55
context.WithDeadline.func3()
	context/context.go:459 +0x30
net.(*Dialer).DialContext(0xc02615ed20, {0x2018588, 0xc025e2c200}, {0x1990e6a, 0x3}, {0xc02a04da28, 0x14})
	net/dial.go:443 +0x8d3
github.com/ledgerwatch/erigon/p2p.tcpDialer.Dial({0xc00004e000?}, {0x2018588, 0xc025e2c200}, 0x15c1440?)
	github.com/ledgerwatch/erigon/p2p/dial.go:69 +0x5a
github.com/ledgerwatch/erigon/p2p.(*dialTask).dial(0xc030f22930, 0xc026150420, 0xc044deb650)
	github.com/ledgerwatch/erigon/p2p/dial.go:544 +0x67
github.com/ledgerwatch/erigon/p2p.(*dialTask).run(0xc030f22930, 0x465505?)
	github.com/ledgerwatch/erigon/p2p/dial.go:494 +0x6b
github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial.func1()
	github.com/ledgerwatch/erigon/p2p/dial.go:465 +0x51
created by github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial
	github.com/ledgerwatch/erigon/p2p/dial.go:463 +0x3f2

goroutine 151555 [chan receive]:
github.com/anacrolix/torrent.DialFirst.func3(0xc025a09388, 0xc02ada0ba8, 0x1ffd010?)
	github.com/anacrolix/[email protected]/client.go:648 +0x97
github.com/anacrolix/torrent.DialFirst({0x20185f8, 0xc02e796180}, {0xc03ec3c618, 0x13}, {0xc025a2e100, 0x4, 0xb2b662?})
	github.com/anacrolix/[email protected]/client.go:650 +0x1cf
github.com/anacrolix/torrent.(*Client).dialFirst(...)
	github.com/anacrolix/[email protected]/client.go:614
github.com/anacrolix/torrent.(*Client).establishOutgoingConnEx(0xc00017c900?, 0x19c1ad9?, {0x200a140?, 0xc02cf86980?}, 0x14?)
	github.com/anacrolix/[email protected]/client.go:727 +0x119
github.com/anacrolix/torrent.(*Client).establishOutgoingConn(0xc00017c900, 0x20185c0?, {0x200a140, 0xc02cf86980})
	github.com/anacrolix/[email protected]/client.go:755 +0x78
github.com/anacrolix/torrent.(*Client).outgoingConnection(0xc00017c900, 0xc0263727d0?, {0x200a140?, 0xc02cf86980}, {0x199066f, 0x2}, 0x0)
	github.com/anacrolix/[email protected]/client.go:779 +0xc5
created by github.com/anacrolix/torrent.(*Torrent).initiateConn
	github.com/anacrolix/[email protected]/torrent.go:2269 +0x25d

goroutine 1339 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 1307 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

goroutine 1365 [select, 5 minutes]:
github.com/anacrolix/torrent.(*trackerScraper).Run.func1()
	github.com/anacrolix/[email protected]/tracker_scraper.go:207 +0xca
created by github.com/anacrolix/torrent.(*trackerScraper).Run
	github.com/anacrolix/[email protected]/tracker_scraper.go:205 +0x12e

hadv avatar Aug 15 '22 07:08 hadv

  1. I think it's because our StageBodies is not limited by size (and downloading of blocks in background is also not limited)
  2. add --txpool.disable to reduce scope

AskAlexSharov avatar Aug 15 '22 08:08 AskAlexSharov

  1. if add --pprof: then can do things like go tool pprof -lines -http=: http://127.0.0.1:6060/debug/pprof/heap

AskAlexSharov avatar Aug 15 '22 08:08 AskAlexSharov

Seems linked to a class of issues such as #4692 that we're currently working on - @hexoscott is nearly there with an ETL implementation to reduce memory pressure caused by future downloaded blocks which we're not yet able to process which would otherwise sit in RAM.

revitteth avatar Aug 24 '22 09:08 revitteth

Fix is released, closing.

revitteth avatar Oct 17 '22 11:10 revitteth