-
Notifications
You must be signed in to change notification settings - Fork 10
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
[1.1.0] Fix deferred trx processing #1150
Conversation
…run outside of transaction_context retry of interrupt_oc.
Can you describe a call path that yielded the failure a little more? Because,
Couldn't this on its own have been a problem in prior releases? |
This has been this way since 2.0.0. I noticed it during visual inspection of all calls to |
Sorry I should have written those as 2 separate questions more clearly. Can you describe the (or a) flow that was causing the problem? |
onerror caseWhile applying a block a deferred transaction is processed. During the processing of the deferred transaction the action was interrupted via oc interrupt. This throws the spring/libraries/chain/include/eosio/chain/wasm_interface_private.hpp Lines 185 to 195 in 845576c
This spring/libraries/chain/transaction_context.cpp Lines 371 to 375 in 845576c
However, spring/libraries/chain/controller.cpp Line 2673 in 845576c
Which means the spring/libraries/chain/controller.cpp Line 2693 in 845576c
This deferred trx caseI'm not really sure why interrupting deferred trxs exec() would be a problem. I was thinking it was because it created its own undo_session. But it shouldn't when validating a block. I now don't see why interrupting a deferred trx would cause any issue. I does, because one of the runs had the not interrupt for implicit but do interrupt for scheduled and that chicken-dance failed with an invalid |
@@ -59,6 +59,7 @@ namespace eosio::chain { | |||
undo(); | |||
*trace = transaction_trace{}; // reset trace | |||
initialize(); | |||
transaction_timer.stop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not needed. The undo()
call above calls transaction_timer.stop()
. I can remove it, but having it here makes it more obvious that it is being called.
Note:start |
Currently with #1027 a long running trx is interrupted when the oc compile completes. This causes an issue with deferred trx processing in old blocks where deferred trxs exist. Disable interrupt of transaction when oc compile completes for implicit transactions. Implicit transactions include deferred
onerror
andonblock
. Not interruptingonblock
seems like an ok thing here asonblock
is part of the main system contract.Also stop() timer on oc interrupt so start() is always called on a stopped timer.
Also call
checktime()
after setup of cleanup in eos-vm-oc so thatset_expiration_callback(nullptr, nullptr);
is called onchecktime
exception.chicken-dance mismatch still on this branch which is being tracked by #1152
Resolves #1145