Community
Participate
Working Groups
Build Identifier: M20090917-0800 It started happening two days ago. Whenever i launch my debugger it says Error occurred during initialization of VM Could not reserve enough space for object heap Java Version = 1.6.0_20 Eclipse.ini file : --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -startup plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -product org.eclipse.epp.package.java.product --launcher.XXMaxPermSize 512m org.eclipse.platform -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms256m -Xmx1024m log file : !ENTRY org.eclipse.core.jobs 4 2 2010-06-25 17:05:05.923 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError: Java heap space at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(Util.java:398) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1168) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1137) at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:166) at java.lang.Thread.run(Unknown Source) !SESSION 2010-06-25 17:05:11.079 ----------------------------------------------- eclipse.buildId=M20090917-0800 java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -Xmx1024m Command-line arguments: -os win32 -ws win32 -arch x86 -Xmx1024m !ENTRY org.eclipse.core.resources 2 10035 2010-06-25 17:05:15.860 !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. !ENTRY org.eclipse.core.jobs 4 2 2010-06-25 17:06:18.765 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError: Java heap space at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(Util.java:398) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1168) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1137) at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:166) at java.lang.Thread.run(Unknown Source) !ENTRY org.eclipse.jdt.launching 4 120 2010-06-25 17:06:39.248 !MESSAGE Cannot connect to VM !STACK 0 com.sun.jdi.connect.TransportTimeoutException at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:97) at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56) at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135) at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107) at java.lang.Thread.run(Unknown Source) !ENTRY org.eclipse.core.jobs 4 2 2010-06-25 14:40:49.548 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError !ENTRY org.eclipse.core.jobs 4 2 2010-06-25 14:40:49.548 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError !SESSION 2010-06-25 16:17:48.355 ----------------------------------------------- eclipse.buildId=M20090917-0800 java.version=1.4.2_03 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -Xmx1024m Command-line arguments: -os win32 -ws win32 -arch x86 -Xmx1024m !ENTRY org.eclipse.core.jobs 4 2 2010-06-25 16:18:54.369 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError !ENTRY org.eclipse.core.jobs 4 2 2010-06-25 16:19:14.603 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError !SESSION 2010-06-25 16:32:39.570 ----------------------------------------------- eclipse.buildId=M20090917-0800 java.version=1.4.2_03 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.jdt.launching 4 120 2010-06-25 16:35:08.547 !MESSAGE Cannot connect to VM !STACK 0 java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:95) at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56) at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135) at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107) at java.lang.Thread.run(Unknown Source) !ENTRY org.eclipse.jdt.launching 4 120 2010-06-25 16:37:09.648 !MESSAGE Cannot connect to VM !STACK 0 java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:95) at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56) at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135) at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107) at java.lang.Thread.run(Unknown Source) !SESSION 2010-06-25 16:57:50.559 ----------------------------------------------- Reproducible: Always Steps to Reproduce: 1.Launch Eclipse 2.Launch debugger 3.
Created attachment 172827 [details] log file
Looks like your using 3.4.2. Have you been able to see if the problem occurrs on a newer version of Eclipse. You're -Xmx and -Xms arguments look reasonably large, so I'm not sure what's causing the OOME. Moving to JCore for comment as the issue appears to happening when running JDT code.
We would need more information about this failure. The .log doesn't give any clue why it failed. Are you using APT? Did you try moving to a newer build ?
Created attachment 172922 [details] Not able to create java virtual Machine.
(In reply to comment #3) > We would need more information about this failure. > The .log doesn't give any clue why it failed. > Are you using APT? > Did you try moving to a newer build ? Itried using the newer version of eclipse helios. Version = 3.6.0 Build Id : I20100608-0911 I got the following error : Error occurred during initialization of VM Could not reserve enough space for object heap I am also attaching the screen shot of the same. The contents of the Eclipse.ini file : -startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 org.eclipse.platform -launcher.XXMaxPermSize 256m -launcher.defaultAction -vmargs -Xms512m -Xmx656m I am not able to assign more than 656m memory.If I assign more than that it says not able to create java virtual machine.
(In reply to comment #5) > (In reply to comment #3) > > We would need more information about this failure. > > The .log doesn't give any clue why it failed. > > Are you using APT? > > Did you try moving to a newer build ? > Itried using the newer version of eclipse helios. > Version = 3.6.0 > Build Id : I20100608-0911 > I got the following error : > Error occurred during initialization of VM > Could not reserve enough space for object heap > I am also attaching the screen shot of the same. > The contents of the Eclipse.ini file : > -startup > plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar > -launcher.library > plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 > org.eclipse.platform > -launcher.XXMaxPermSize > 256m > -launcher.defaultAction > -vmargs > -Xms512m > -Xmx656m > I am not able to assign more than 656m memory.If I assign more than that it > says not able to create java virtual machine. I am not using APT.
Please use a 1.5 VM at least.
(In reply to comment #7) > Please use a 1.5 VM at least. I am using 1.6. Here is the error I got when I started with eclipse galileo eclipse.buildId=M20090917-0800 java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -Xmx1024m Command-line arguments: -os win32 -ws win32 -arch x86 -Xmx1024m !ENTRY org.eclipse.core.jobs 4 2 2010-06-28 09:35:27.546 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError: Java heap space at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(Util.java:398) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1168) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1137) at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:166) at java.lang.Thread.run(Unknown Source) !ENTRY org.eclipse.core.jobs 4 2 2010-06-28 09:36:53.242 !MESSAGE An internal error occurred during: "Building workspace". !STACK 0 java.lang.OutOfMemoryError: Java heap space at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsCharArray(Util.java:398) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1168) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1137) at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:166) at java.lang.Thread.run(Unknown Source)
Message :Cannot connect to VM Session Data: eclipse.buildId=I20100608-0911 java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 org.eclipse.platform -launcher.XXMaxPermSize 256m -launcher.defaultAction Command-line arguments: -os win32 -ws win32 -arch x86 -launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 org.eclipse.platform -launcher.XXMaxPermSize 256m -launcher.defaultAction Exception Stack Trace: java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:95) at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56) at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135) at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107) at java.lang.Thread.run(Unknown Source)
How big is your workspace ? Right now we cannot do anything with what we have. I have a pretty big workspace and it can start without a problem. Darin, would you have any idea about the connection issue (comment 9)?
(In reply to comment #10) > How big is your workspace ? > Right now we cannot do anything with what we have. I have a pretty big > workspace and it can start without a problem. > Darin, would you have any idea about the connection issue (comment 9)? My Workspace is 1.15 GB.
Please provide your eclipse.ini.
(In reply to comment #12) > Please provide your eclipse.ini. -startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 org.eclipse.platform -launcher.XXMaxPermSize 256m -launcher.defaultAction -vmargs -Xms512m -Xmx656m
(In reply to comment #10) > Darin, would you have any idea about the connection issue (comment 9)? The connector attempts to attach to a socket. It can timeout if it's waiting too long. The timeout value is specified via the "Preferences > Java > Debug > Launch timeout" value, and defaults to 20 seconds. It's possible that a firewall could also disallow a connection.
(In reply to comment #13) > -startup > plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar > -launcher.library > plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 > org.eclipse.platform > -launcher.XXMaxPermSize > 256m > -launcher.defaultAction > -vmargs > -Xms512m > -Xmx656m I have "--" in front of launcher options instead of "-".
(In reply to comment #15) > (In reply to comment #13) > > -startup > > plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar > > -launcher.library > > plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 > > org.eclipse.platform > > -launcher.XXMaxPermSize > > 256m > > -launcher.defaultAction > > -vmargs > > -Xms512m > > -Xmx656m > I have "--" in front of launcher options instead of "-". Plus, the line "org.eclipse.platform" should probably have a preceding line "-showsplash". Has this file been edited manually or is it the result of some p2 update operation?
(In reply to comment #16) > (In reply to comment #15) > > (In reply to comment #13) > > > -startup > > > plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar > > > -launcher.library > > > plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 > > > org.eclipse.platform > > > -launcher.XXMaxPermSize > > > 256m > > > -launcher.defaultAction > > > -vmargs > > > -Xms512m > > > -Xmx656m > > I have "--" in front of launcher options instead of "-". > Plus, the line "org.eclipse.platform" should probably have a preceding line > "-showsplash". Has this file been edited manually or is it the result > of some p2 update operation? I manually edited the file as I was trying to resolve the issue by my self.
This is mine: -console -vm D:/jdks/jdk6_20/jre/bin/java.exe --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 -startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -XX:MaxPermSize=300M -Xss1M -Xms80m -Xmx800M Please try it and update the vm argument path. Let me know if this works.
(In reply to comment #18) > This is mine: > -console > -vm > D:/jdks/jdk6_20/jre/bin/java.exe > --launcher.library > plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 > -startup > plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar > -showsplash > org.eclipse.platform > --launcher.XXMaxPermSize > 256m > --launcher.defaultAction > openFile > -vmargs > -XX:MaxPermSize=300M > -Xss1M > -Xms80m > -Xmx800M > Please try it and update the vm argument path. > Let me know if this works. Now I got this error. See the attached screen shot.EclipseIniError
Created attachment 172936 [details] Eclipse Ini Error
What is the line where you declare the VM path? You have a space in your VM path.
(In reply to comment #21) > What is the line where you declare the VM path? > You have a space in your VM path. Here is my ini file. -console -vm C:/jdks/jre6/bin/java.exe --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 -startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -XX:MaxPermSize=300M -Xss1M -Xms80m -Xmx800M
This is not the path in your latest screenshot. Are you sure you are starting the right eclipse installation ?
(In reply to comment #23) > This is not the path in your latest screenshot. Are you sure you are starting > the right eclipse installation I changed the settings so that there is no space in VM arguement. Attached is the latest screen shot.
Created attachment 172941 [details] Eclipse ini error 2
Andrew, any idea ?
(In reply to comment #0) > It started happening two days ago. Whenever i launch my debugger it says > Error occurred during initialization of VM > Could not reserve enough space for object heap This message means the total of XXMaxPermSize + Xmx is too high and need to be lowered. See bug 188968 for details. This is likely the cause of the other socket connect problems as I believe the vm just exits after this. The actual maximum values here depend on a lot of things and will vary from computer to computer. > BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US > Framework arguments: -Xmx1024m > Command-line arguments: -os win32 -ws win32 -arch x86 -Xmx1024m Log entries that show the -Xmx args as part of the command-line/framework arguments indicate that the -Xmx1024m was not specified properly as a vm argument but was instead passed as a program arg. This is likely the reason for the out of memory problems, since without the -Xmx the default is quite low. The eclipse.ini in comment #13 has a bunch of problems in it, Olivier's eclipse.ini is better and will actually allow for higher XXMaxPermSize and -Xmx values because the vm is being forked in a separate process (since -vm to a java.exe was specified). "Java returned 1" means the java process started correctly, but failed early. There is no real indication of the cause of this. I would suggest running "eclipsec" from the command prompt to see if any error messages get printed to the console.
Any update on this ?
(In reply to comment #28) > Any update on this ? There no error messages were printed on the console. My system has 3 GB of memory but still I am only able to allocate 800m for eclipse or in the run configuration. When I am building the system it is still showing me the Java heap space error.
Setting severity to normal. Need more details on your workspace. Did you fix what Andrew suggested in comment 27?
(In reply to comment #30) > Setting severity to normal. > Need more details on your workspace. Did you fix what Andrew suggested in > comment 27? Yeah I did but I am getting the Java Heap Space error if I use the other ini file.
Your problem looks like a setup issue. I don't know what we can do to help you. What happens if you use the default .ini file from Eclipse ?
Try adding: -XX:MaxPermSize=512M as part of the VM arguments.
Closing as WORKSFORME. Given what I have, there is no much I can do.
Verified for 3.7 M2