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

Simulator attempts to get genesis block prematurely before Besu finished starting #802

Open
ensi321 opened this issue Jul 19, 2023 · 1 comment

Comments

@ensi321
Copy link

ensi321 commented Jul 19, 2023

This issue is discovered as part of the effort of fixing up the failed consensus tests on Besu hyperledger/besu#5689

Description

Occasionally, simulator fails to get genesis block in a test by showing the following error message:
can't get genesis: Post "http://172.17.0.9:8545": dial tcp 172.17.0.9:8545: connect: connection refused
This is due to api call was made while Besu was still initializing. This appears to happen at random, a failed test that has this error in current run may pass in the next run. I am unable to reproduce this issue on my local machine. The associated failed tests on https://hivetests.ethdevops.io ran fine on my local.

Example

pointMulAdd2_d31g0v0_London on Jul 6 run (log) failed but passed on Jul 12 run (log)
envInfo_d3g0v0_Merge passed on Jul 6 (log) but failed on Jul 12 (log)

Normally after Besu starts, there should be a message Ethereum main loop is up. indicating it is ready to receive rpc requests. This is shown on Jul 12 log, but Jul 6 log indicates Besu was abruptly stopped while it was still initializing.

Speculation

It could be StartClient() did not correctly determine if Besu is ready to receive requests. The retry mechanism in getBlock() did get triggered but failed on both first and second attempt and there lacked a waiting time between the two attempts

@fjl
Copy link
Collaborator

fjl commented Jul 19, 2023

Hive polls the client container's TCP port 8545 every 100ms until it comes up, then signals to the test the client is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants