The common ForkJoinPool does not have any ForkJoinWorkerThread while tasks are submitted to the queue

Jaikiran Pai jai.forums2013 at gmail.com
Fri Feb 2 13:35:26 UTC 2024


Hello Xiao,

I don't have enough knowledge of this area to provide any insight into 
the issue. However, just to try and get the discussion started, do you 
have any sample code of your application which shows how the application 
uses the ForkJoinPool? More specifically what APIs do you use in the 
application?

Few other questions inline below.

On 12/01/24 11:30 am, Xiao Yu wrote:
> ....
> Here is the full background. One of our process experienced an OOME 
> and a heap
> dump was obtained. We know there was a concurrent issue of our system 
> happening
> on some other machines such that network failure and retries occurred 
> in this
> process at the same time. Upon analyzing the heap dump, we observed a 
> lot of
> our network connection handlers being frequently created and 
> terminated which
> is expected due to the network failure and retry attempts mentioned above.
> However, those terminated handlers are not being GC'ed because of 
> there were
> references to tasks submitted to the ForkJoinPool during the connection
> attempts. The tasks stayed in the queue until OOME happened as there is no
> threads to execute them.

What are these handlers? Are they classes which implement Runnable or 
are they something else? What does termination of handler mean in this 
context? Do you use any java.util.concurrent.* APIs to "cancel" such 
terminated handlers?

Finally, what does the OutOfMemoryError exception stacktrace look like 
and what is the JVM parameters (heap size for example) used to launch 
this application?

-Jaikiran


More information about the core-libs-dev mailing list