Bug 573354 - [Linux] Find native memory leaks in SWT
Summary: [Linux] Find native memory leaks in SWT
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.19   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-04 11:36 EDT by Alexandr Miloslavskiy CLA
Modified: 2021-06-08 03:15 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Miloslavskiy CLA 2021-05-04 11:36:46 EDT
In Bug 570238 and Bug 569647 I used Valgrind to hunt down some SWT native-side memory leaks. I'll use this Bug to share my tools when they're ready.
Comment 1 Alexandr Miloslavskiy CLA 2021-05-04 15:30:23 EDT
OK, I polished the scripts enough to be usable outside my lab :)

Start here:
https://github.com/SyntevoAlex/JavaValgrindScripts

There should be sufficient explanations in the readme.

@Simeon I'll be pleased if you can try that soon, so that my effort is not in vain :)
Comment 2 Alexandr Miloslavskiy CLA 2021-05-04 15:35:12 EDT
Suppressions try to remove all sorts of noise. For example, global caches in JVM/GTK are considered to be leaks, because technically they are: they are allocated and stay there until the very end.

Still more suppressions could be added, but it takes time to investigate and make sure that these are not actual leaks. When in doubt, run something in a loop and see if reported leak grows or not.
Comment 3 Simeon Andreev CLA 2021-05-05 02:33:50 EDT
(In reply to Alexandr Miloslavskiy from comment #1)
> OK, I polished the scripts enough to be usable outside my lab :)
> 
> Start here:
> https://github.com/SyntevoAlex/JavaValgrindScripts
> 
> There should be sufficient explanations in the readme.
> 
> @Simeon I'll be pleased if you can try that soon, so that my effort is not
> in vain :)

Thanks a lot Alexandr!

In fact we have already a memory leak in Eclipse/our product that we need to check, I'll try using the tool this and next week to hopefully find out what code is leaking.
Comment 4 Alexandr Miloslavskiy CLA 2021-05-10 20:18:25 EDT
A much faster tool:
https://github.com/SyntevoAlex/JavaJemallocScripts.git

@Simeon, give it a try!