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

Unit tests: rpcdaemon test TraceCallExecutor::trace_filter crashes #40

Closed
elmato opened this issue Jul 19, 2023 · 4 comments
Closed

Unit tests: rpcdaemon test TraceCallExecutor::trace_filter crashes #40

elmato opened this issue Jul 19, 2023 · 4 comments
Assignees

Comments

@elmato
Copy link
Contributor

elmato commented Jul 19, 2023

Changes we made in the rawdb::read_body function introduced in this commit makes unit test "TraceCallExecutor::trace_filter" to crash.

The code was expecting blocks to have two transactions, one system tx at the beginning and one at the end of the block. We don't have that in our node implementation.

./rpcdaemon_test "TraceCallExecutor::trace_filter"
Filters: TraceCallExecutor::trace_filter
unknown file: Failure

Unexpected mock function call - returning default value.
    Function call: walk(@0x7f9040001de0 "BlockTransaction", { '\0', '\0', '\0', '\0', '\x5' (5), '\xC6' (198), '.' (46, 0x2E), 'i' (105, 0x69) }, 0, 32-byte object <50-1E 00-40 90-7F 00-00 00-00 00-00 00-00 00-00 00-25 F4-5B B3-55 00-00 50-29 F5-5B B3-55 00-00>)
          Returns: 8-byte object <00-00 00-00 00-00 00-00>
Google Mock tried the following 2 expectations, but none matched:

/home/matu/dev/new-silkworm-to-update/silkworm/silkrpc/core/evm_trace_test.cpp:3832: tried expectation #0: EXPECT_CALL(db_reader, walk(db::table::kBlockTransactionsName, silkworm::ByteView{kBlockTransactionKey1}, kBlockTransactionFixedBits1, _))...
  Expected arg #1: is equal to { '\0', '\0', '\0', '\0', '\x5' (5), '\xC6' (198), '.' (46, 0x2E), 'g' (103, 0x67) }
           Actual: { '\0', '\0', '\0', '\0', '\x5' (5), '\xC6' (198), '.' (46, 0x2E), 'i' (105, 0x69) }
         Expected: to be called once
           Actual: never called - unsatisfied and active
/home/matu/dev/new-silkworm-to-update/silkworm/silkrpc/core/evm_trace_test.cpp:3840: tried expectation #1: EXPECT_CALL(db_reader, walk(db::table::kBlockTransactionsName, silkworm::ByteView{kBlockTransactionKey2}, kBlockTransactionFixedBits2, _))...
  Expected arg #1: is equal to { '\0', '\0', '\0', '\0', '\x5' (5), '\xC6' (198), '.' (46, 0x2E), 'j' (106, 0x6A) }
           Actual: { '\0', '\0', '\0', '\0', '\x5' (5), '\xC6' (198), '.' (46, 0x2E), 'i' (105, 0x69) }
         Expected: to be called once
           Actual: never called - unsatisfied and active

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rpcdaemon_test is a Catch v2.13.9 host application.
Run with -? for options

-------------------------------------------------------------------------------
TraceCallExecutor::trace_filter
  from block number < to block number
-------------------------------------------------------------------------------
/home/matu/dev/new-silkworm-to-update/silkworm/silkrpc/core/evm_trace_test.cpp:5247
...............................................................................

/home/matu/dev/new-silkworm-to-update/silkworm/silkrpc/core/evm_trace_test.cpp:5247: FAILED:
due to a fatal error condition:
  SIGSEGV - Segmentation violation signal

===============================================================================
test cases: 1 | 1 failed
assertions: 1 | 1 failed

[1]    488322 segmentation fault (core dumped)  ./rpcdaemon_test "TraceCallExecutor::trace_filter"
@github-project-automation github-project-automation bot moved this to Todo in EOS EVM Jul 19, 2023
@elmato elmato changed the title Unit tests: TraceCallExecutor::trace_filter crashes Unit tests: rpcdaemon test TraceCallExecutor::trace_filter crashes Jul 19, 2023
@stephenpdeos
Copy link
Member

Related to #50

@stephenpdeos stephenpdeos added 👍 lgtm bug Something isn't working and removed bug Something isn't working labels Sep 12, 2023
@arhag
Copy link
Member

arhag commented Sep 19, 2023

This should be fixed for EOS EVM Node and can be integrated into its main branch.

@stephenpdeos
Copy link
Member

To close this out, we will update the master branch of Silkworm from upstream and then integrate into the main branches of our three dependent products.

@elmato elmato moved this from Todo to Awaiting Review in EOS EVM Oct 4, 2023
@elmato elmato moved this from Awaiting Review to Todo in EOS EVM Oct 10, 2023
@arhag arhag mentioned this issue Dec 5, 2023
@elmato
Copy link
Contributor Author

elmato commented Jan 3, 2024

This issue was solved by PR #108

@elmato elmato closed this as completed Jan 3, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in EOS EVM Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants