-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
bug(forge coverage
): random setUp
failed errors
#6442
Comments
Ended up running into a similar issue with CI executing |
@bearpebble I'm attempting to reproduce this issue but running into stack too deep errors when running @0xfuturistic I've been able to run the test suite without issue: ethereum-optimism/optimism#8705 (comment) but am unable to run I'll leave the issue open for now but would greatly appreciate a minimal reproduction if you are able to narrow it down or further instructions on running |
forge coverage
): random setUp
failed errors
@zerosnacks I think we can close this one?
as for the other issue reported, coverage disables any optimization which results in code not being able to be compiled, see ethereum-optimism/optimism#8705 (comment) |
Marking as |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (89f74f2 2023-11-23T00:16:20.422885370Z)
What command(s) is the bug in?
forge coverage
Operating System
Linux
Describe the bug
Running
forge coverage
for the optimism tests sometimes leads to missing random parts of coverage.Specifically, it would print
setUp failed reason=execution error contract=0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496
whenever some coverage was missing.The
forge test
command never exhibited that issue, so I'm assuming only the coverage command is affected.The command never really fails, it just has missing coverage due to the above mentioned error while running the
setUp
function.I finally managed to get it to fail while using
RUST_LOG=trace
and found that all of the failures had a similar pattern.One actual trace snippet (there are several this run)
The full trace can be found here:
https://drive.google.com/file/d/1VefltIFYAH1GULCmOkt7S5TWch3nToj_/view?usp=sharing
Because of this pattern and the execution only failing sometimes, I'm assuming it's a race condition.
Reproducing the issue is unfortunately not very consistent and it seems to fail more frequently on CI tests compared to local execution. I hope the trace is enough to find the root cause.
The text was updated successfully, but these errors were encountered: