jormungandr: 'stack overflow - fatal runtime error' when /utxo REST api is queried 0.7.0
Describe the bug
Node crashes instantly when jcli rest v0 utxo get -h http://127.0.0.1:3101/api is queried. Testet in the private Testnet, where lots of transactions were made. First it just gave nothing back, but after a few thousand txs it just crashed with following error:
Oct 24 01:42:41.423 INFO Starting jormungandr 0.7.0-alpha.dev.1 (HEAD-3af63d09+, release, linux [x86_64]) - [rustc 1.38.0 (625451e37 2019-09-23)], task: init
Oct 24 01:42:41.423 WARN Node started without path to the stored secret keys (not a stake pool or a BFT leader), task: init
Oct 24 01:42:41.423 INFO Starting 1 workers, scope: global
Oct 24 01:42:41.424 INFO Starting server on 127.0.0.1:3101, scope: global
Oct 24 01:42:41.424 INFO storing blockchain in '"/home/consuman/CARDANO/testnet_alt/storage/blocks.sqlite"', task: init
Oct 24 01:42:41.426 INFO fetching block c63a07f3e0db52c9abf886453316a1698d41a77023972c708345acf6645a8c0c, peer_address: 45.32.188.204:4000, block: c63a07f3e0db52c9abf886453316a1698d41a77023972c708345acf6645a8c0c, task: init
Oct 24 01:42:42.054 INFO initial bootstrap completed, peer_address: 45.32.188.204:4000, block: c63a07f3e0db52c9abf886453316a1698d41a77023972c708345acf6645a8c0c, task: init
Oct 24 01:42:42.140 INFO connecting to bootstrap peer 51.91.96.237:3100, peer_addr: 51.91.96.237:3100, task: bootstrap
Oct 24 01:42:54.629 ERRO Error occurred during request handling, status: 503 Service Unavailable Full REST context not available yet, scope: global
Oct 24 01:43:00.967 ERRO Error occurred during request handling, status: 503 Service Unavailable Full REST context not available yet, scope: global
Oct 24 01:43:07.976 INFO switching to new candidate branch, peer_addr: 51.91.96.237:3100, task: bootstrap
Oct 24 01:43:07.988 INFO initial bootstrap completed, peer_addr: 51.91.96.237:3100, task: bootstrap
Oct 24 01:43:07.988 INFO starting task, task: client-query
Oct 24 01:43:07.989 INFO adding P2P Topology module: trusted-peers, task: network
Oct 24 01:43:07.989 INFO start listening and accepting gRPC connections on 0.0.0.0:8855, task: network
Oct 24 01:43:07.989 INFO connecting to peer, node_id: 2da766df9d16682e45119194cbe5ccb92e03020625558e821201d6e319a37673, peer_addr: 51.91.96.237:3100, task: network
Oct 24 01:43:07.989 INFO connecting to peer, node_id: 7ae7730a9f19b8398e415c199d22035e48c4e220f75ea0a12870ad2ab309b7a0, peer_addr: 45.32.188.204:4000, task: network
Oct 24 01:43:07.989 INFO connecting to peer, node_id: e277491e0dfc7c23e51258cd84f66fc77b15fe9e1b71b8b3cb0ddce0b6de54b4, peer_addr: 35.235.111.217:9000, task: network
Oct 24 01:43:11.112 INFO incoming P2P connection on 138.201.181.94:8855, peer_addr: 35.235.111.217:39440, task: network
Oct 24 01:43:11.265 INFO client P2P connection closed, node_id: e277491e0dfc7c23e51258cd84f66fc77b15fe9e1b71b8b3cb0ddce0b6de54b4, peer_addr: 35.235.111.217:9000, task: network
Oct 24 01:43:13.556 INFO incoming P2P connection on 138.201.181.94:8855, peer_addr: 54.66.255.167:50069, task: network
Oct 24 01:43:13.581 INFO incoming P2P connection on 138.201.181.94:8855, peer_addr: 54.66.255.167:50068, task: network
Oct 24 01:43:14.106 INFO incoming P2P connection on 138.201.181.94:8855, peer_addr: 176.25.248.202:42848, task: network
Oct 24 01:43:14.106 INFO incoming P2P connection on 138.201.181.94:8855, peer_addr: 176.25.248.202:42846, task: network
Oct 24 01:43:14.179 INFO incoming P2P connection closed, peer_addr: 176.25.248.202:42848, task: network
Oct 24 01:43:14.673 INFO incoming P2P HTTP/2 connection error, reason: connection error: Connection reset by peer (os error 104), peer_addr: 54.66.255.167:50069, task: network
Oct 24 01:43:15.131 INFO incoming P2P connection on 138.201.181.94:8855, peer_addr: 94.195.82.31:43388, task: network
Oct 24 01:43:15.157 INFO incoming P2P connection on 138.201.181.94:8855, peer_addr: 94.195.82.31:43390, task: network
Oct 24 01:43:15.225 INFO incoming P2P connection closed, peer_addr: 94.195.82.31:43388, task: network
thread 'arbiter:f73a75ad-6a0a-40a2-8dbb-dbcd7a3e347c:actix-net-worker-0' has overflowed its stack
fatal runtime error: stack overflow
Mandatory Information
- jcli 0.7.0-alpha.dev.1 (master-e8833bce, release, linux [x86_64]) - [rustc 1.38.0 (625451e37 2019-09-23)]
- jormungandr 0.7.0-alpha.dev.1 (master-e8833bce, release, linux [x86_64]) - [rustc 1.38.0 (625451e37 2019-09-23)]
To Reproduce
Query jcli rest v0 utxo get -h http://127.0.0.1:3101/api in a network with a high tx amount.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (13 by maintainers)
@consuman this end point should have been removed a long time ago. This is the least reliable way to obtain the current UTxO list. Better to play with the explorer mode if you wish to get the whole list of UTxO.
documentation is here if you want to run the explorer mode: https://input-output-hk.github.io/jormungandr/quickstart/04_explorer.html
@CodeSandwich Under the same scenario as before, there is NO Segmentation Fault anymore.
Clean one:
gdb-info_threads.txt gdb-bt_full.txt gdb-thread_apply_all_bt_full.txt
under lldb
@CodeSandwich , I got this running under gdb (will try lldb shortly). While I check further the bt, does this tells you anything?
@NicolasDP The bug is still there and we have a chance to track it down. I’m 99% confident that it’s not in UTxO REST endpoint, because it’s not doing anything except forming a JSON. I’ve been able to generate 500 MB UTxO JSON when I was looking for the bug and while it took some time, it was handled perfectly. This bug is somewhere deeper, which means that it’s probably much more severe.
@CodeSandwich Sorry, I didn’t mean a run-time Rust backtrace, but a postmortem from core. LLDB, anyone?