6 Replies Latest reply: Aug 26, 2008 10:48 AM by Andreas Buchen RSS

Unable to open hprof file on Debian Linux

Shyam Gouri
Currently Being Moderated

Hi,

I have a 2.5Gb hprof file that I am trying to open on a Debian Linux environment and I am getting a "File java_pid30626.hprof not found." error. However, I can open the sample snapsot files that are there in my home directory. Any idea if the error I am getting is related to enormous file size?

Any feedback is much appreciated!

 

Thanks,

-Shyam

  • Re: Unable to open hprof file on Debian Linux
    Andreas Buchen
    Currently Being Moderated

    Hi Shyam,

     

    file size should not be a problem. We have opened and analyzed 4 GB hprof files (although not on Linux).

     

    To help you, I would need to take a look at the stack trace. Open Menu "View" -> "Error Log". Double-click on the error entry written and copy the stack trace to a a forum message.

     

    Maybe also check that you have write permissions in that directory (to write the index files) and read permissions on the file itself.

     

     

    Regards,

     

        - Andreas.

     

    Removed reference to attach files - only available for moderators.

    Edited by: Andreas Buchen on Jan 18, 2008 10:12 AM

    • Re: Unable to open hprof file on Debian Linux
      Shyam Gouri
      Currently Being Moderated

      Hi Andreas,

      Thanks for responding. Taking clue about the permissions, I moved the MemoryAnalyzer installation to /usr/local/jboss/ (where the dump was initially there). I get the same error still. Here's the error log:

      Curiously there seem to be exceptions when I opened the tool first. Not sure if its a good clue for you.

      The actual message in the log when I get "file not found ..." on the GUI is:

      !MESSAGE Reference item find.ext not found for action null

      fy

      Thanks for your help,

      -Shyam

       

      =========================== START ======================

       

      !SESSION 2008-01-17 14:02:21.365 -


      eclipse.buildId=unknown

      java.version=1.5.0_11

      java.vendor=Sun Microsystems Inc.

      BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US

       

      !ENTRY org.eclipse.osgi 4 0 2008-01-17 14:02:23.128

      !MESSAGE Application error

      !STACK 1

      org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]

           at org.eclipse.swt.SWT.error(SWT.java:3589)

           at org.eclipse.swt.widgets.Display.createDisplay(Display.java:836)

           at org.eclipse.swt.widgets.Display.create(Display.java:824)

           at org.eclipse.swt.graphics.Device.<init>(Device.java:152)

           at org.eclipse.swt.widgets.Display.<init>(Display.java:472)

           at org.eclipse.swt.widgets.Display.<init>(Display.java:463)

           at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:498)

           at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)

           at com.sap.tools.memory.ui.rcp.Application.start(Application.java:13)

           at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)

           at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)

           at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)

           at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)

           at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)

           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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)

           at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)

           at org.eclipse.equinox.launcher.Main.run(Main.java:1169)

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

      !SESSION 2008-01-17 14:03:23.986 -


      eclipse.buildId=unknown

      java.version=1.5.0_11

      java.vendor=Sun Microsystems Inc.

      BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US

       

      !ENTRY org.eclipse.osgi 4 0 2008-01-17 14:03:24.876

      !MESSAGE Application error

      !STACK 1

      org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]

           at org.eclipse.swt.SWT.error(SWT.java:3589)

           at org.eclipse.swt.widgets.Display.createDisplay(Display.java:836)

           at org.eclipse.swt.widgets.Display.create(Display.java:824)

           at org.eclipse.swt.graphics.Device.<init>(Device.java:152)

           at org.eclipse.swt.widgets.Display.<init>(Display.java:472)

           at org.eclipse.swt.widgets.Display.<init>(Display.java:463)

           at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:498)

           at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)

           at com.sap.tools.memory.ui.rcp.Application.start(Application.java:13)

           at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)

           at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)

           at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)

           at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)

           at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)

           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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)

           at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)

           at org.eclipse.equinox.launcher.Main.run(Main.java:1169)

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

      !SESSION 2008-01-17 14:50:48.617 -


      eclipse.buildId=unknown

      java.version=1.5.0_11

      java.vendor=Sun Microsystems Inc.

      BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US

       

      !ENTRY org.eclipse.ui.intro 4 0 2008-01-17 14:50:51.311

      !MESSAGE Could not load SWT style: css/noteworthy/swt.properties

      !STACK 0

      java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

           at java.net.URL.<init>(URL.java:567)

      ...snipp...

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

       

      !ENTRY org.eclipse.ui.intro 4 0 2008-01-17 14:50:51.334

      !MESSAGE Could not load SWT style: css/noteworthy/swt.properties

      !STACK 0

      java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

           at java.net.URL.<init>(URL.java:567)

      ...snipp...

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

       

      !ENTRY org.eclipse.ui.intro 4 0 2008-01-17 14:50:51.373

      !MESSAGE Could not load SWT style: css/noteworthy/swt.properties

      !STACK 0

      java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

           at java.net.URL.<init>(URL.java:567)

      ...snipp...

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

       

      !ENTRY com.sap.tools.memory.ui.core 1 0 2008-01-17 14:54:09.270

      !MESSAGE Heap /home/jboss/MemoryAnalyzer/snapshots/HeapDumpSample.hprof contains 13,148 objects

      !SESSION 2008-01-18 07:52:07.996 -


      eclipse.buildId=unknown

      java.version=1.5.0_11

      java.vendor=Sun Microsystems Inc.

      BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US

       

      !ENTRY org.eclipse.ui.intro 4 0 2008-01-18 07:52:10.962

      !MESSAGE Could not load SWT style: css/noteworthy/swt.properties

      !STACK 0

      java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

           at java.net.URL.<init>(URL.java:567)

      ...snipp...

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

       

      !ENTRY org.eclipse.ui.intro 4 0 2008-01-18 07:52:10.981

      !MESSAGE Could not load SWT style: css/noteworthy/swt.properties

      !STACK 0

      java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

           at java.net.URL.<init>(URL.java:567)

      ...snipp...

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

      !SESSION 2008-01-18 08:08:48.683 -


      eclipse.buildId=unknown

      java.version=1.5.0_11

      java.vendor=Sun Microsystems Inc.

      BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US

       

      !ENTRY org.eclipse.ui.intro 4 0 2008-01-18 08:08:51.683

      !MESSAGE Could not load SWT style: css/noteworthy/swt.properties

      !STACK 0

      java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

           at java.net.URL.<init>(URL.java:567)

      ...snipp...

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

       

      !ENTRY org.eclipse.ui.intro 4 0 2008-01-18 08:08:51.706

      !MESSAGE Could not load SWT style: css/noteworthy/swt.properties

      !STACK 0

      java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

           at java.net.URL.<init>(URL.java:567)

      ...snipp...

           at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

       

      !ENTRY org.eclipse.ui 4 4 2008-01-18 08:15:51.140

      !MESSAGE Reference item find.ext not found for action null

       

      !ENTRY org.eclipse.ui 4 4 2008-01-18 08:15:51.140

      !MESSAGE Reference item find.ext not found for action null

       

      !ENTRY org.eclipse.ui 4 4 2008-01-18 08:15:51.140

      !MESSAGE Reference item find.ext not found for action null

       

      !ENTRY org.eclipse.ui 4 4 2008-01-18 08:15:51.140

      !MESSAGE Reference item find.ext not found for action null

       

      !ENTRY com.sap.tools.memory.ui.core 1 0 2008-01-18 08:16:58.685

      !MESSAGE Heap /usr/local/jboss-4.0.5-cluster/MemoryAnalyzer/snapshots/HeapDumpSample.hprof contains 13,148 objects

       

      ============== END ======================

       

      Edited by: Andreas Buchen on Jan 18, 2008 4:48 PM

      Deleted duplicate stack traces for readability

      • Re: Unable to open hprof file on Debian Linux
        Andreas Buchen
        Currently Being Moderated

        The gtk_init_check() failed lets me wonder...

         

        These are possible remedies (found by a quick search on the web):

         

        • Increase the file descriptor limit.

         

        • Insufficient memory (try increasing -Xmx...., heap dumps with a lot of objects may need more)

         

        The message

        MESSAGE Reference item find.ext not found for action null

        seems to be related to some (missing) extension point (see [http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg23475.html]).

        I don't think it should prevent you from opening the heap dump.

         

        The exception

        java.net.MalformedURLException: no protocol: css/noteworthy/swt.properties

        is probably not related (rather concerns the welcome page).

         

         

           - Andreas.

      • Re: Unable to open hprof file on Debian Linux
        Andreas Buchen
        Currently Being Moderated

        One more thing:

         

        org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]

             at org.eclipse.swt.SWT.error(SWT.java:3589)

             at org.eclipse.swt.widgets.Display.createDisplay(Display.java:836)

             at org.eclipse.swt.widgets.Display.create(Display.java:824)

             at org.eclipse.swt.graphics.Device.<init>(Device.java:152)

             at org.eclipse.swt.widgets.Display.<init>(Display.java:472)

             at org.eclipse.swt.widgets.Display.<init>(Display.java:463)

             at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:498)

         

        As the Exception occurs during the createDisplay, maybe it has something to do with the X server. Exported Display etc. okay?

  • Re: Unable to open hprof file on Debian Linux
    Scott Oaks
    Currently Being Moderated

    At least on Solaris (and presumably Linux), this is because of an Eclipse bug -- the org.eclipse.core.internal.filesystem.local.LocalFileNatives.internalGetFileInfo() method calls the system lstat() function, which is limited to 2GB files -- apparently, the Eclipse developers didn't know that they should use lfcompile64 on Solaris (and the equivalent on Linux) to get 4GB file sizes for 32-bit applications. I suppose if one built a 64-bit version of the Eclipse libraries it would work, but then you'd need a 64-bit JVM, which otherwise wouldn't be required to read a 2.5GB file.

     

    I don't suppose there's a version of the Memory Analyzer that just uses the JDK?

    • Re: Unable to open hprof file on Debian Linux
      Andreas Buchen
      Currently Being Moderated

      Hi Scott,

       

      out of curiosity, I checked excactly when the LocalFileNatives#internalGetFileInfo() is called. It looks like it is called whenever you select "Open File..." or "Open Snapshot...", but not if it is on the list of previously opened heap dumps and/or in the the file history menu. So I guess it should be possible to parse the heap dump from the command line and run the leak report:

       

      MemoryAnalyzer.exe -application org.eclipse.mat.api.parse <path/to/dump> org.eclipse.mat.api:suspects

       

      (Maybe this helps a bit. Opening the heap dump then still requires running Eclipse... but maybe you can transfer the heap dump plus index files to another machine)

       

       

      Regading 64bit binaries: we are bound to what SWT supports. There are 64bit version for Linux available, but from what I see not for Solaris: http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/index.php

       

       

      Andreas.

       

      Edited by: Andreas Buchen on Aug 26, 2008 10:48 AM