graphprotocol / graphprotocol/graph-node

[Bug] Memory leak when using block handler without filter

Offen
#4,509 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug Stale
Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
1.1k
Ø Merge
4 T. 1 Std.
Gemergte PRs (30 T.)
1

Beschreibung

Bug report

For the following subgraph we needed a way to initialize some values (at block 0):
https://github.com/Taraxa-project/taraxa-platform/tree/feature/add-subgraph-for-dpos/packages/dpos-subgraph

When we added a blockHandlers without a filter, it calls the handler for all blocks but the memory increases exponentially until the process is killed due to OOM.

The contents of the handler function doesn't matter. Also tested with an empty function.

Happens in Docker with v0.27.0, v0.28.0, v0.29.0, v0.30

https://user-images.githubusercontent.com/3051409/229186801-46673195-05fa-4f60-baa8-e2c636ee51e0.mp4

Relevant log output

No response

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out
  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
OS information

Linux

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den Bericht mit dem verknüpften dpos-subgraph, einem Block-Handler ohne Filter und graph-node v0.27.0 bis v0.30 in Docker unter Linux. Verfolge den Ausführungspfad des Block-Handlers und überprüfe, dass ein leerer Handler nicht mehr dazu führt, dass der Speicher wächst, bis der Prozess beendet wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend, blockchain
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.