-
Notifications
You must be signed in to change notification settings - Fork 1.5k
gt lastNum error reported when synchronizing blocks #6310
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
Comments
@jakamobiii Can you post the interaction information with node 146.190.13.115? Use the command |
@jakamobiii It's similiar to that issue #6272. |
@xxo1shine The following is the final interactive information.
|
@jakamobiii Thank you for providing the log. From the log information, it should be caused by the following logic.
Further analysis is needed to determine what scenarios will trigger this situation. |
@jakamobiii There is a concurrency problem between the
The probability of this scenario occurring is extremely low, which will cause the connection to be disconnected. It currently has little impact on the system and will not affect block synchronization and broadcasting. |
What is the approximate value of this low probability? Is there an estimated figure? |
@abn2357 There is no exact statistical value, it is estimated that it will only appear once every few days, and it has no impact on the system. |
My understanding is that the first |
@abn2357 The second time is triggered when processing the BLOCK_CHAIN_INVENTORY message. |
@xxo1shine Could you show the detail code position, thx. |
@abn2357 Refer to the
When the |
@abn2357 Maybe my description above is not accurate. It may be that the |
Triggering |
@abn2357 This description might be clearer.
|
@xxo1shine |
@abn2357 As described above, the |
@xxo1shine After
you mean block processing thread process 71447147, 71447148, 71447149 in a very short time so that when peer thread check peer.getSyncBlockToFetch().isEmpty() = true? |
@abn2357 When the following code is executed, set
|
process the 3 blocks and make getSynBlockToFetch to empty, but when pop the element of getSynBlockToFetch, it will also update blockBothHave |
@abn2357 Since the variable blockBothHave is not modified by Even if the block processing thread modifies the value, the value read by the peer thread is still 71447146 due to CPU cache.. |
Yes, Thx, this is really a possibility. Since there are no logs of the peer, we don’t know if this is the real reason. |
@xxo1shine hey buddy, I have a puzzle about one of |
@abn2357 TCP will not lose packets. As long as it is sent, it will be received. If it cannot be received, the peer status check will disconnect the connection. Refer to this function |
What are the benefits of setting peer.blockBothHave here in advance compared to setting it after confirming receipt? Logically, it should be set after confirming receipt. |
@abn2357 This is two nodes communicating. A sends a block to B. How does A know when B receives it? |
I mean when B receives the block, B set blockBothHave,As for when A should set blockBothHave, is there any other more logical approach? |
@abn2357 A sends B block 100, A sets |
Software Versions
OS : Linux
JVM : Oracle Corporation 1.8.0_161 amd64
Version : 4.8.0
Expected behavior
The node is running normally and no exception should be thrown.
Actual behavior
I deployed a node online and found an exception while checking the logs. I want to know what the specific error is, whether it has any impact on the system, and whether it will affect block synchronization or data consistency?
Frequency
Only appeared once.
The text was updated successfully, but these errors were encountered: