-
Notifications
You must be signed in to change notification settings - Fork 17
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
Incorrect error message being logged #336
Comments
Nicely diagnosed. It probably should be |
This is wilder than I imagined .. I think ipld/go-ipld-prime#524 is involved in this, an error not propagating from the traversal system. Multiple ways to address this but certainly not as simple as I thought when I first started tackling this. |
Closes: #336 * don't treat context cancellation as an ErrExtraneousBlock in the CAR verifier * capture and properly handle block load errors that are missed by the go-ipld-prime traverser, ref: ipld/go-ipld-prime#524 * fix flaky case(s) in verifiedcar test suite where multi-level sharded directory is assumed but only a single block dir is produced
Closes: #336 * don't treat context cancellation as an ErrExtraneousBlock in the CAR verifier * capture and properly handle block load errors that are missed by the go-ipld-prime traverser, ref: ipld/go-ipld-prime#524 * fix flaky case(s) in verifiedcar test suite where multi-level sharded directory is assumed but only a single block dir is produced
This should address the problem: #338, the main fix here is to check for context cancellation errors in that position. Unfortunately testing this specific error path is very hard so it's not included there but I've verified that the correct error comes up for the case you've outlined—that the writer is borked. While in there I've fixed a few other tangentially related things. |
Closes: #336 * don't treat context cancellation as an ErrExtraneousBlock in the CAR verifier * capture and properly handle block load errors that are missed by the go-ipld-prime traverser, ref: ipld/go-ipld-prime#524 * fix flaky case(s) in verifiedcar test suite where multi-level sharded directory is assumed but only a single block dir is produced
Closes: #336 * don't treat context cancellation as an ErrExtraneousBlock in the CAR verifier * capture and properly handle block load errors that are missed by the go-ipld-prime traverser, ref: ipld/go-ipld-prime#524 * fix flaky case(s) in verifiedcar test suite where multi-level sharded directory is assumed but only a single block dir is produced
Closes: #336 * don't treat context cancellation as an ErrExtraneousBlock in the CAR verifier * capture and properly handle block load errors that are missed by the go-ipld-prime traverser, ref: ipld/go-ipld-prime#524 * fix flaky case(s) in verifiedcar test suite where multi-level sharded directory is assumed but only a single block dir is produced
This code assumes the err is
ErrExtraneousBlock
if it's notEOF
, but other errors likecontext canceled
will lead to this confusing log message:error closing car writer: extraneous block in CAR
. It makes me think the upstream provider is returning invalid CARs which isn't the case.lassie/pkg/verifiedcar/verifiedcar.go
Lines 140 to 143 in 1d22d1f
I'm able to repro with
lassie daemon -p 8989 --vv
and
curl "localhost:8989/ipfs/bafkreifyxdnkixhcqz4agfx6jekd27ib7kwxvhaddbvh4ycj4n22jj5d7y?dag-scope=entity&format=car" -v
The
context canceled
error inconsistently occurs if curl has no output option, if you provide an output (-o /dev/null
) then it works consistently. I guess curl cancels the request if it can't write the output to somewhere?The text was updated successfully, but these errors were encountered: