I have a complex Java application that has been running for a long time. the application performs the same operation with small nuances again and again. My problem is that Windows Task Manager shows a lot of leaks for the java process (and not for file descriptors).
after some time starting the application in stress, I get strange failures, for example, the application gets stuck, disappears, or I get a FileNotFoundException when I try to open the file ("Not enough system resources to complete the requested service").
I used the Windows task manager to find out what the problem was, and found that for the java.exe process the number of handles increases very quickly. the number of threads in is not increased, and the amount of RAM used also does not increase.
Then I used SysInternal Process Explorer to figure out what these pens are. I see that they are not file descriptors, but thousands of descriptors like "Mutant" named \ BaseNamedObjects \ ?????? n According to some sites on the Internet, Mutant in Process explorer means Mutex. My Java application does not intentionally create any mutexes.
The next step was to use profiling tools to narrow down the source of leaks. I used "J Optimizer" and "Java VirtualVM". with both applications, I canβt detect handle leaks. they have memory leak detectors, but I can't find a way to detect a pen leak.
My question is: How can I debug this problem? How to find out what causes the descriptor leak?
thanks
source share