From: Jeremy J C. <jj...@sy...> - 2014-09-29 19:03:45
|
Congrats on getting latest release out. Better late than never, I got to looking once more at the memory leaks in TestProtocolAll and have made commit r8670 which I believe addresses them. This adds a method to tear down the 'mode' quads/triples/sids and its related index etc at the right point. Some concerns: - yourkit was suggesting leaks through com.bigdata.bop.fed.QueryEngineFactory.standaloneQECache and I somewhat inelegantly added a method: com.bigdata.bop.fed.QueryEngineFactory.clearStandAloneQECacheDuringTesting() which I call again at the end of each mode of the protocol tests However, the test issue in this area may be indicative of a real memory leak here (which i believe is fairly new code). My own, fairly casual assessment, is that the strong reference to the key in this cache may well be problematic. If so, fixing that and removing my clearStandAloneQECacheDuringTesting() would be better. Further I was having some issues with clearing references through the WeakHashMap at com.bigdata.btree.ReadWriteLockManager.locks I slightly convinced myself that these were artifacts of my test runs, and that the finalizers would eventually run and the memory would eventually be released. That is certainly the theory, but I have had bad experiences with finalizers and the finalizer queue in the past, and I am pretty suspicious of WeakHashMaps as a result. However, despite these concerns, I made no code changes in this area. Jeremy |