foundry: `Text file busy (os error 26)` due to race condition in SVM when doing multiple installations
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
nightly
What command(s) is the bug in?
forge build
Operating System
Linux
Describe the bug
Our monorepo has a bunch of packages, each using foundry nightly in CI (via foundry-rs/foundry-toolchain@v1). Each of these use forge build in their build step and we recently tried to turn on parallel builds (via pnpm), but it failed with
Text file busy (os error 26)
The logs weren’t specific about where this was coming from, but I later saw a log line that mentioned solc-0.8.13:

Unclear if this is a foundry issue or solc issue, but it originates from forge build, so I’m starting here.
Ultimately would like to be able to run forge build for multiple foundry projects in parallel. Is this an issue with some sort of global cache? Or strictly just a ulimit thing?
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 3
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Install `solc` through `svm` This is to work around a race condition for `forge build`: https://github.com/foundry-rs/foundry/issues/4736 — committed to runtimeverification/evm-semantics by tothtamas28 3 years ago
- Install `solc` through `svm` This is to work around a race condition for `forge build`: https://github.com/foundry-rs/foundry/issues/4736 — committed to runtimeverification/evm-semantics by tothtamas28 3 years ago
- Install `solc` through `svm` This is to work around a race condition for `forge build`: https://github.com/foundry-rs/foundry/issues/4736 — committed to runtimeverification/evm-semantics by tothtamas28 3 years ago
- Install `solc` through `svm` This is to work around a race condition for `forge build`: https://github.com/foundry-rs/foundry/issues/4736 — committed to runtimeverification/evm-semantics by tothtamas28 3 years ago
- Port Foundry tests to Python (#1904) * Add `test_foundry_prove` * Add `test_foundry_bmc` * Add `test_foundry_kompile` * Add `test_foundry_fail` * Check `foundry_show` output * Remove `make` rule... — committed to runtimeverification/evm-semantics by tothtamas28 3 years ago
- Port Foundry tests to Python (#1904) * Add `test_foundry_prove` * Add `test_foundry_bmc` * Add `test_foundry_kompile` * Add `test_foundry_fail` * Check `foundry_show` output * Remove `make` rule... — committed to runtimeverification/evm-semantics by tothtamas28 3 years ago
- Try to fix issue https://github.com/foundry-rs/foundry/issues/4736 — committed to EspressoSystems/optimism-espresso-integration by philippecamacho a year ago
- Try to fix issue https://github.com/foundry-rs/foundry/issues/4736 — committed to EspressoSystems/optimism-espresso-integration by philippecamacho a year ago
- Try to fix issue https://github.com/foundry-rs/foundry/issues/4736 — committed to EspressoSystems/optimism-espresso-integration by philippecamacho a year ago
- Try to fix issue https://github.com/foundry-rs/foundry/issues/4736 — committed to EspressoSystems/optimism-espresso-integration by philippecamacho a year ago
since we already have is in forge, seems like there is actually a use case for an install solc subcommand
at LUKSO with the lsp-smart-contracts, we fixed it by running
forge buildfirst as well in the CI and settingforge testas dependant on thebuildcommand in theturbo.jsonfirst.See this commit for details: https://github.com/lukso-network/lsp-smart-contracts/pull/894/commits/25ba13438c0336cc99222f0e74222403e837f23f
yes, missing solc bins are lazily installed during
forge build, looks like the file lock in svm that should prevent these cases where two processes potentially write to and execute the same binary isn’t working as expectedThis should be bypassed if you trigger forge b once before starting the parallel job
https://stackoverflow.com/a/16764967/6242846