Panicked at 'capacity overflow'

When interacting with a canister I deployed to ic, I get the following error when trying to update stable memory:

(I am having no issues when running locally)

Error: Call was rejected:
  Request ID: eb6...
  Reject code: 5
  Reject text: Error from Canister 7w3i7-3iaaa-aaaal-qi2iq-cai: 
  Canister called `ic0.trap` with message: Panicked at 
  'capacity overflow', library/alloc/src/raw_vec.rs:25:5.

Perhaps am I misstreating stable memory somehow? I am compiling the canister to WASI and am saving some files with fs. Disabled those saves but error remained.

Tagging @sgaflv since it might be related to WASI. Also pinging other bigbrains @icpp @ulan @lastmjs

Am I doing something weird in my stable memory setup?

catts-app/packages/catts_engine/src/lib.rs at f44ac6f416857e96d2fe2665c3ef17618ec89093 · c-atts/catts-app · GitHub

Or in the canister call that triggers the error?

catts-app/packages/catts_engine/src/recipe/rpc/recipe_create.rs at f44ac6f416857e96d2fe2665c3ef17618ec89093 · c-atts/catts-app · GitHub

Any ideas appreciated. :sunglasses:

2 Likes

@kristofer would you be able to share a full stack trace? I see the panic isn’t happening in your code-base but I can’t tell in what library exactly.

Thanks, I am not sure I can produce a better stack trace since the panic is happening outside of my codebase. Canister call is terminated and this is returned to the client:

Or maybe I can catch the trap in my canister and produce a stacktrace?

After upgrading the toolchain, clearing all caches, swearing a bit, waiting a few days and redeploying, this issue seems to be gone. :joy:

3 Likes

it’s the “waiting for a few days” that did the trick hehe

1 Like

The cosmic energies needed aligning, the moon was in the wrong phase