DocOz Episode Recap: 1 Step plan (melt fat)

1 view
Skip to first unread message

Slip into Skinny Jeans

unread,
Jun 20, 2014, 10:02:39 AM6/20/14
to taichi-...@googlegroups.com

In Case You missed it ...

DocOz Show has devoted a whole episode to the 3 most hated letters in the US language

**** F-A-T ****

And we're talking all kinds; muffin tops, beer belly's, post-baby weight, thunder thighs

It makes you angry and upset... Doc Oz is showing you how to get rid of it.
Get ready to get rid of the weight you have been carrying around for years.

Doc Oz is showing how to Flush Fat Fast!

View DocOz Clip Here
Episode 513

 

 

 

to edit subscription settings with Current Update Alerts
write one six four four D o r a l Drive Brookings, SD 57006 or go here

 

 

1 ClassLoader leaks are some of the most commonly painful memory leaks in the JEE world, often caused by 3rd party libs that transform data (BeanUtils, XML/JSON codecs). This can happen when the lib is loaded outside your application's root classloader but holds references to your classes (eg. by caching). When you undeploy/redeploy your app the JVM is unable to garbage collect the app's classloader (and therefore all classes loaded by it), so with repeat deploys the app server eventually borks. If lucky you get a clue with ClassCastException z.x.y.Abc cannot be cast to z.x.y.Abc earcam Jun 27 '11 at tomcat uses tricks and nils ALL static variables in ALL loaded classes, tomcat has a lot of dataraces and bad coding though (need to get some time and submit fixes), plus the all mind-boggling ConcurrentLinkedQueue as cache for internal (small) objects, so small that even the ConcurrentLinkedQueue.Node takes more : Classloader leaks are a nightmare. I spent weeks trying to figure them out. The sad thing is, as what @earcam has said, they are mostly caused by 3rd party libs and also most profilers can't detect these leaks. There's a good and clear explanation on this blog about Classloader leaks. that it will leak on HotSpot but not on JRockit. Nicolas Raoul Jul 11 '11 Are you sure? JRockit does GC Class objects by default, and HotSpot doesn't, but AFAIK JRockit still can't GC a Class or ClassLoader that is referenced by a ThreadLocal. Daniel Pryden Jul 11 oh, my mistake thanks for pointing that out Nicolas Raoul Jul 12 '11 at Tomcat will try to detect these leaks for you, and warn about them: wiki.apache.org/tomcat/MemoryLeakProtection. The most recent version will sometimes even fix the leak for you. Matthijs Bierman Mar 2 '12 at 10:33
For future references, there is one more tool trying to solve classloader leaks: Does this gist shows what you described? but it won't go out of memory according to my test,correct me if there is any misunderstanding,thanks DiveInto Nov 12 '12 at 5:23
@DiveInto: See my response over at GitHub. Daniel Pryden Nov 12 '12 at 20:09
A little stupid question...Will it be termed as a memory leak,if the GC(Garbage Collector) doesn't kicks in? I am not sure whether one can invoke GC explicitly the issue is not whether or not the GC actually runs (Raymond Chen argues that a no-op GC is a valid implementation, see Everybody thinks about garbage collection the wrong way), it's whether, even if the GC did run, it would be unable to reclaim an object that is no longer visible to any running code. A ClassLoader leak is one way to end up with objects that cannot be found or used, but that still occupy memory and are rooted for GC purposes, so the GC cannot reclaim them. Daniel PrydeIt would be great if you could provide the code, I could not get all the steps How to create one with a non-static member ? thanks. Jack Moore May 14 at 2:54
Why does a long running thread cause a leak? AfterWorkGuinness May 19 at I don't have "the code", this is just an example of a systemic problem. The issue is that a ThreadLocal creates a strong reference to an instance of a class, and through that instance to the class itself (and to all data statically reachable from the class), including the ClassLoader that loaded the class. But you can clear all references to the ThreadLocal object instance and not clear the underlying GC reference as long as the referenced Thread is still running. Basically, the Thread has an invisible, uncollectable reference to the ThreadLocal storage, which thus leaks. Daniel Pryden May 20 at 20:53
 

 

Reply all
Reply to author
Forward
0 new messages