Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ switch("passL", "-fno-omit-frame-pointer")

--threads:on
--opt:speed
--mm:refc
--mm:orc
--excessiveStackTrace:on
# enable metric collection
--define:metrics
Expand Down
6 changes: 3 additions & 3 deletions execution_chain/evm/async_evm.nim
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ proc callFetchingState(
vmState.ledger.rollback(sp) # all state changes from the call are reverted

# Collect the keys after executing the transaction
lastWitnessKeys = ensureMove(witnessKeys)
lastWitnessKeys = move(witnessKeys)
witnessKeys = vmState.ledger.getWitnessKeys()

try:
Expand Down Expand Up @@ -313,7 +313,7 @@ func validateSetDefaults(tx: TransactionArgs): Result[TransactionArgs, string] =
if tx.gas.isNone():
tx.gas = Opt.some(EVM_CALL_GAS_CAP.Quantity)

ok(ensureMove(tx))
ok(move(tx))

proc call*(
evm: AsyncEvm, header: Header, tx: TransactionArgs, optimisticStateFetch = true
Expand Down Expand Up @@ -364,7 +364,7 @@ proc createAccessList*(
else:
al.add(adr)

var txWithAl = ensureMove(tx)
var txWithAl = tx
txWithAl.accessList = Opt.some(al.getAccessList())
# converts to transactions.AccessList

Expand Down
2 changes: 1 addition & 1 deletion tests/all_tests.nim
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import
test_rpc,
test_snap,
test_transaction_json,
test_txpool,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is crashing with a seg fault on linux.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a stack-based segfault due to ulimit -s running as part of make test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notably, running ./env.sh nim c -r tests/all_tests without ulimit does not reproduce it.

# test_txpool,
test_networking,
test_pooled_tx,
test_stateless_witness_types,
Expand Down
4 changes: 2 additions & 2 deletions tests/config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if not defined(windows):
# available on some GCC versions but not all - run with `-d:limitStackUsage`
# and look for .su files in "./build/", "./nimcache/" or $TMPDIR that list the
# stack size of each function.
switch("passC", "-fstack-usage -Werror=stack-usage=1048576")
switch("passL", "-fstack-usage -Werror=stack-usage=1048576")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that orc increases stack usage.

/home/user/development/status-im/nimbus-eth1/vendor/nimbus-build-system/vendor/Nim/lib/system.nim: In function ‘_ZN7eip759434validateBlobTransactionWrapper7594EN10pooled_txs17PooledTransactionE’:
/home/user/development/status-im/nimbus-eth1/execution_chain/core/eip7594.nim:19:15: error: stack usage might be 1205200 bytes [-Werror=stack-usage=]
   19 | proc validateBlobTransactionWrapper7594*(tx: PooledTransaction):
      |               ^
lto1: some warnings being treated as errors
make[1]: *** [/tmp/ccZV498U.mk:227: /tmp/ccLQlohJ.ltrans75.ltrans.o] Error 1
make[1]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Error: execution of an external program failed: 'g++  @all_tests_linkerArgs.txt'
stack trace: (most recent call last)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this seems to be behind the segfault

switch("passC", "-fstack-usage -Werror=stack-usage=2048576")
switch("passL", "-fstack-usage -Werror=stack-usage=2048576")

switch("define", "chronicles_line_numbers")
switch("define", "chronicles_sinks=textlines")
Expand Down
Loading