Open machaval opened 3 years ago
Thank you for reporting this issue, could you please provide the exact command you use to compile the above example? also, the version of clang you're using?
Hi Thanks for taking a look at the issue. I've created a project that showcase the issue. Just unzip the attached zip and inside there is a compile.sh (clang -I./src/main/c/ -L./src/main/c/ -ldw ./src/main/c/DataWeaveNative.c -o DataWeaveNative
) that compiles the project.
native-leak.zip
Then what I do is executes leaks DataWeaveNative
in another terminal while this process is running and it shows the leaks.
My current version of clang is
➜ native-leak clang --version
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@oubidar-Abderrahim Is this information good enough? Do you need more data to reproduce the issue?
Yes, I managed to reproduce the issue, thank you for the reproducer. This issue is tracked internally on GR-32291
Is this issue fixed?
Unfortunately, this is not a single bug, but a number of issues mostly caused by native code of the JDK assuming that there is only ever going to be one isolate, so this is ongoing work.
Memory Leak detected on graal_isolatethread_t
I'm trying to build a SharedLibrary that allows to execute my language runtime from other languages like i this case GO. This function is going to be called multiple times, so I did a simulation to see how it behaves, memory, cpu. And I was seeing a small memory leak. What I did was very simple First
Second do my stuff
Third
I put it inside a while true and I started to see that the memory usage of the process was growing, slowly but constantly.
So I commented the call to my code
I'm just using graal libraries.
And If I compile this script using
clang
and using macleaks
tool it showsSo as it can be seen after 3 loops 3 leaks are being detected.
Describe GraalVM and your environment: