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

Under heavy load eth_estimateGas returns INTERNAL_ERROR #6344

Closed
matthew1001 opened this issue Jan 3, 2024 · 1 comment · Fixed by #6345
Closed

Under heavy load eth_estimateGas returns INTERNAL_ERROR #6344

matthew1001 opened this issue Jan 3, 2024 · 1 comment · Fixed by #6345
Assignees
Labels
bug Something isn't working

Comments

@matthew1001
Copy link
Contributor

matthew1001 commented Jan 3, 2024

Description

Running a moderately high workload using caliper, after ~ 2000 transactions eth_estimateGas returns INTERNAL_ERROR to the caliper WS client

Command that was run to start Besu (single validator):

besu --data-path=data --genesis-file=../genesis.json --min-gas-price=0 --sync-mode=FULL --rpc-http-enabled --rpc-ws-enabled --rpc-http-apis=DEBUG,TXPOOL,WEB3,ETH,TRACE,QBFT,ADMIN --tx-pool-limit-by-account-percentage=0.20 --rpc-ws-max-active-connections=300 --tx-pool=sequenced -l TRACE

Logs

I've pinned it down to this code block:

final BlockHeader blockHeader = blockHeader();
if (blockHeader == null) {
    return errorResponse(requestContext, RpcErrorType.INTERNAL_ERROR);
}

return errorResponse(requestContext, RpcErrorType.INTERNAL_ERROR);

It was difficult to pin down the offending line using TRACE but adding a new Exception().printStackTrace() to the JsonRpcErrorResponse(...) constructor gave the stack trace:

java.lang.Exception
        at org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse.<init>(JsonRpcErrorResponse.java:47)
        at org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.AbstractEstimateGas.errorResponse(AbstractEstimateGas.java:135)
        at org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.AbstractEstimateGas.errorResponse(AbstractEstimateGas.java:130)
        at org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.EthEstimateGas.response(EthEstimateGas.java:53)
        at org.hyperledger.besu.ethereum.api.jsonrpc.execution.BaseJsonRpcProcessor.process(BaseJsonRpcProcessor.java:44)
        at org.hyperledger.besu.ethereum.api.jsonrpc.execution.JsonRpcExecutor.execute(JsonRpcExecutor.java:92)
        at org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketMessageHandler.lambda$handle$1(WebSocketMessageHandler.java:90)
        at io.vertx.core.impl.ContextBase.lambda$null$0(ContextBase.java:137)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
        at io.vertx.core.impl.ContextBase.lambda$executeBlocking$1(ContextBase.java:135)
        at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:833)

Once I've got a fix in place I might add some additional TRACE logs in EthEstimateGas wherever an INTERNAL_ERROR is returned, to make diagnosing similar issues a little quicker.

@matthew1001 matthew1001 added the bug Something isn't working label Jan 3, 2024
@matthew1001 matthew1001 self-assigned this Jan 3, 2024
@matthew1001
Copy link
Contributor Author

Looks to be the same issue as #6143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant