a16z / halmos

A symbolic testing tool for EVM smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test keeps killing itself (timing out)

Renzo1 opened this issue · comments

My halmos test keeps killing itself (timing out) despite setting it to run indefinitely. I am following the recent Cyfrin Updraft course where Patrick teaches how to use Halmos. In one of the examples, there is a bug planted in the code and expected to be caught using Halmos, but the test keeps timing out after approximately 5 minutes despite setting the -solver-timeout-assertion flag to 0.

I expected it to run until it found the bug or I killed the run manually, but it kept killing itself, even when I bumped up the timer to a high value like 10000000.

command

halmos --function check_testMulWadUpFuzz --solver-timeout-assertion 0

or 


halmos --function check_testMulWadUpFuzz --solver-timeout-assertion 10000000

Output

[⠔] Compiling...
[⠢] Compiling 21 files with 0.8.22
[⠑] Solc 0.8.22 finished in 6.80s
Compiler run successful!

Running 1 tests for test/MathMasters.t.sol:MathMastersTest
Killed

Please what could be the possible reason?

Environment:

  • OS: Linux Ubuntu
  • Python version: Python 3.12.2
  • Halmos and other dependency versions: Halmos 0.1.11

Codebase: https://github.com/Cyfrin/2-math-master-audit

--solver-timeout-assertion 0 is the correct flag, meaning that halmos won't interrupt solvers

it sounds like you're maybe running out of memory? You may want to inspect your logs (with something like dmesg | grep -i 'oom_killer') and try changing the max memory setting for your processes (ulimit -m XYZ)

Well, this is weird. I tried it again today and it worked fine. But I think you are, its likely a memory issue, cause I was running several application at once last time I tried it.

Thanks for the help