Skip to content
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

eth/catalyst SimulatedBeacon can spinloop when txpool closing and doCommit closing race #31327

Open
eljobe opened this issue Mar 6, 2025 · 0 comments · May be fixed by #31328
Open

eth/catalyst SimulatedBeacon can spinloop when txpool closing and doCommit closing race #31327

eljobe opened this issue Mar 6, 2025 · 0 comments · May be fixed by #31328
Labels

Comments

@eljobe
Copy link

eljobe commented Mar 6, 2025

System information

Any version after 84565dc

Expected behaviour

Tests gracefully shutdown the SimulatedBeacon when Stop is called.

Actual behaviour

If the txpool is terminated during the call to Commit in the tight inner loop here:
https://github.com/ethereum/go-ethereum/blob/master/eth/catalyst/simulated_beacon_api.go#L73

Then, the inner loop will continue to spew out Warn level log messages for several seconds which causes excessive disk i/o.

Steps to reproduce the behaviour

In the OffchainLabs/nitro repo, we have a test that consistently triggered this race because it loops over a function which brings up a simulated geth backend with a simulated beacon, and sends a bunch of transactions, and then shuts the stack down again. With 15 consecutive calls, the race was all-but certain to happen.

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

I have a fix in our fork of go-ethereum that I'll send shortly referencing this issue.

@eljobe eljobe added the type:bug label Mar 6, 2025
eljobe added a commit to eljobe/go-ethereum that referenced this issue Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant