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

StackOverflow on recursive call to MergeCoordinator.isDecendantOf() #4169

Closed
jflo opened this issue Jul 26, 2022 · 2 comments · Fixed by #4171
Closed

StackOverflow on recursive call to MergeCoordinator.isDecendantOf() #4169

jflo opened this issue Jul 26, 2022 · 2 comments · Fixed by #4171
Assignees
Labels
bug Something isn't working mainnet TeamChupa GH issues worked on by Chupacabara Team

Comments

@jflo
Copy link
Contributor

jflo commented Jul 26, 2022

Kiln is now old enough (over 200k blocks since TTD) that the recursive nature of this method will blow stack:

issue on Kiln with ExecutionEngineJsonRpcMethod | failed to exec consensus method engine_forkchoiceUpdatedV1. what could be the cause? the Besu node is connected to a lighthouse beacon. logs in the thread.

at org.hyperledger.besu.consensus.merge.blockcreation.MergeCoordinator.isDescendantOf(MergeCoordinator.java:536) ││ 2022-07-22 14:16:23.052+00:00 | vert.x-eventloop-thread-2 | ERROR | ExecutionEngineJsonRpcMethod | failed to exec consensus method engine_forkchoiceUpdatedV1 │
│ java.lang.StackOverflowError ││ at org.hyperledger.besu.ethereum.rlp.RLPEncodingHelpers.isSingleRLPByte(RLPEncodingHelpers.java:28) │
│ at ....

Method needs to be refactored into a non-recursive pattern, since the distance from TTD will only increase as long as the network is alive.

@jflo jflo self-assigned this Jul 26, 2022
@jflo
Copy link
Contributor Author

jflo commented Jul 26, 2022

Example of recursion on kiln:

2022-07-26 13:57:51.786+00:00 | vert.x-worker-thread-0 | DEBUG | MergeCoordinator | checking if block 683190:0x724b715167e6e6bfcfd6bba72d4fe53eaaa9a713bb3019a9ffc4c86f1c75f7db is ancestor of ││ 898383:0xc05624d989966c207cf8b65aa671263ecd6847829864ffdd9e4ace8abc15cb7b │
│ besu-node 2022-07-26 13:57:51.786+00:00 | vert.x-worker-thread-0 | DEBUG | MergeCoordinator | checking if block 683190:0x724b715167e6e6bfcfd6bba72d4fe53eaaa9a713bb3019a9ffc4c86f1c75f7db is ancestor of ││ 898382:0xe942c75bf533e1d5f782f9609c3cd4ef3fdb8d4f48b08b8edaabde6d14bb7712 │
│ besu-node 2022-07-26 13:57:51.786+00:00 | vert.x-worker-thread-0 | DEBUG | MergeCoordinator | checking if block 683190:0x724b715167e6e6bfcfd6bba72d4fe53eaaa9a713bb3019a9ffc4c86f1c75f7db is ancestor of ││ 898381:0x9e7f27b1430ee7584d4f5bd09ef917392afd728f81df250f4589f5dff7132589 │
│ besu-node at org.hyperledger.besu.consensus.merge.blockcreation.MergeCoordinator.lambda$isDescendantOf$23(MergeCoordinator.java:536) ││ besu-node at java.base/java.util.Optional.map(Optional.java:265) │
│ besu-node at org.hyperledger.besu.consensus.merge.blockcreation.MergeCoordinator.isDescendantOf(MergeCoordinator.java:536) ││ besu-node at org.hyperledger.besu.consensus.merge.blockcreation.MergeCoordinator.lambda$isDescendantOf$23(MergeCoordinator.java:536)

@non-fungible-nelson non-fungible-nelson added bug Something isn't working mainnet TeamChupa GH issues worked on by Chupacabara Team labels Jul 26, 2022
@jflo
Copy link
Contributor Author

jflo commented Jul 26, 2022

If you can reproduce this, I'm curious to see complete logs from startup to stack error for both Besu and whatever CL was used. I'm curious how besu tried to determine the descendant of a block that was 200k blocks past the finalized one. Thats a weird edge case that I'm not entirely sure how to reproduce.

@jflo jflo mentioned this issue Jul 26, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mainnet TeamChupa GH issues worked on by Chupacabara Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants