KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
107 stars 94 forks source link

[Bug]: Possible deadlock with requesting orderbook request when P2P node got disconnected + excessive data usage #910

Open Milerius opened 3 years ago

Milerius commented 3 years ago

Describe the bug

As discussed with artem we maybe have a possible deadlock, see the logs:

2021-04-16-14-13-55.log 2021-04-16-14-14-06.mm2.log

Screenshots

image

cc @TheComputerGenie

artemii235 commented 3 years ago

Thanks for the report, checking now.

artemii235 commented 3 years ago

Should be fixed now, please try testing with the latest MM2 release - it should be published in a few minutes.

TheComputerGenie commented 3 years ago

Should be fixed now, please try testing with the latest MM2 release - it should be published in a few minutes.

That change does lessen the frequency of it happening, but doesn't seem to totally fix it 2021-04-20-05-40-45.log 2021-04-20-05-40-58.mm2.log

artemii235 commented 3 years ago

@TheComputerGenie Should be something different now. GUI log previously had Failed to read HTTP status line from: batch_balance_and_tx and Failed to read HTTP status line from: process_orderbook, now it has only batch_balance_and_tx messages.

I see that MM2 is getting frequently disconnected from SPACE electrums. Could you please try to disable SPACE and check if there is any difference?

lightspeed393 commented 3 years ago

@TheComputerGenie if there's a SPACE electrum server issue please lmk. They appear okay on my end though.

TheComputerGenie commented 3 years ago

now it has only batch_balance_and_tx messages.

The message of which thing causes the fail is intermittent. On additional runs it does include the orderbook fail as well image Disabling the heavy UTXO PoS coin seems to have stopped it

@TheComputerGenie if there's a SPACE electrum server issue please lmk. They appear okay on my end though.

I'm not sure it's a "SPACE electrum" issue as much as an actual electrum issue not really being designed to handle 6500+ UTXOs.

TheComputerGenie commented 3 years ago

the batch_balance_and_tx messages seem to come from having "normal" DSL and not being situated in an urban area with super speed

I've gotten several · 2021-04-20 12:30:22 -0500 [tx_history THC] utxo_common:1513] Error "utxo_common:1231] JsonRpcError { client_info: \"coin: THC\", request: JsonRpcRequest { jsonrpc: \"2.0\", id: \"2455\", method: \"blockchain.scripthash.get_balance\", params: [String(\"5030111ffcc95ef54f496c5b0549a2f958ce07dadcba0f995a9424272c04227a\")] }, error: Transport(\"rpc_clients:1213] rpc_clients:1215] [\\\"rpc_clients:2027] common:1411] future timed out\\\", \\\"rpc_clients:2027] common:1411] future timed out\\\"]\") }" on getting balance which is obviously a different issue since I've never used THC with this address

artemii235 commented 3 years ago

Disabling the heavy UTXO PoS coin seems to have stopped it

I see, it now looks like a network congestion problem that might be caused by excessive data usage. Will check how we can optimize MM2 for this case. Changing the priority of the issue since the deadlock seems to be fixed and the current problem is a bit different.