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

Log more call context during errors #6918

Merged
merged 4 commits into from
Jul 29, 2021
Merged

Conversation

ZenGround0
Copy link
Contributor

This carries forward some nice work from @zgfzgf in #4954

Logging call context from Abortf as in the original PR turns out to be redundant with the logging from shimCall because all Abortf calls panic up to shimCall immediately. Logging shimCall failures is not redundant with internal and vm send actor error logging in the edge case where an internal send errors but the error is dropped which can occur in the case of programmer error in calls from reward and cron.

@ZenGround0 ZenGround0 requested a review from a team as a code owner July 28, 2021 19:03
@@ -391,7 +391,7 @@ func (rt *Runtime) Send(to address.Address, method abi.MethodNum, m cbor.Marshal
if err.IsFatal() {
panic(err)
}
log.Warnf("vmctx send failed: to: %s, method: %d: ret: %d, err: %s", to, method, ret, err)
log.Warnf("vmctx send failed: from: %s to: %s, method: %d: ret: %d, err: %s", rt.Receiver(), to, method, ret, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this ret look like when printed? Is that coherent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is currently on latest code we should check the mainnet logs and find out :)

I think %x will probably be better so we can get hex of cbor bytes and we could make that change here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking more closely internalSend should only return a non empty ret value in the case send returns a non empty ret value. This will only return non empty ret if shimCall returns non empty ret which can only happen if shimCall does not return an error (either from marshalling ret or an abort from within the actor method being shimmed). This means printing ret should be strictly redundant since it is always empty.

There are only a few types of errors I see on mainnet but they all print [] for ret so that supports this line of reasoning.

@ZenGround0 ZenGround0 force-pushed the feat/print-runtime-send-update branch from d46f99b to e09a25c Compare July 28, 2021 22:26
@Stebalien Stebalien enabled auto-merge July 29, 2021 01:55
@Stebalien Stebalien merged commit ca76822 into master Jul 29, 2021
@Stebalien Stebalien deleted the feat/print-runtime-send-update branch July 29, 2021 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants