besu: Potential memory leak on Eth_GetLogs

Description

A discord user reported an OOM Killer event on Besu. When the event occurred, Besu was consuming more than 24.5 GiB.

Out of memory: Killed process 58403 (java) total-vm:31612904kB, anon-rss:24522548kB, file-rss:0kB, shmem-rss:8996kB, UID:1000 pgtables:57052kB oom_score_adj:0

The user calls Eth_GetLogs every five minutes to get logs with a small range of blocks (tens of blocks).

Steps to Reproduce (Bug)

Call Eth_GetLogs with small range of blocks (tens of blocks) every 5 minutes on a synced node.

Expected behavior: Besu shouldn’t run out of memory.

Actual behavior: Besu consumes all available memory until being OOM killed.

Frequency: TBD

Versions

  • Besu version : besu/v22.10.3/linux-x86_64/openjdk-java-19

Additional Information (Add any of the following or anything else that may be relevant)

  • System info - memory, CPU : 32 GiB RAM

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 22 (11 by maintainers)

Most upvoted comments

Yep I’m happy to close for now and will re-open if it recurs.

Yes. I am also “the user”.

Is it known that this was working before any recent changes? Perhaps this pattern of usage is uncommon and is uncovering an old issue?