[
https://issues.apache.org/jira/browse/IGNITE-9638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929791#comment-16929791
]
Pavel Tupitsyn commented on IGNITE-9638:
----------------------------------------
Investigated more, looks like there is a way to avoid unmanaged DLLs and keep
things C#-only with P/Invoke, also in a similar way for all platforms:
* Linux: {{pthread_key_create}} allocates thread-local storage and takes a
destructor callback
* Windows: {{FlsAlloc}} initializes fiber storage, taking a callback that is
invoked on each thread exit
So this looks like a relatively straightforward fix. I'm going to move on in
this direction.
> .NET: JVM keeps track of CLR Threads, even when they are finished
> ------------------------------------------------------------------
>
> Key: IGNITE-9638
> URL: https://issues.apache.org/jira/browse/IGNITE-9638
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 2.6
> Reporter: Ilya Kasnacheev
> Assignee: Pavel Tupitsyn
> Priority: Major
> Labels: .NET
> Fix For: 2.8
>
> Attachments: IgniteRepro.zip
>
>
> When you create a Thread in C#, JVM creates corresponding thread
> "Thread-NNNN" which is visible in jstack. When C# joins this thread, it is
> not removed from JVM and is kept around. This means that jstack may show
> thousands of threads which are not there. Reproducer is attached. It is
> presumed that memory will be exhausted eventually.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)