You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I experience high memory consumption by GSRPC Registry events decoder which tries to allocate about 28GiB in the following case.
In an attempt to decode Cere Network mainnet block 15 256 918 it tries to create a slice with 969 133 067 elements each more than 20 bytes long. Please find the screenshot with the debugger window below (it is hard to provide a minimal reproducible example, but please let me know if it is required). We can see that decoder gets the wrong length at go-substrate-rpc-client/scale/codec.go#L245. It then tries to allocate a large slice and panics with "out of memory" error if the system does not provide enough RAM or continues until a decoding error and updates metadata on the decoder fallback flow.
A naive fix which eliminates the issue is to update the metadata for each block as implemented in the patch: khssnv@ab97fff. But it adds an unnecessary RPC call on each block.
reflect.unsafe_NewArray (caution, light theme)
The text was updated successfully, but these errors were encountered:
Hello. I experience high memory consumption by GSRPC Registry events decoder which tries to allocate about 28GiB in the following case.
In an attempt to decode Cere Network mainnet block 15 256 918 it tries to create a slice with
969 133 067
elements each more than 20 bytes long. Please find the screenshot with the debugger window below (it is hard to provide a minimal reproducible example, but please let me know if it is required). We can see that decoder gets the wrong length at go-substrate-rpc-client/scale/codec.go#L245. It then tries to allocate a large slice and panics with "out of memory" error if the system does not provide enough RAM or continues until a decoding error and updates metadata on the decoder fallback flow.A naive fix which eliminates the issue is to update the metadata for each block as implemented in the patch: khssnv@ab97fff. But it adds an unnecessary RPC call on each block.
reflect.unsafe_NewArray (caution, light theme)
The text was updated successfully, but these errors were encountered: