Fix panic when recovering broken sector. #1921
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes :
2024-05-22T10:00:57.990+0200 DEBUG boostd/recover.go:698 successfully processed sector {"sector": "24242", "took": "2m10.444991835s", "deals": [54737806]}
2024-05-22T10:00:57.990+0200 DEBUG boostd/recover.go:685 processing sector {"sector": "24245", "deals": [54737803]}
2024-05-22T10:00:57.991+0200 WARN boostd/recover.go:714 deal present in sector, but not in market actor state, so probably expired {"sector": "24245", "deal": 54737803, "err": "deal 54737803 not found - deal may not have completed sealing before deal proposal start epoch, or deal may have been slashed"}
2024-05-22T10:00:57.991+0200 DEBUG boostd/recover.go:698 successfully processed sector {"sector": "24245", "took": "1.1293ms", "deals": [54737803]}
2024-05-22T10:00:57.991+0200 DEBUG boostd/recover.go:685 processing sector {"sector": "24246", "deals": [54737805]}
2024-05-22T10:00:58.005+0200 DEBUG boostd/recover.go:544 processing piece {"sector": "24246", "piececid": "baga6ea4seaqofw6a4qv6toolne2rhobfdblq7mss5cwhffjaa47dedg3wxcs6pq", "piecesize": 34359738368, "offset": 0, "label": "bafybeifo6wh22ydwxf2eio4a6larmd4hj7kl2vz6esuwvymcu5gxyh4nmq"}
2024-05-22T10:00:58.135+0200 ERROR boostd/recover.go:507 isUnsealed(24246, 0, 34091302912) returned false, but
storage find
returns an unsealed copy; most probably unsealed copy is full of 0x00 and is corrupted (confirm with xxd) {"sector": "24246"}2024-05-22T10:00:58.136+0200 DEBUG boostd/recover.go:586 processed piece {"took": "130.805405ms", "sector": "24246", "piececid": "baga6ea4seaqofw6a4qv6toolne2rhobfdblq7mss5cwhffjaa47dedg3wxcs6pq", "piecesize": 34359738368, "offset": 0, "label": "bafybeifo6wh22ydwxf2eio4a6larmd4hj7kl2vz6esuwvymcu5gxyh4nmq"}
2024-05-22T10:00:58.136+0200 DEBUG boostd/recover.go:698 successfully processed sector {"sector": "24246", "took": "144.511317ms", "deals": [54737805]}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2aad42f]
goroutine 74 [running]:
main.processPiece({0x7c5d8e8, 0xc00035f900}, 0x5eb6, 0x3433b8d, {{0xc008743770?, 0x0?}}, 0x800000000, 0x0, {0xc000794180, 0x3b})
/root/build/boost/cmd/boostd/recover.go:593 +0x6af
main.processSector({0x7c5d8e8, 0xc00035f900}, {{0xc0001509a0?, 0xc0001151a0?}}, 0xc001d3b710)
/root/build/boost/cmd/boostd/recover.go:737 +0x472
main.action(0x0?)
/root/build/boost/cmd/boostd/recover.go:270 +0xfdf
main.glob..func23.1()
/root/build/boost/cmd/boostd/recover.go:130 +0x25
created by main.glob..func23 in goroutine 1
/root/build/boost/cmd/boostd/recover.go:129 +0xf9