[Mulgara-general] Mulgara size limits
Chuck Borromeo
cborromeo3 at yahoo.com
Wed Jul 2 05:21:21 PDT 2008
Hello,
OK I'm going to be a pain in the neck :). I tried running Mulgara with the -Xrunhprof:heap=sites switch. The process threw a java.security.AccessControlException: access denied error when I ran it using the -Xrunhprof switch. I have never run java with the dump file commands so I would appreciate anyone telling me how to fix this issue. I looked up the error and it said something about changing my java.policy and java.security files to allow the process to see these files. However, it didn't make much sense to me. I am running Mulgara with the sudo command so I should have permission to see everything. How do I fix this? (I'll attached the stack trace at the end of this message).
So...I tried running Mulgara with the -XX:+HeapDumpOnOutOfMemoryError switch. This did generate a .hprof file (about 1 GB in size!). I tried opening this file using a 1.6 version of jhat (1.5's jhat can't open a 64 bit .hprof file). However, I am getting a NullPointer exception from jhat when opening the file.
I think the best bet is to get the -Xrunhprof switch to work, but I'll need some instructions to fix the access denied error. Here is the stack trace:
>> Root cause stack trace:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.tools.hprof)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:277)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:207)
at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:171)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory.<clinit>(XercesDomFactory.java:83)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.enhydra.barracuda.core.event.events.xmlc.LongRunningHTML.class$(LongRunningHTML.java:23)
at org.enhydra.barracuda.core.event.events.xmlc.LongRunningHTML.<clinit>(LongRunningHTML.java:34)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.enhydra.barracuda.core.event.events.LongRunningEventGateway.class$(LongRunningEventGateway.java:48)
at org.enhydra.barracuda.core.event.events.LongRunningEventGateway.<clinit>(LongRunningEventGateway.java:51)
at org.enhydra.barracuda.core.event.ApplicationGateway.init(ApplicationGateway.java:1281)
at org.mulgara.barracuda.gateway.ExceptionHandlerGateway.init(ExceptionHandlerGateway.java:176)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:220)
at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:445)
at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:150)
at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:458)
at org.mortbay.http.HttpServer.start(HttpServer.java:663)
at org.mulgara.server.EmbeddedMulgaraServer.startHttpServer(EmbeddedMulgaraServer.java:1635)
at org.mulgara.server.EmbeddedMulgaraServer.main(EmbeddedMulgaraServer.java:506)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mulgara.util.Bootstrap.invokeClass(Bootstrap.java:525)
at org.mulgara.util.Bootstrap.main(Bootstrap.java:229)
--- On Tue, 7/1/08, Life is hard, and then you die <ronald at innovation.ch> wrote:
> From: Life is hard, and then you die <ronald at innovation.ch>
> Subject: Re: [Mulgara-general] Mulgara size limits
> To: "Mulgara General" <mulgara-general at mulgara.org>
> Date: Tuesday, July 1, 2008, 11:14 PM
> On Tue, Jul 01, 2008 at 03:35:16PM -0400, Alex Hall wrote:
> > Chuck Borromeo wrote:
> [snip]
> > The logical next step would be to get a heap profile.
> You can do this
> > by adding "-Xrunhprof:heap=sites" as a Java
> VM argument. The resulting
> > java.hprof.txt will probably be too big to send to the
> list in its
> > entirety, but if you can cut and paste the table at
> the end of the file,
> > or post the whole file somewhere for us to download,
> somebody can take a
> > look and see if there's anything out of the
> ordinary.
>
> I can't say much about Mac OS X specifics, but on Linux
> in jdk 1.5 the
> -Xrunhprof significantly slows things down and increases
> the memory
> footprint. This has changed dramatically with 1.6, where
> you can run
> without any extra command line params and then generate a
> heap dump at
> any time with 'jmap -heap <pid>' (or
> 'jmap -dump:...' for a binary
> dump usable by jhat). (Btw., jmap exists for 1.5 too, but
> at least on
> Linux I've found it extremely unreliable, wedging
> things more often
> than not, whereas on 1.6 I've not run into any issues
> so far).
>
> I know you said you're running 1.5, but if you may want
> to try 1.6 for
> debugging.
>
>
> Cheers,
>
> Ronald
>
> _______________________________________________
> Mulgara-general mailing list
> Mulgara-general at mulgara.org
> http://mulgara.org/mailman/listinfo/mulgara-general
More information about the Mulgara-general
mailing list