status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
543 stars 233 forks source link

libbacktrace stacktrace quality #2294

Closed mratsim closed 3 years ago

mratsim commented 3 years ago

Nim default stacktrace are much better for debugging than libbacktrace.

Example libbacktrace

Traceback (most recent call last, using override)
[...]/nim-beacon-chain/vendor/nim-libp2p/libp2p/stream/bufferstream.nim(361) main
[...]/nim-beacon-chain/vendor/nim-libp2p/libp2p/stream/bufferstream.nim(354) NimMain
[...]/nim-beacon-chain/beacon_chain/nimbus_beacon_node.nim(1620) main
[...]/nim-beacon-chain/vendor/nim-chronos/chronos/asyncmacro2.nim(63) init
[...]/nim-beacon-chain/vendor/nim-chronos/chronos/asyncmacro2.nim(66) init_continue
[...]/nim-beacon-chain/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim(407) reportUnhandledError
[...]/nim-beacon-chain/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim(358) reportUnhandledErrorAux
Error: unhandled exception: Trying to access value with err Result: SQL logic error [ResultDefect]

Given the current time to compile the whole beacon node this is quite annoying

[...]/nim-beacon-chain/vendor/nim-testutils/testutils/moduletests.nim(21) nimbus_beacon_node
[...]/nim-beacon-chain/beacon_chain/nimbus_beacon_node.nim(1620) main
[...]/nim-beacon-chain/beacon_chain/nimbus_beacon_node.nim(319) init
[...]/nim-beacon-chain/beacon_chain/validator_protection/slashing_protection.nim(153) init
[...]/nim-beacon-chain/beacon_chain/validator_protection/slashing_protection.nim(116) init
[...]/nim-beacon-chain/beacon_chain/validator_protection/slashing_protection_v2.nim(559) initCompatV1
[...]/nim-beacon-chain/beacon_chain/validator_protection/slashing_protection_v2.nim(309) checkDB
[...]/nim-beacon-chain/vendor/nim-stew/stew/results.nim(288) get
[...]/nim-beacon-chain/vendor/nim-stew/stew/results.nim(279) raiseResultDefect
Error: unhandled exception: Trying to access value with err Result: SQL logic error [ResultDefect]
stefantalpalaru commented 3 years ago

Duplicate of https://github.com/status-im/nimbus-eth2/issues/1118