I normally wouldn’t post something like this, but I think it’s weird that we are seeing this problem…plus I already posted the issue on Sun’s Java Forums.
Yesterday I ran into Mesfin as I was heading to the eye doctor. He mentioned that he was unable to start-up his developer build when his -Xmx parameter was set above 1024m. He said that other teammates reported the same issue on their Windows devpods. I sat with him at his machine for a few minutes to figure out what’s up. There’s a couple of things we know:
- Java on 32-bit Windows should support around a 1.7GB heap
- In Mesfin’s case, he was starting a VM with 1250mb + 256 MaxPerm + 70mb in stack memory, so it was clearly well below 1.7GB
- He could start up using 1024mb without issue, so it appears there’s an artificial barrier of around 1.3GB
- I recently had Windows Updates applied on both W2k3 Server and XP
- Our stack size recently was changed to 320kb, up from 160kb
- I don’t think this is really the issue as I’ve dropped the stack size down a bunch.
- Only solution for keeping a 1250mb heap was to drop the PermSize below 10mb, though it was totally unscientific and more analysis between 256mb and 10mb would need to be explored.
So I decided to rebuild my machine with the latest and greatest mainline. I used the following parameters below with all of the other defaults with the product.
# Initial Java Heap Size wrapper.java.initmemory=1250m # Maximum Java Heap Size wrapper.java.maxmemory=1250m
I received the following exception:
INFO | jvm 1 | 2009/07/28 13:39:12 | Error occurred during initialization of VM INFO | jvm 1 | 2009/07/28 13:39:12 | Could not reserve enough space for object heap INFO | jvm 1 | 2009/07/28 13:39:12 | Could not create the Java virtual machine. ERROR | wrapper | 2009/07/28 13:39:12 | JVM exited while loading the application.
What’s crazy is that we have been doing tests non-stop with values above 1024m for months. So why are we seeing this now? Why hasn’t anyone else seen this issue out on the web (recently that is)? Why haven’t any customers reported this issue? If they used the tuning set from 9.0 SP1 on 32-bit they would have experienced it first hand.
I’m going to do a little more research. Curious if anyone has thoughts…
Back From Some Research
OK…so this is messed up. I tried launching the JVM with 1mb of PermSize and heap sizes of 1.4g, 1.2g, 1.1g, 1050mb and even 1025mb. Yes that’s right, 1mb more then 1GB and guess what happened? I’m not kidding you when I say I could not start the heap.
I then wanted to see what would happen if I used an MX of 1024m, but a PermSize larger. I tried PermSizes of 600m, 512m, 300m and 256m. The only one that would start without a heap reservation issue was the 256mb.
So we have a problem to say the least. It’s clearly not an application issue, but either a JDK issue or a Windows issue. Either way, the best folks to resolve this would be Sun. I’m going to submit a ticket and see what happens. In the meantime, I’m going to make support and engineering services aware of this issue.Advertisements