Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Memory Leak that caused keeping EventsManagerImpl for the whole run #3703

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

dimaopen
Copy link
Collaborator

@dimaopen dimaopen commented Dec 23, 2022

  1. Instead of adding PhysSimEventWriter which keeps a reference to the EventManager to the matsim controller listeners we add a small object that keeps a reference only to a terminated threadpool.
  2. Do not init PrallelEventManagerImpl multiple times because it abandons blocked threads that are GC Roots. They keep their frames until the app exits.
  3. Added a new parameter vmInformation.writeHeapDump in order to write a heap dump at each iteration so that we could debug memory leaks easier.

This change is Reviewable

@dimaopen dimaopen self-assigned this Dec 23, 2022
@dimaopen dimaopen linked an issue Dec 23, 2022 that may be closed by this pull request
@dimaopen
Copy link
Collaborator Author

This is the run name to confirm memory leak is fixed do/freight-memory-leak-fix_dimaopenATgmail_com.

Copy link
Collaborator

@nikolayilyin nikolayilyin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nikolayilyin nikolayilyin merged commit 58d39bb into develop Dec 23, 2022
@nikolayilyin nikolayilyin deleted the do/#3698-memory-leak-fix branch December 23, 2022 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak investigation
2 participants