-
Notifications
You must be signed in to change notification settings - Fork 467
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
docs(EXC-1744): Document canister backtraces #5185
base: master
Are you sure you want to change the base?
docs(EXC-1744): Document canister backtraces #5185
Conversation
docs/developer-docssmart-contracts/advanced-features/simd.mdx @dfinity/execution | ||
docs/developer-docssmart-contracts/advanced-features/periodic-tasks.mdx @dfinity/execution | ||
docs/developer-docs/smart-contracts/advanced-features/simd.mdx @dfinity/execution | ||
docs/developer-docs/smart-contracts/advanced-features/periodic-tasks.mdx @dfinity/execution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change, just fixing a typo.
🤖 Here's your preview: https://hjalc-kqaaa-aaaam-abagq-cai.icp0.io |
|
||
<MarkdownChipRow labels={["Intermediate", "Tutorial", "Motoko", "Rust"]} /> | ||
|
||
## Intro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Intro |
|
||
## Intro | ||
|
||
Are you developing a Rust or Motoko <GlossaryTooltip>canister</GlossaryTooltip> encountering a confusing trap? Backtraces may help you pinpoint the location of the error. When canisters trap, ICP reports backtraces which contain the names of functions in the call stack. For example, if the following Rust canister accidentally performs an out of bounds access of stable memory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you developing a Rust or Motoko <GlossaryTooltip>canister</GlossaryTooltip> encountering a confusing trap? Backtraces may help you pinpoint the location of the error. When canisters trap, ICP reports backtraces which contain the names of functions in the call stack. For example, if the following Rust canister accidentally performs an out of bounds access of stable memory: | |
When canisters trap, ICP reports backtraces that contain the names of functions in the call stack. Backtraces are added to the canister logs and if the caller has [access to canister logs](/docs/current/developer-docs/smart-contracts/maintain/logs#log-visibility) they will also be included in the message error response. | |
For example, if the following Rust canister accidentally performs an out of bounds access of stable memory: |
} | ||
``` | ||
|
||
then the resulting stable memory out of bounds error will also contain the following backtrace which can help determine that the error is in `inner_2` which is reached via `outer` and `inner`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then the resulting stable memory out of bounds error will also contain the following backtrace which can help determine that the error is in `inner_2` which is reached via `outer` and `inner`: | |
The resulting stable memory out of bounds error will also contain the following backtrace which can help determine that the error is in `inner_2` which is reached via `outer` and `inner`: |
_wasm_backtrace_canister::outer | ||
``` | ||
|
||
## Where to find backtraces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Where to find backtraces |
|
||
## Where to find backtraces | ||
|
||
Backtraces are added to the canister logs and if the caller has [access to canister logs](/docs/current/developer-docs/smart-contracts/maintain/logs#log-visibility) they will also be included in the message error response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backtraces are added to the canister logs and if the caller has [access to canister logs](/docs/current/developer-docs/smart-contracts/maintain/logs#log-visibility) they will also be included in the message error response. |
EXC-1744: https://dfinity.atlassian.net/browse/EXC-1744
Thank you for your contribution to the IC Developer Portal. This repo contains the content for https://internetcomputer.org and the ICP Developer Documentation, https://internetcomputer.org/docs/.
If you are submitting a Pull Request for adding or changing content on the ICP Developer Documentation, please make sure that your contribution meets the following requirements:
.mdx
file format to support the previous two components./sidebars.js
, otherwise, it will not appear in theside navigation bar.
.github/CODEOWNERS
file isfilled with new documents that you added. This way we can ensure that future Pull Requests are reviewed by the right people.