tinychain icon indicating copy to clipboard operation
tinychain copied to clipboard

sync: WaitGroup is reused before previous Wait has returned

Open liamzebedee opened this issue 1 year ago • 1 comments

2024/07/25 14:57:41 [sync] (downloader) Peer summary table
2024/07/25 14:57:41 [sync] (downloader) Peer #0: jobs=9 success=9 failed=0 avg_duration=318.78 ms rate_per_s=3.14
panic: sync: WaitGroup is reused before previous Wait has returned

goroutine 1747 [running]:
sync.(*WaitGroup).Wait(0x1400036c240)
	/nix/store/n1k6wf8q10q7k0863gb78b1rf0j07r7r-go-1.22.1/share/go/src/sync/waitgroup.go:118 +0xac
github.com/liamzebedee/tinychain-go/core/nakamoto.(*DownloadEngine).Start.func4()
	/Users/liamz/tinychain-go/core/nakamoto/sync_downloader.go:190 +0x28
created by github.com/liamzebedee/tinychain-go/core/nakamoto.(*DownloadEngine).Start in goroutine 1727
	/Users/liamz/tinychain-go/core/nakamoto/sync_downloader.go:189 +0x5b0

liamzebedee avatar Jul 25 '24 11:07 liamzebedee

And another one

2024/07/29 22:03:49 [sync] (downloader) error: not enough workers to fill jobs
2024/07/29 22:03:49 [sync] (downloader) Peer summary table
2024/07/29 22:03:49 [sync] (downloader) Peer #0: jobs=1 success=0 failed=1 avg_duration=1.00 ms rate_per_s=0.00
2024/07/29 22:03:49 [node] (sync) Failed to download bodies: Error downloading: not enough workers to fill jobs
2024/07/29 22:03:49 [node] (sync) synchronisation done
2024/07/29 22:03:49 [node] (sync) Total headers downloaded: 0
2024/07/29 22:03:49 [node] Sync complete downloaded=0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x18 pc=0x100cfa5dc]

goroutine 1000 [running]:
github.com/liamzebedee/tinychain-go/core/nakamoto.(*DownloadEngine).Start.func1.1()
	/Users/liamz/Documents/Projects/tinychain-go/core/nakamoto/sync_downloader.go:123 +0x22c
created by github.com/liamzebedee/tinychain-go/core/nakamoto.(*DownloadEngine).Start.func1 in goroutine 995
	/Users/liamz/Documents/Projects/tinychain-go/core/nakamoto/sync_downloader.go:111 +0x188
(base) ➜  build git:(explorer) ./tinychain-darwin-arm64 node --port 8080 --db node1.db

liamzebedee avatar Jul 30 '24 22:07 liamzebedee