VitoMakarevich commented on PR #42893:
URL: https://github.com/apache/spark/pull/42893#issuecomment-1718060859

   I think it's coming from `netty`, but it may be any other package. The fact 
is that if you use `java.util.zip` package in Java 8 - you use non-empty 
`finalize` methods that were deprecated and I saw in e.g. Java 11 this package 
is overwritten to have an empty `finalize` method. So the fact is that whoever 
using `java.util.zip` causes such problems. But I think the problem is visible 
only when JVM cannot keep up with the speed of generation in such instances - 
so it's probably in a big applications only.
   I verified it worked initially when saw millions of objects there - I 
triggered finalization on running the application using JMX bean and 
immediately after it I saw the queue being 0 sizes and memory usage drop by 
dozens of GBs.
   And the second fix I made - I created a background thread that runs 
`System.runFinalization()` with the same frequency as spark cleanup - and the 
driver became stable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to