Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ensure syscall cbor-unmarshal errors are highly visible to implementers #544

Closed
Tracked by #531
arajasek opened this issue May 9, 2022 · 1 comment
Closed
Tracked by #531
Milestone

Comments

@arajasek
Copy link
Contributor

arajasek commented May 9, 2022

Syscall execution often follows this pattern:

In the SDK, a struct is serialized and passed to the FVM as a pointer / length pair. (example - verify_replica_update)
In the FVM, the same pointer / length pair are used as offsets into the actor’s memory from which the same struct is deserialized. (example - verify_replica_update)
If deserialization fails, the actor is returned Err(ErrorNumber::IllegalArgument), the same error used to indicate that the user has provided invalid parameters to the syscall.

In M1, actors will only consist of trusted code. In this context, errors during the latter deserialization portion of this pattern are highly irregular and likely indicate a serious problem. The use of IllegalArgument may mask these issues, as it is also used to signify any number of more mundane problems.

Recommendation: Ensure logging methods capture and highlight cbor deserialization issues.

@arajasek arajasek mentioned this issue May 9, 2022
48 tasks
@maciejwitowski maciejwitowski added this to the M2.1 milestone Oct 7, 2022
@Stebalien
Copy link
Member

We're now plumbing the "failure reason" all the way from syscalls to the final error message.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants