Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As @shelvenzhou reported, the sidevm of the contract
log_server
panics due to OOM.See #1325 for the misleading of the error message.
I've checked it with random test logs and didn't see memory leak in the sidevm program.
The size of logs was limited with a soft bound of 8MB. However, we under-estimated the current log size with a rough formula.
Counting in the overhead, the actual memory cost was far more than 8MB. And a large tmp memory blob is required when a query requests all log records. This could make the guest run out of memory.
This PR makes 2 improvements: