celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

header/sync: Panic in `headerRange`

Open renaynay opened this issue 2 years ago • 1 comments

Version

Semantic version: v0.3.0-rc2-67-g6bb877fa
Commit: 6bb877fa26a43121a8697c6e7ad85ed36fb8afa5
Build Date: Mon Aug  8 15:33:50 CEST 2022
System version: arm64/darwin
Golang version: go1.18

Stack trace

2022-08-08T16:00:08.058+0200	ERROR	header/sync	sync/sync.go:327	syncing headers	{"from": 150471, "to": 169507, "err": "stream reset"}
2022-08-08T16:00:08.058+0200	INFO	header/sync	sync/sync.go:317	syncing headers	{"from": 150471, "to": 169509}
2022-08-08T16:00:12.302+0200	INFO	header/store	store/store.go:305	new head	{"height": 150983, "hash": "A29E6C3D87051A269054EB33BFAEE0E7824232AA53DCF83194A99E7112837EBC"}
2022-08-08T16:00:16.390+0200	INFO	header/store	store/store.go:305	new head	{"height": 151495, "hash": "BEEF367969A87350DE6C6E0D6C43248032ADD2AFDDB2D2B341EFEE75EEB800AB"}
panic: runtime error: slice bounds out of range [:2] with capacity 1

goroutine 1286 [running]:
github.com/celestiaorg/celestia-node/header/sync.(*headerRange).Before(0x1400c744600, 0x251c8)
	/Users/<>/go/src/github.com/renaynay/celestia-node/header/sync/ranges.go:147 +0x158
github.com/celestiaorg/celestia-node/header/sync.(*Syncer).findHeaders(0x1400ab802c0, {0x107802690, 0x14001248000}, 0x24fc8, 0x29625)
	/Users/<>/go/src/github.com/renaynay/celestia-node/header/sync/sync.go:407 +0x1f0
github.com/celestiaorg/celestia-node/header/sync.(*Syncer).processHeaders(0x1400ab802c0, {0x107802690, 0x14001248000}, 0x0?, 0x14001467d88?)
	/Users/<>/go/src/github.com/renaynay/celestia-node/header/sync/sync.go:369 +0x2c
github.com/celestiaorg/celestia-node/header/sync.(*Syncer).doSync(0x1400ab802c0, {0x107802690, 0x14001248000}, 0x140103a0d80, 0x1400fec0300)
	/Users/<>/go/src/github.com/renaynay/celestia-node/header/sync/sync.go:354 +0x18c
github.com/celestiaorg/celestia-node/header/sync.(*Syncer).sync(0x1400ab802c0, {0x107802690, 0x14001248000})
	/Users/<>/go/src/github.com/renaynay/celestia-node/header/sync/sync.go:320 +0x1d0
github.com/celestiaorg/celestia-node/header/sync.(*Syncer).syncLoop(0x1400ab802c0)
	/Users/<>/go/src/github.com/renaynay/celestia-node/header/sync/sync.go:293 +0x34
created by github.com/celestiaorg/celestia-node/header/sync.(*Syncer).Start
	/Users/<>/go/src/github.com/renaynay/celestia-node/header/sync/sync.go:82 +0x144

Additional info

running on hlib/syncer-head branch but likely this issue is on main

renaynay avatar Aug 08 '22 14:08 renaynay

same happens in swamp tests Ref: https://github.com/celestiaorg/celestia-node/issues/955

Bidon15 avatar Aug 09 '22 13:08 Bidon15

Haven't seen this in a very long time and there have been several fixes to both ranges and syncer since - closing for now.

renaynay avatar Mar 02 '23 13:03 renaynay