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

Lowers test's account data size to avoid hitting MaxLoadedAccountsDataSizeExceed #28814

Conversation

brooksprumo
Copy link
Contributor

Problem

@jeffwashington informed me that #28690 was failing in CI due to an error in test_accounts_data_size_and_resize_transactions():
https://buildkite.com/solana-labs/solana/builds/85042#01847837-100f-41b7-af5a-fe94c67358f6

Running locally, I observed this test failing intermittently will this error:

[2022-11-15T14:29:15.554837000Z DEBUG solana_runtime::bank] tx error: MaxLoadedAccountsDataSizeExceeded SanitizedTransaction { message: Legacy(LegacyMessage { message: Message { header: MessageHeader { num_required_signatures: 1, num_readonly_signed_accounts: 0, num_readonly_unsigned_accounts: 1 }, account_keys: [J6MEcxb4f4oeePxv1RvzCyzhfXpi8SkJUAMfEWCLNSRh, 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP, 7QmP1NzaR3SfDfKZBZ28LM6Wt4ii19AAFM2jMWcZJDg1, 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM], recent_blockhash: FpCi9pXxubub4F7qpceqpiPf8xPvkSvw6Rt8jELWAm3Q, instructions: [CompiledInstruction { program_id_index: 3, accounts: [2, 1], data: [0, 0, 0, 0, 89, 160, 64, 0, 0, 0, 0, 0, 0, 232, 118, 72, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }] }, is_writable_account_cache: [true, true, true, false] }), message_hash: 9yxLvvz7xaQMm8cs5b3jGXsEm6xjZdn7MaEVbemmbssr, is_simple_vote_tx: false, signatures: [3tBZnNkr3Z7Rdk5dXxv1WWDvUkdzwWRYnqi5VG5wBKyRg8YiT1y2hmnAj7JNZghCEdH9hy1VMraRpawpNiazpDgv] }

This test grows and shrinks accounts to ensure their data size is tracked correctly by the bank. The initial data size and the grow/shrink size are randomly generated, which explains how this test could fail intermittently.

Zooming in, we see the error is MaxLoadedAccountsDataSizeExceeded, which is new as of #27840.

So test_accounts_data_size_and_resize_transactions() fails when the account size triggers MaxLoadedAccountsDataSizeExceeded.

Summary of Changes

Lower the bounds for the accounts size to ensure MaxLoadedAccountsDataSizeExceeded is not hit.

Copy link
Contributor

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

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

lgtm. ty!

@brooksprumo brooksprumo added the automerge Merge this Pull Request automatically once CI passes label Nov 15, 2022
@mergify mergify bot merged commit ac9b117 into solana-labs:master Nov 15, 2022
@brooksprumo brooksprumo deleted the fix/test_accounts_data_size_and_resize_transactions branch November 15, 2022 17:14
xiangzhu70 pushed a commit to xiangzhu70/solana that referenced this pull request Nov 16, 2022
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants