Insufficient resources: could not allocate code memory #10374
Labels
A-contract-runtime
Area: contract compilation and execution, virtual machines, etc
C-good-first-issue
Category: issues that are self-contained and easy for newcomers to work on.
T-contract-runtime
Team: issues relevant to the contract runtime team
I started getting the error:
LoadingError("Insufficient resources: could not allocate code memory: Cannot allocate memory (os error 12)")
while running tests on my CI after switching to thenear-vm-runner = "0.19"
. But at the same time, I don't get such an error locally on my M2 laptop. Firstly, I thought that it could be related to different architectures, but then I decreased the number of threads for running tests on the CI (which uses 64 core runner by default) and the error didn't occur. I started some code investigation and found that there is only one mempool is used for all parallel running tests. After changing thecount
value from 8 to num cpus in my fork and use it instead of dependencies from crates.io fixed the issue and the started passing.To Reproduce
Use heavy smart contract in
near-vm-runner
(in my case, it's about 1.2 mb) in tests running parallel on a host with >= 32 CPUs.Expected behaviour
CPU number on the host shouldn't affect the result of running tests.
Screenshots
If applicable, add screenshots to help explain your problem.
Version (please complete the following information):
The text was updated successfully, but these errors were encountered: