You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Programs built with solana 1.18.x experience new stack size related issues.
Details
We started having issues after migrating from solana 1.16.16 and anchor 0.28.0 to solana 1.18.11 and anchor 0.29.0.
Started getting messages when building informing us of our ix using too much stack, i.e:
Error: Function _ZN145_$LT$adrena..instructions..add_custody..AddCustody$u20$as$u20$anchor_lang..Accounts$LT$adrena..instructions..add_custody..AddCustodyBumps$GT$$GT$12try_accounts17h13b564b67762dd31E Stack offset of 4232 exceeded max offset of 4096 by 136 bytes, please minimize large stack variables
Then at runtime:
'Program 76FLzSMB8xPPt2y4ZKWeMiQBnXnqvU2xyJtc4PogsxMa consumed 2523 of 200000 compute units',
'Program 76FLzSMB8xPPt2y4ZKWeMiQBnXnqvU2xyJtc4PogsxMa failed: Access violation in stack frame 5 at address 0x200005ff0 of size 8'
Hotfixed the issue by splitting IXs and migrating accounts to use zero_copy.
We have noticed that the init of accounts takes a lot of stack, 800 bytes+. Can't have more than 3 accounts to init within the same instruction atm.
Note: Even when testnet tests works, it may still fail on devnet.
Problem
Programs built with solana 1.18.x experience new stack size related issues.
Details
We started having issues after migrating from solana
1.16.16
and anchor0.28.0
to solana1.18.11
and anchor0.29.0
.Started getting messages when building informing us of our ix using too much stack, i.e:
Then at runtime:
Hotfixed the issue by splitting IXs and migrating accounts to use
zero_copy
.We have noticed that the
init
of accounts takes a lot of stack, 800 bytes+. Can't have more than 3 accounts toinit
within the same instruction atm.Note: Even when testnet tests works, it may still fail on devnet.
Setup:
Using https://github.com/anza-xyz/platform-tools/releases v1.41 to compile.
Related
Found an issue here talking about platform tools growing stack usage.
Proposed Solution
The text was updated successfully, but these errors were encountered: