-
Notifications
You must be signed in to change notification settings - Fork 1k
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
"Operation is not valid due to the current state of the object" error when consensus node handle 512 txs #1410
Comments
The error it's located here I will review it @cloud8little the error appear with only one CN ? |
@shargon It happens on all consensus nodes |
Error replicated successful, I will try to solve it soon. Thanks for your detailed explanation @cloud8little ! |
For replicate the error you must have 2 address in the same wallet. One with all the GAS (30m), and the other with 0. |
Without Parallel Verification, this doesn't happen @erikzhang. |
@shargon As I see from this report, error occurs on at neo/src/neo/Ledger/Blockchain.cs Line 503 in fc1a64b
Is there any relationship with VM execution? neo/src/neo/Ledger/Blockchain.cs Lines 499 to 500 in fc1a64b
I'm confused with the error location and the cause. |
No problems with VM, the main reason is the mempool balance check, which lead to package txs without enough balance. This has happened before. |
yes it's while |
@shargon I reproduced this problem, and found that the problem was on |
@shargon @eryeer was right, the root cause is ReferenceCounter.CheckZeroReferred() <= MaxStackSize return false, and leads to VM execute state as FAULT. After I changed MaxStackSize as 2 * 2 * 1024, the CN service will recover. and no exception throws. |
Great! I will review it. But maybe we have two errors... |
@eryeer this dosen't solve the main issue, where are more than 2k items? Also there are another issue... related to this one I will reopen my PR |
We have two problems here: 1- With 512 Tx, Gas contract produce 4 items per notification, and we raise the maximum numbers of stack items (FAULT), this is the initial problem described by @cloud8little |
Maybe we should consider to rollback the snapshot, and |
According to the issue 1, I prefer to skip protected override bool PostExecuteInstruction(Instruction instruction)
{
if (Trigger == TriggerType.System) return true;
return base.PostExecuteInstruction(instruction);
} |
I created new issue for the second problem #1420 |
It's a good idea to skip ReferenceCounter for System Trigger. |
Agree, it's better to close the door which we may not know. |
Describe the bug
when handling 512 transactions to generating a new block, consensus service will stuck and throw "Operation is not valid due to the current state of the object" error.
To Reproduce
Steps to reproduce the behavior:
neo-cli: master 51cd29fbe21abb9e1f17f64e5c6d21bc7decbbb9
neo: master ab4830c
neo-vm: master be2ac36bf35a3033d828e0ba0630d390599c487d
MillisecondsPerBlock is 15000.
Expected behavior
consensus nodes are expected to handle massive txs.
Screenshots
It can be seen from the screenshot that when number of txs is 216, consensus will continue, and when number of txs is 512, then error shows.
Platform:
n1 - Ubuntu 18.04
n2 - CentOS 7.4
n3 - Winserver 2016
n4 - Ubuntu 18.04
external node - Ubuntu 18.04
The text was updated successfully, but these errors were encountered: