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

Fix panic when recovering broken sector. #1921

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

cryptowhizzard
Copy link
Contributor

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

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
@LexLuthr LexLuthr requested a review from snadrus May 22, 2024 09:43
@LexLuthr LexLuthr merged commit a0938e3 into filecoin-project:main Jun 17, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants