This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 212162 - Netbeans fails to start with jdk7(x64)
Summary: Netbeans fails to start with jdk7(x64)
Status: RESOLVED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.1.2
Hardware: PC Linux
: P2 normal with 3 votes (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-07 09:47 UTC by mgoe
Modified: 2012-06-04 12:24 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
bzip2 message.log file (73.19 KB, application/x-bzip2)
2012-05-10 14:33 UTC, anba
Details
Threads after first error message (39.51 KB, application/octet-stream)
2012-05-11 12:20 UTC, anba
Details
Thead dump after CodeCache error line (14.17 KB, application/octet-stream)
2012-05-11 12:31 UTC, anba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mgoe 2012-05-07 09:47:10 UTC
When using Netbeans 7.1.2 with jdk7u4 the IDE sometimes fails to start.
The messages shown below are printed to the shell in these cases.
I already increased the code cache size to 256m. But this does not help.
Sometimes several attempts are needed before Netbeans comes up.

Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using
-XX:ReservedCodeCacheSize=
Code Cache  [0x00007f1edb63c000, 0x00007f1edbcec000, 0x00007f1eeb63c000)
 total_blobs=2363 nmethods=1865 adapters=414 free_code_cache=255353Kb largest_free_block=261423232
Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using
-XX:ReservedCodeCacheSize=
Code Cache  [0x00007f1edb63c000, 0x00007f1edbcec000, 0x00007f1eeb63c000)
 total_blobs=2370 nmethods=1870 adapters=415 free_code_cache=255345Kb largest_free_block=261423232
Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
Java HotSpot(TM) 64-Bit Server VM warning: Attempt to allocate stack guard pages failed.
Comment 1 anba 2012-05-07 10:09:31 UTC
Same Problem for me. This morning I need 4 times to start netbeans 7.1.2 with jdk7u4 on my ubuntu 10.04 LTS system using the 64 bit jdk version.
Comment 2 Jiri Rechtacek 2012-05-10 14:12:00 UTC
(In reply to comment #0)
> When using Netbeans 7.1.2 with jdk7u4 the IDE sometimes fails to start.
> The messages shown below are printed to the shell in these cases.
> I already increased the code cache size to 256m. But this does not help.
> Sometimes several attempts are needed before Netbeans comes up.
> 
> Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been
> disabled.
It's just a warning. It cannot block launching IDE at all.
What does mean 'fails to start'? A crash on startup? Slow startup? Frozen during startup? Something else?
Please, attach your messages.log and all further details of your installation. Did you use NB7.1.1 before? Thanks


> Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size
> using
> -XX:ReservedCodeCacheSize=
> Code Cache  [0x00007f1edb63c000, 0x00007f1edbcec000, 0x00007f1eeb63c000)
>  total_blobs=2363 nmethods=1865 adapters=414 free_code_cache=255353Kb
> largest_free_block=261423232
> Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been
> disabled.
> Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size
> using
> -XX:ReservedCodeCacheSize=
> Code Cache  [0x00007f1edb63c000, 0x00007f1edbcec000, 0x00007f1eeb63c000)
>  total_blobs=2370 nmethods=1870 adapters=415 free_code_cache=255345Kb
> largest_free_block=261423232
> Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard
> pages failed.
> Java HotSpot(TM) 64-Bit Server VM warning: Attempt to allocate stack guard
> pages failed.
Comment 3 anba 2012-05-10 14:33:32 UTC
Created attachment 119294 [details]
bzip2 message.log file
Comment 4 anba 2012-05-10 14:35:59 UTC
(In reply to comment #2)
I am not the reporter but I have the same problems.


> What does mean 'fails to start'? A crash on startup? Slow startup? Frozen
> during startup? Something else?

It begins to start normally, the splash screen appears and then it exits. It
seems to be that it does not crash and it does not freeze.

> Please, attach your messages.log and all further details of your installation.
> Did you use NB7.1.1 before? Thanks

The messages log is too big to be attached uncompressed. I bzip2 it and
attached it then.

Yes. But only with JDK 1.6.

> > Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard
> > pages failed.
> > Java HotSpot(TM) 64-Bit Server VM warning: Attempt to allocate stack guard
> > pages failed.

I think that these are the real problems.
Comment 5 Jiri Rechtacek 2012-05-11 07:10:25 UTC
anba, thank for messages.log. Could you also generate full thread dump during [1] starting IDE and attach it? Thanks in advance.


[1] http://wiki.netbeans.org/GenerateThreadDump#Console_on_Unix.2C_Linux.2C_Mac_OS_X


A suspicion place is <java_home>/jre/lib/amd64/libt2k.so: failed to map segment from shared object: Cannot allocate memory. Rest of content of messages.log are just OutOfMemoryError: unable to create new native thread.
Comment 6 anba 2012-05-11 12:20:59 UTC
Created attachment 119346 [details]
Threads after first error message
Comment 7 anba 2012-05-11 12:23:51 UTC
(In reply to comment #6)
> Created attachment 119346 [details]
> Threads after first error message

It is really complicated to get thoses thread dumps since
- most starts work
- 1 of 5 starts have the problem
- I am not sure at which time of the start the thread dump is usable for you. The attached dump was created after the first error message appeared. You can see this in the shell output from the thread dump.

After the first error message appeared you have typically between half a second to 3 second before the program exits.
Comment 8 anba 2012-05-11 12:30:31 UTC
(In reply to comment #7)

> The attached dump was created after the first error message appeared. You can
> see this in the shell output from the thread dump.
> 
Sorry, as I saw a minute agon the following message was already printed when I issued the stack trace "Threads after first error message":

Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard
pages failed.

A minute ago I was able to create a stack trace after the CodeCache lines. This stack trace is named "Thead dump after CodeCache error line"
Comment 9 anba 2012-05-11 12:31:53 UTC
Created attachment 119348 [details]
Thead dump after CodeCache error line
Comment 10 anba 2012-05-11 12:46:19 UTC
A small additional information: the return code of the netbeans process is 2 in case of the error.
Comment 11 anba 2012-06-04 09:18:43 UTC
We installed netbeans 7.2 Beta and had the same problems with starting using our JDK. We use a JDK where we install the JAI and JAI IO from SUN. If we do not install these software packages the start problem seems to go away (I have not had it since then) but then we have problems with our developed application. We switched of the features using JAI and JAI IO in our application to develop it using netbeans for these tests. So what does JAI and JAI IO in netbeans?
Comment 12 Antonin Nebuzelsky 2012-06-04 12:24:07 UTC
java.lang.UnsatisfiedLinkError: /usr/local64/java/jdk1.7.0_04_b20_jaxb2.2.5_xalan2.7.1/jre/lib/amd64/libt2k.so: /usr/local64/java/jdk1.7.0_04_b20_jaxb2.2.5_xalan2.7.1/jre/lib/amd64/libt2k.so: failed to map segment from shared object: Cannot allocate memory
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)

Not a NetBeans bug. A corrupt installation of JDK.

> our JDK. We use a JDK where we install the JAI and JAI IO from SUN.
> If we do not install these software packages the start problem seems to
> go away (I have not had it since then)

Then, please don't do it. Run NetBeans on a clean JDK.

> but then we have problems with our developed application

Use a different Java platform for your project. See main menu Tools / Java Platforms, and project Properties of your project.