0.6.24 Testnet Deployment Bug

I’m having issues upgrading / reinstalling Motoko canister code on the IC.

I tried modes upgrade and reinstall but each time it returns:

The Replica returned an error: code 5, message: "Canister 5ifwd-tyaaa-aaaab-aaifq-cai exceeded its allowed memory allocation"

The code doesn’t have any init stuffs either. Just a basic hello-world canister. The WASM is 363Kbs too.

The code (ignore the obv bug accepting cycles in a query)

import ExperimentalCycles "mo:base/ExperimentalCycles";

actor {
    public query func greet(name : Text) : async Text {
        let _ = ExperimentalCycles.accept(1000);
        return "Hello, " # name # "!";
    };

    public query func cycles() : async Nat {
        return ExperimentalCycles.balance();
    }
};

A few people have been getting this error on 0.6.24, @ililic did you track down the cause of this in the end?

1 Like

5ifwd-tyaaa-aaaab-aaifq-cai appears to be my wallet canister? :confused:

Working off the above - Creating a new identity appears to have let me work around the issue. I interacted with the last wallet canister, and actually loaded into the UI. Maybe that has something to do with it? It looked like the wallet canister had some tracking in it.

Hey Hazel, this is an issue we’ve seen locally and fixed! But unfortunately our latest internal dfx release (0.6.25) hasn’t picked up updates to the wallet canister yet. The reason you (and maybe others) see this is b/c the wallet bundled with 0.6.24 is installed with very little memory allocation (~10 mb.) We’ll have a new dfx version soon & it will have the updated wallet with beefier memory allocation.

There’s also another limitation in dfx that’s being workded on: we don’t have a great story for managing your wallet like you manage your other canisters yet (like updating the wasm module, fiddling with the memory allocation.) But that’s around the corner too. I’ll reply in this thread to keep you and others updated wrt to this issue.

6 Likes

@prithvi - Gotcha, thank you!!

Thanks for this update. So if we’re blocked with this what do we do? Only develop locally? How long will a fix take?

I’m really glad other people have had this issue as well, it was wreaking some havoc today

Expect it in the next release of dfx, early next week. Thanks for your patience. If you are blocked on Sodium, then please continue locally. Alternatively 0.6.23 is still available and if you’d like you can use that version to deploy/develop on Sodium too

1 Like

Hi all,
We released a targeted hotfix release: 0.6.26. This should fix the memory allocation issue you’re seeing on Sodium. We found that the issue was in the rust CDK and the memory allocator we were using. So I’d advise you guys to use 0.6.26 if you want to play around with wallets.
There is a manual step you’ll need to do:
open ~/.config/dfx/identity/default/wallets.json
You should see

{
  "identities": {
    "default": {
      "ic": "your wallet principal",
    }
  }
}

Delete this “ic” line. This will manually disassociate the wallet associated with your default identity on the ic network i.e. Sodium
There are more q.o.l. changes coming the pipeline with how you manage your wallet, identity, etc. but we also have some spicy changes that are blocking that release right now. Thanks for your patience.

2 Likes