Concordium / concordium-client

A command line client to interact with the concordium-node
Apache License 2.0
8 stars 6 forks source link

Concordium client cannot handle large responses #36

Closed abizjak closed 1 year ago

abizjak commented 3 years ago

Bug Description

The query GetBlockSummary fails when blocks are very large. This was first observed on testnet 4 with blocks with the following hashes

eda05241846d608de58497f50f3b96230249fdbb4c6782787d3ed579b62c394e
e397c02598f8a7169874fe38f8790cb091a4d4566ce2f3426259de187f9296f0
04492a870c0ccc541de9dd8652890dd726744c71b518f796618328e1934f2a88
acdfb89dd52dc3144f874a11da1be38b55ed6e508d0543b5dca59b5be5790455
fc5f693b2513c3b741a8320fe948afda7c563a28cfd336572d10262917a5329d
03dba97c6918169b3afc020c57f88d444304eac453189ee522def3418f3eef17
bd2bc466bb71d24839628f48136ee6b12cd532b2472aaefdb2c03f76674952e5
1854afbc16901d0f194c5b1b420bba292334f9db8d13a36f0947f3bc9487c290
d374e0eb6a7d5a66e81209e16392f66e80c55ff459c4dbff8af4767fa0f96703
900074f204c34147bf1f68a91df56f8b9454c02f65164ff177fb7aa5caaec1d6
b041ebe1b38c97b1241b47fecfdfa89ef852c5ed97b44a163c54f7515517fd92
3553e7c22d32ef1d9df3139222475e541650247770e51b97766f2133733de2f2
8a36466c72a3712f3df6bed506f30f6309a60aa051607b97ba98e528c59149e8
752996404a2027654b0e058da367bb1719330ed4993fafc9735a059f42659bd1
fcf3f56af7c6fea9511a3aa3168466001fa8e9196bdfa4bc6bcaa13a0683fbdf
9bba8615c9afe37407fb0b0327f4e322c3175150307026de094090e6b6228eeb
75533215ce2583897cc147be789586dff376de70bf0304178657addb0ea614f8
ca961c381459ffd4eea58bc778546829d832b8fb8f6f857e0d9e0d30ac960853
bd2af80b5d2ee6078a1602827a0f160713f000f967002c0fadbb02ae572b637a
74c5cd2c49e2ae130a4eed9332ba1f8c0dc3da9711bdd549ff9fac3c33a28f95
d00981f4598eef0e3355bbcec1d02c046e8ecd64e2825dfacd962c69bc697ed3

Failure means that the client simply hangs. It does not use any CPU and never terminates.

Steps to Reproduce

Query a very large block. Note that the fact that it is a block summary is irrelevant. The problem is to do with the size of the data that is transmitted over the network, not the kind of data. This is supported by the fact that there is no CPU usage or any activity in the client. The client is just waiting for data.

My conjecture is that there is an accounting bug in the http2 library implementation.

Likely a minimal test case is to make a minimal GRPC server that serves a large string. Then make a small client using the Haskell GRPC library and make the query. At some size of the string the query is going to just hang.

Expected Result

Query succeeds.

Actual Result

Client hangs.

Versions: All known versions

abizjak commented 1 year ago

This is fixed now, the issue was partly resolved by #212 and partly already before (no issue link since this was JIRA days).