foundry icon indicating copy to clipboard operation
foundry copied to clipboard

`forge test -vvvvv` overflowed my disk or memory on forked environment

Open StackOverflowExcept1on opened this issue 3 weeks ago • 1 comments

Component

Forge

Have you ensured that all of these are up to date?

  • [x] Foundry
  • [ ] Foundryup

What version of Foundry are you on?

1.5.0-stable

What version of Foundryup are you on?

1.4.0

What command(s) is the bug in?

forge test -vvvvv

Operating System

Linux Ubuntu 25.10 x86_64

Describe the bug

ref https://github.com/gear-tech/gear-bridges/pull/764

I didn't understand what happened, but my computer just froze. Logging in to tty1-tty6 stopped working, as often happens when memory gets full. The second time I tried to reproduce this, Ubuntu gave me notification that my disk was full. I decided to check du -sh ~/.foundry and then the size of anvil folder was about 600 MB.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           6.2G  2.9M  6.2G   1% /run
/dev/nvme0n1p1  233G  181G   41G  82% /
tmpfs            16G  3.8M   16G   1% /dev/shm
efivarfs        384K   93K  287K  25% /sys/firmware/efi/efivars
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
tmpfs           5.0M   12K  5.0M   1% /run/lock
tmpfs            16G   14M   16G   1% /tmp
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-resolved.service
/dev/nvme0n1p2  1.1G  6.3M  1.1G   1% /boot/efi
tmpfs           3.1G  236K  3.1G   1% /run/user/1000
tmpfs           8.0G     0  8.0G   0% /mnt/tmpfs

$ free -m
               total        used        free      shared  buff/cache   available
Mem:           31410        2872       26820         432        2554       28537
Swap:           4095         435        3660

$ forge --version
forge Version: 1.5.0-stable
Commit SHA: 1c57854462289b2e71ee7654cd6666217ed86ffd
Build Timestamp: 2025-11-26T09:14:24.173470686Z (1764148464)
Build Profile: maxperf

$ foundryup --version
foundryup: 1.4.0

$ git clone --recurse-submodules --branch av/mq-update-verifier https://github.com/gear-tech/gear-bridges.git
$ cd gear-bridges/ethereum
$ cp .env.example.mainnet .env
$ source .env
$ forge test -vvvvv # this command overflowed disk/ram

memory size: 32 GB swap size: 4 GB free disk space: ~40 GB

StackOverflowExcept1on avatar Dec 05 '25 23:12 StackOverflowExcept1on

thank you, most probably related to backtraces, we had to bump them on -vvvv because they are too greedy https://github.com/foundry-rs/foundry/pull/12211

grandizzy avatar Dec 06 '25 09:12 grandizzy