eclipse-platform / eclipse-platform/eclipse.platform

[memory] JavaBuilder.oldState leaks into Workspace.tree

Ouverte
#910 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
165
Forks
174
Merge moyen
2 j 8 h
PR mergées (30 j)
22

Description

In the heapdump of https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/pull/1612 most memory was hold by org.eclipse.core.internal.resources.Workspace.tree.
VisualVM:
![image](https://github.com/eclipse-platform/eclipse.platform/assets/51790620/3f4dc0c2-af0e-497a-823c-9992e715b65b)

![image](https://github.com/eclipse-platform/eclipse.platform/assets/51790620/04b8f220-9dc7-42a1-b72f-b646c68a0f74)
JDKMC:
![image](https://github.com/eclipse-platform/eclipse.platform/assets/51790620/e099ae0c-18a1-44f8-ba9e-08155f5984bc)

Workspace.tree is meant to store the state of the Workspace. It does so by storing the history of changes (DeltaDataTree) to the workspace. Interestingly the workspace also stores all IncrementalBuilders which again contain references to the old trees.
I.e the Workspace stores a history of things that contain their history.
That org.eclipse.core.internal.events.InternalBuilder.oldState sounds like a leak - or say - something that unintentionally stores more memory then intended.

I have however no idea how to reduce that since an IncrementalBuilders needs to know the oldState to calculate increments. Just that the old state is stored again as a history feels odd.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Utilisez l’analyse du heap dump liée comme point de départ, puis lisez Workspace.tree, DeltaDataTree et InternalBuilder.oldState, y compris les références à oldState de JavaBuilder. Suivez la raison pour laquelle l’état du builder reste retenu et identifiez le cycle de vie prévu ; l’issue est terminée lorsqu’une approche revue réduit la rétention involontaire et fournit des éléments prouvant que les builds incrémentiels fonctionnent toujours correctement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
performance, tooling
Type d'issue
Bug
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.