Edward Chou's Blog (周甘泉 的 博客) (Comments)https://blogs.oracle.com/edwardchou/
Blog for edwardchouen-usCopyright 2012Fri, 17 Feb 2012 12:29:07 +0000Apache Roller BLOGS401ORA6 (20130904125427)https://blogs.oracle.com/edwardchou/entry/mysql_my_ess_que_ell#comment-1283737705000Re: MySQL (My Ess Que Ell)thomas saboMon, 6 Sep 2010 01:48:25 +0000Tomorrow is Sarah's birthday,https://blogs.oracle.com/edwardchou/entry/mysql_my_ess_que_ell#comment-1267383128000Re: MySQL (My Ess Que Ell)replica rolex submariner watchesSun, 28 Feb 2010 18:52:08 +0000can show a man not only his wealthy but also his high taste.replica rolex submariner watchesAs the society developed, many people are pay more attention to one's wearing than before, especially a watch. replica rolex submariner watches If you are wearing a famous brand watch, people will look up you, also will love to do business with you. You will be a successful man with a such luxury fashion watch.https://blogs.oracle.com/edwardchou/entry/mysql_my_ess_que_ell#comment-1258067090000Re: MySQL (My Ess Que Ell)tiffany &amp; co BangleThu, 12 Nov 2009 23:04:50 +0000Thanks for your information, i have read it, very good&#65281;https://blogs.oracle.com/edwardchou/entry/find_orphaned_classloaders#comment-1239280265000Re: Find Orphaned ClassloadersEdward ChouThu, 9 Apr 2009 12:31:05 +0000Hi Greg,
Sorry I don't have the source code change for this anymore. However, you can find the binary jar on this page: http://blogs.sun.com/edwardchou/entry/javaone_bof_on_memory_leaks
and http://blogs.sun.com/edwardchou/resource/jhat.jar
There are two ways to extend the jhat query functionality. First is to use its built-in javascript engine to run your custom javascript query of the memory file. Second is to download the open-source JDK source code, and plug-in pre-compiled query by using Java code.https://blogs.oracle.com/edwardchou/entry/find_orphaned_classloaders#comment-1239264913000Re: Find Orphaned ClassloadersGreg BishopThu, 9 Apr 2009 08:15:13 +0000How did you write that query you refer to? Do you have a copy of it?https://blogs.oracle.com/edwardchou/entry/find_orphaned_classloaders#comment-1239178732000Re: Find Orphaned ClassloadersGreg BishopWed, 8 Apr 2009 08:18:52 +0000Can you please post the modified code?https://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1221090203000Re: JavaOne BOF on Memory LeaksMax BowsherWed, 10 Sep 2008 23:43:23 +0000Hi,
Are you going to publish your modifications in source form?
You've very aptly demonstrated that some problems are best approached by customizing the jhat code with extra features - so it would be very nice to be able to build upon your customizations. It would also be nice to be able to update to future jhat versions without losing your additional features.
Max.https://blogs.oracle.com/edwardchou/entry/reuse_a_netbeans_services_tab#comment-1211293000000Re: Reuse a NetBeans Services Tab Nodegame&amp;gadget reviewTue, 20 May 2008 14:16:40 +0000Nice post Edward, I found your this post very helpful in my developement of Netbeans plug-in modules.
thanks,
http://macross-frontier.blogspot.comhttps://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1200303545000Re: JavaOne BOF on Memory LeaksImpMon, 14 Jan 2008 09:39:05 +0000Thanks Cott.
I think this is the wrong place to post this... :(
Xerces has been deleted from WEB-INF/lib dir. It was there to support java 1.4.2.
The application keeps throwing permgen exceptions after 20 redeploys or so.
A heap dump after the error shows several unreferenced WebappClassLoader (7). Jhat shows no livepaths to those classloaders.
select cl
from instanceof org.apache.catalina.loader.WebappClassLoader cl
where count(heap.livepaths(cl)) == 0
(This query shows 7 classloaders)
The special query of Edward Chou to find Reference Chains from Rootset (Exclude weak refs, filter enabled) also shows the CLs as unreferenced!!
I'm using JDK 6 under Windows 2000.
May somebody shed some light over the issue? Is a reference hidding somewhere? What other reason may prevent the JVM from unloading one CL?
Boy, I needed to tell someone...https://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1200257644000Re: JavaOne BOF on Memory LeaksCott LangSun, 13 Jan 2008 20:54:04 +0000Imp,
You're not wrong on Xerces - you don't want that in your application lib under Tomcat.https://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1200249485000Re: JavaOne BOF on Memory LeaksImpSun, 13 Jan 2008 18:38:05 +0000Thanks! I was trying to execute a query to dicover references between objects of different classloaders, but it is taking forever (+1 day and running).
This was the query:
select o1 from instanceof java.lang.Object o1
where classof(o1).loader != heap.findObject('0x046cbf28')
&amp;&amp; contains(referees(o1), &quot;classof(it).loader == heap.findObject('0x046cbf28');&quot;)
where 0x046cbf28 is a WebApp classloader of Tomcat.
Your jhat version nicely helped to find out some suspects (sorry if I'm wrong on those):
Thread.contextClassLoader:
Maybe Tomcat does not reset inmediately this member after request processing.
org.apache.tomcat.util.digester.Digester.parser:
It is holding a reference to a Xerces parser in my application lib.https://blogs.oracle.com/edwardchou/entry/gnu#comment-1195200508000Re: GNUguestFri, 16 Nov 2007 08:08:28 +0000Since GNU is an acronym, none of the letters are silent. Same rule with GNOME.https://blogs.oracle.com/edwardchou/entry/gnu#comment-1192151863000Re: GNUguestFri, 12 Oct 2007 01:17:43 +0000so does GNOME.https://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1191003157000Re: JavaOne BOF on Memory LeaksCott LangFri, 28 Sep 2007 18:12:37 +0000Edward,
You are, of course, correct. I re-ran my tests and deployed and un-deployed my application a few dozen times before it finally began to garbage collect the WebAppClassLoader. It seems it does not GC until it is stressed for perm gen space.
After that, it allowed 5-15 copies of it to linger steadily through hundreds of reloads.
Thanks again for this wonderful tool - I'd sure love to see this in the JDK distribution.https://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1190666755000Re: JavaOne BOF on Memory LeaksEdward ChouMon, 24 Sep 2007 20:45:55 +0000Hi Cott,
I am not aware of any bugs in jhat, the changes I made are on top of JDK 1.6.0_01 source code.
One possibility I can think of is that the WebAppClassLoader is actually &quot;garbage-collectable&quot;, but it is not yet reclaimed by JVM. Garbage-collection in JVM is unpredictable and varies depending on the algorithm. One way to make sure that it is leaking in the WebAppClassLoader is to have a automated script that does the deploy/undeploy cycle of your WebApp many many times, and then use JConsole to monitor the PermGen memory space of JVM. If PermGen space usage graph increases continueously over time, then you know you are still having the Classloader leak problem.https://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1190622814000Re: JavaOne BOF on Memory LeaksCott LangMon, 24 Sep 2007 08:33:34 +0000This is a great addition to jhat - I haven't found any other tools that provide this information nearly so easily.
I do have a question, though - is it possible there's a bug? According to this modification, I've managed to eliminate all references to a WebAppClassLoader that wasn't getting collected on application reload in Tomcat. Unfortunately, it still doesn't get collected. :(
Anyone else run into this?
Thanks!https://blogs.oracle.com/edwardchou/entry/javaone_bof_on_memory_leaks#comment-1179219040000Re: JavaOne BOF on Memory LeaksGary ZhuTue, 15 May 2007 08:50:40 +0000Good software. Thanks.
I agree with what Frank suggested at JavaOne BOF to opensource it, I'd go a little bit further, it would be very nice to productizing it and get it bundled in a standardized package.
I view it as parallel to jconsole and visualgc.https://blogs.oracle.com/edwardchou/entry/mysql_my_ess_que_ell#comment-1159392658000Re: MySQL (My Ess Que Ell)LishaWed, 27 Sep 2006 21:30:58 +0000我很喜欢你写的东西, 我觉得你写的是最棒的! 你可以做我的偶像吗? 我想和你成为最好的朋友. 因为我觉得你长的很帅, 哈哈....