Bug 201531 - Unrecoverable hang on Mac OS X
Unrecoverable hang on Mac OS X
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: JDK Problems
7.0.1
Macintosh Mac OS X
: P1 with 2 votes (vote)
: 7.1
Assigned To: Tomas Hurka
issues@platform
: RELNOTE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-01 21:48 UTC by smith277
Modified: 2014-02-16 11:23 UTC (History)
17 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Thread dump from crash. (134.50 KB, text/plain)
2011-10-15 15:54 UTC, smith277
Details
messages.log thread dump (60.68 KB, text/plain)
2011-10-19 20:15 UTC, smith277
Details
my messages.log (126.60 KB, application/octet-stream)
2011-11-09 21:09 UTC, enebo
Details
Badly-formatted Java code that seemed to trigger this freezing. (159.30 KB, application/octet-stream)
2011-11-16 17:55 UTC, headius2
Details
NB 7.1RC1 startup log (49.76 KB, text/plain)
2011-12-09 19:15 UTC, MTT727
Details
messages log (408.26 KB, application/octet-stream)
2011-12-12 23:51 UTC, MTT727
Details
messages log from the second crash (58.94 KB, application/octet-stream)
2011-12-12 23:52 UTC, MTT727
Details
last messages log - no crash (52.50 KB, application/octet-stream)
2011-12-12 23:53 UTC, MTT727
Details
stackshot.log (53.56 KB, application/octet-stream)
2011-12-13 13:50 UTC, hadrabap
Details
stackshot-syms.log (76.20 KB, application/octet-stream)
2011-12-13 13:50 UTC, hadrabap
Details
IDE Profiler Results (38.88 KB, application/octet-stream)
2011-12-13 14:10 UTC, hadrabap
Details
see comment 76 2011-12-13 22:06:22 UTC (605.98 KB, application/octet-stream)
2011-12-13 22:10 UTC, MTT727
Details
See comment 76 2011-12-13 22:06:22 UTC (655.63 KB, application/octet-stream)
2011-12-13 22:11 UTC, MTT727
Details
See comment 76 2011-12-13 22:06:22 UTC (1.45 MB, application/x-gzip)
2011-12-13 22:11 UTC, MTT727
Details
See comment 76 2011-12-13 22:06:22 UTC (1.43 MB, application/x-gzip)
2011-12-13 22:12 UTC, MTT727
Details
Correct stackshot-syms.log extracted from MTT727's attachement (74.82 KB, text/plain)
2011-12-14 20:04 UTC, Tomas Hurka
Details
stackshot-syms from freeze today (12/14 @ 14:58) (65.67 KB, application/octet-stream)
2011-12-14 22:15 UTC, MTT727
Details
Mac OS "Sample" of Hung Netbeans process (134.70 KB, text/plain)
2011-12-19 16:08 UTC, kingc
Details
Another Activity Monitor Sample of hung Netbeans (104.83 KB, text/plain)
2011-12-19 20:13 UTC, MTT727
Details
sysdiagnose file associated with sample file above (2.17 MB, application/x-gzip)
2011-12-19 20:19 UTC, MTT727
Details
console log (20.45 KB, application/octet-stream)
2011-12-26 19:17 UTC, medeag
Details
vmmap (112.48 KB, application/octet-stream)
2011-12-26 19:18 UTC, medeag
Details
jdk7 hang - Activity Monitor sample (101.43 KB, text/plain)
2012-01-11 19:33 UTC, MTT727
Details
hang with safepoint logging - Activity Monitor Sample (103.04 KB, text/plain)
2012-01-13 18:03 UTC, MTT727
Details
hang with safepoint logging - Terminal output (2.64 KB, text/plain)
2012-01-13 18:04 UTC, MTT727
Details
hang with safepoint logging - messages.log (49.46 KB, application/octet-stream)
2012-01-13 18:06 UTC, MTT727
Details
hang with safepoint logging, no spellcheck - terminal output (6.26 KB, text/plain)
2012-01-14 00:44 UTC, MTT727
Details
hang with safepoint logging, no spellcheck - Activity Monitor sample (103.58 KB, text/plain)
2012-01-14 00:45 UTC, MTT727
Details
hang with safepoint logging, no spellcheck - messages.log (171.12 KB, application/octet-stream)
2012-01-14 00:46 UTC, MTT727
Details
Thread Dump of JSP processing that hangs IDE (98.32 KB, text/plain)
2012-01-26 17:41 UTC, bakarirum
Details
Happened again - activity monitor output (196.92 KB, text/plain)
2012-02-10 14:42 UTC, jag
Details
Happened again - safepoint output (7.00 KB, text/plain)
2012-02-10 14:44 UTC, jag
Details
Activity Monitor sample (106.67 KB, text/plain)
2012-02-11 19:19 UTC, MTT727
Details
messages.log (64.43 KB, application/octet-stream)
2012-02-11 19:27 UTC, MTT727
Details

Note You need to log in before you can comment on or make changes to this bug.
Description smith277 2011-09-01 21:48:19 UTC
Netbeans hangs (little "wait" spinners pops up and never goes away) while editing java code and has to be killed with kill or ActivityMonitor.   I have not been able to pinpoint exactly what I am doing when it freezes up.  Of course, I lose all of my changes since last save, so this is a big problem.  It has happened at least 15 times.
Comment 1 David Strupl 2011-09-02 11:09:49 UTC
Hello,
please generate thread dump

http://wiki.netbeans.org/GenerateThreadDump

attach it here and reopen. Thanks,

David
Comment 2 smith277 2011-10-15 15:54:43 UTC
Created attachment 112085 [details]
Thread dump from crash. 

Thread dump from crash.  This is from 7.1 beta.  Happens on 7.01 as well.  Completely hangs and must be killed.
Comment 3 Marian Mirilovic 2011-10-17 07:59:36 UTC
(In reply to comment #2)
> Created an attachment (id=112085) [details]
> Thread dump from crash. 

This is the messages.log not a thread-dump .. in case of hang we need thread-dump.
Comment 4 smith277 2011-10-17 14:58:49 UTC
I was not able to attach to the process to get the thread dump using the procedure on the link sent to me by the first responder at http://wiki.netbeans.org/GenerateThreadDump.  I already tried the CTRL-\ method which did not output anything.

I also tried increasing the minimum memory size from the default of 32 to 256 in netbeans.conf.
 
Here is what I tried:


ALEXMAC:etc alexsmith$ jps -lm
1807 org.netbeans.Main --userdir /Users/alexsmith/.netbeans/7.0 --branding nb
1862 sun.tools.jps.Jps -lm
ALEXMAC:etc alexsmith$ jstack 1807 
1807: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
ALEXMAC:etc alexsmith$ jstack -F 1807 
Attaching to process ID 1807, please wait...
attach: task_for_pid(1807) failed (5)
Error attaching to process: Error attaching to process, or no such process

Any suggestions?  

Thanks!

Alex
Comment 5 Marian Mirilovic 2011-10-17 20:26:58 UTC
Have you tried :
    * send the QUIT signal to the Java VM running the IDE
      kill -QUIT process_id
      process_id is the process number of the respective java process
    * The thread dump is printed into the terminal. Just assure that the line buffer is long enough so that the whole thread dump fits in. 



?
Comment 6 smith277 2011-10-17 21:12:35 UTC
Tried a kill -QUIT on what I believe is the JVM (PID 4413 below), as below and that seems to have not killed the process.


4180 s000  S      0:00.08 /bin/bash /Applications//NetBeans//NetBeans 7.0.1.app/Contents/MacOS/../Resources/NetBeans/bin/../platform/lib/nbexec --userdir /Users/alexsmith/.net
 4413 s000  R      1:56.71 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Djdk.home=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
 4436 s000  R+     0:00.00 ps x
ALEXMAC:etc alexsmith$ kill -QUIT 4413
Comment 7 Marian Mirilovic 2011-10-18 07:05:02 UTC
(In reply to comment #6)
> Tried a kill -QUIT on what I believe is the JVM (PID 4413 below), as below and
> that seems to have not killed the process.
> 

.. and what was written into messages.log ? There should be thread-dump
Comment 8 smith277 2011-10-18 17:48:39 UTC
Where do I find the file messages.log?  Nothing was dumped to the terminal.
Comment 9 Marian Mirilovic 2011-10-19 07:32:45 UTC
(In reply to comment #8)
> Where do I find the file messages.log?  Nothing was dumped to the terminal.

http://wiki.netbeans.org/FaqLogMessagesFile
Comment 10 smith277 2011-10-19 20:15:42 UTC
Created attachment 112234 [details]
messages.log thread dump

Here is the message.log file.
Comment 11 enebo 2011-11-09 21:07:14 UTC
Ok.  This bug has happened to me and the only other co-worker I know using MacOS Lion.  I fairly recently upgraded to Lion and 7.0.1 was working fine before the upgrade.  Strangely enough, a week ago I would get this error about 1 time every ten minutes or so always when editing (that day it was netbeans source code but it also happens in other Java projects).  I decided to wipe out the cache directory and now it has only happened twice in the last two weeks.  It always happens part way through a Java edit in what I think is that state between when the syntax is broken because it is missing a '{' or a '}' and I am in the middle of changing source.

Strangely enough when this does happen it is impossible to get a thread dump.  I can connect via visualvm but the thread tab is missing.  Seems like something deep in JVM is breaking.  Needless to say jstack is incapable of dumping either. If this is helpful I get this on a jstack -F:

attach: task_for_pid(95266) failed (5)

I will attach my last messages.log file.
Comment 12 enebo 2011-11-09 21:09:37 UTC
Created attachment 113061 [details]
my messages.log
Comment 13 headius2 2011-11-16 17:17:46 UTC
I am not on Lion, I am on Snow Leopard; but I also have the problem.

It's the current (as of this writing NB 7.01 with all updates installed, running on current Apple JDK 1.6.0_26. I can't get a normal Java thread dump, but when the process hung I did get an Activity Monitor sample. Seems like all threads are stuck in mach_msg_trap.

https://gist.github.com/1370627

Reopening in hopes of this getting addressed, or at least investigated.
Comment 14 headius2 2011-11-16 17:54:08 UTC
More information...

Most recently the problem happened to me repeatedly while editing a Java file with a ton of errors in it. I had pasted C code there so I could see it in-line during a port. NB became completely unusable...I'd get a line or two of code out before it would freeze again. Removing the offending code brought it back to stability.

I will attach the file, RubyIO.java, with the bad code in place.
Comment 15 headius2 2011-11-16 17:55:38 UTC
Created attachment 113268 [details]
Badly-formatted Java code that seemed to trigger this freezing.

This is the file with bad code (pasted C) that caused NB to become unstable.
Comment 16 headius2 2011-11-17 06:26:37 UTC
It just happened again. The high number of errors in a Java file is definitely related. I was editing a file, made a few changes and paused mid-line. As a result, there were thousands of errors in the file. Suddenly, NetBeans froze and had to be killed.
Comment 17 headius2 2011-11-17 06:33:17 UTC
I can almost trigger this at will now. Given a sufficiently large Java file, if I add a closing brace that causes the bulk of the remainder of the file to be all errors, NB usually hangs. Not always, but usually.
Comment 18 headius2 2011-11-17 07:36:14 UTC
Ok, this time I had a hang when opening a new, large Java file. So it's something to do with the re-scanning of the file?
Comment 19 MTT727 2011-11-22 18:17:31 UTC
I am having this exact problem.  My 3,966 line program will not take even a properly formed new line (eg., sout <tab>) without hanging about a second later.  One thing I notice, although Activity Monitor does not show much CPU usage by Netbeans, my fan starts going shortly after it loads - very few applications have that effect - and, even with no program code loaded, it claims 318MB of real memory and 781MB of virtual memory.  Seems like a lot - more than 3x any other application I use except Parallels.
Comment 20 Antonin Nebuzelsky 2011-11-24 13:45:21 UTC
Reassigning to editor for evaluation.
Comment 21 MTT727 2011-11-24 18:26:27 UTC
(Further to comment #19)

Mine has now started seizing up even when editing comments.

The Windows version of Netbeans 7.0.1 running on the same computer (Parallels Virtual Machine) using the same set of source files and external libraries does not have this problem.
Comment 22 Miloslav Metelka 2011-11-28 15:02:03 UTC
MTT727:
Since there were a number of bugs fixed in 7.1 could you please download NB 7.1 RC1 and test the issue there?
 In case it's reproducible please click on "Profile the IDE" icon in main toolbar then perform the action then click on the same icon and export the snapshot and then attach it to this issue. Thanks.
Comment 23 MTT727 2011-11-28 22:14:26 UTC
7.1 RC1 is much better.  It has only frozen once in about an hour of work.  I will keep you posted.  However, I do not see a "Profile the IDE" button on the main toolbar.  Only a "Profile the Main Project" icon. Am I missing it?  I'm not sure it would be helpful anyway, since when the IDE freezes, it's not possible to click the icon again - the entire IDE is unresponsive.  

Just to make sure I'm clear, the issue is with the IDE freezing, not the project I'm working on in the IDE.  In fact, if the project is running when the IDE freezes (i.e., I have clicked run main project from inside the IDE), the project continues to run normally.

 It would be great to be able to run the IDE inside an external profiler to catch this error, though.
Comment 24 Miloslav Metelka 2011-11-29 14:25:05 UTC
Thanks for info. Then in case the IDE freezes could you run

jstack -l <pid>

or for hung process:

jstack -F -l <pid>

and attach the output to this issue? Thanks.
Comment 25 headius2 2011-11-30 10:36:43 UTC
In my case, when Netbeans freezes, it does not respond to jstack at all. The native thread dump from OS X shows that all threads are basically stuck waiting for some OS X event logic I do not understand.

I have theorized that there could be a bug in the OS X JDK's Cocoa support, but I have no idea how to investigate that.
Comment 26 Miloslav Metelka 2011-11-30 14:59:06 UTC
Unfortunately without a thread dump we are unable to make any further investigation so I close it as invalid.
In case you would find any further information please reopen the issue. Thanks.
Comment 27 headius2 2011-12-02 06:24:43 UTC
I find it incredibly offensive that you close this bug because you can't get a Java thread dump. I did provide a native thread dump that should help you investigate. I have provided steps for reproduction. I'm even willing to trigger the freeze on my system and give one of your engineers access to investigate it.

How's this for a response: without this bug fixed, I can't use NetBeans, and I'll encourage others not to use it. You make enemies of your users by closing bugs as invalid that are obviously valid.

Now, perhaps we can reopen this and work together to fix it, rather than trying to brush it under the carpet?
Comment 28 David Strupl 2011-12-02 07:29:03 UTC
Unfortunately there is no java thread dump attached to this bug report. As Mila said: without the dump we cannot do anything.

Supplying native thread dump is nice but we don't have the capacity to process it - if the crash is VM crash it has to be reported to the project supplying the VM.

We are very sorry that you found closing the report as offensive. I am changing the resolution to "Works for me" which is essentially the same but hopefully less offensive. Because I am running on MacOS X Lion and it is not happening here. If we are able to reproduce the problem on one machine here we can reopen on continue with investigation.

If it is not possible to get a java level thread dump would it be possible to replicate your environment here? I mean getting us the source file that causes the trouble. I am not saying that it will for 100% lead to a resolution but it is worth trying.
Comment 29 fwiffo 2011-12-02 21:11:03 UTC
I was able to reproduce this trivially with the java file that headius2 previously attached here:

http://netbeans.org/bugzilla/show_bug.cgi?id=201531#c15

Same setup, Netbeans 7.0.1, Mac OS X Lion, completely unable to generate a JVM stack trace.
Comment 30 headius2 2011-12-03 08:18:10 UTC
I am willing to do whatever is necessary to help you reproduce this issue locally.

I am on Snow Leopard, 10.6.8.

My Netbeans should be 7.0 + whatever updates come along automatically.

My Java version is 1.6.0_26 that comes automatically with OS X updates.

The file provided can reproduce the hang, as fwiffo reported.

I am willing to produce a hang and make my personal laptop available to your engineers to investigate the problem.

What more is it you want to keep this bug open and investigate it?
Comment 31 headius2 2011-12-03 08:21:09 UTC
I will also state again: it certainly may be a VM issue, but *no other programs I run exhibit this behavior*. I a willing to help find the problem, but since Netbeans is exposing this issue, Netbeans bears the brunt of investigating it. Perhaps it's not fair, but life sucks. Let's just find the problem, together, and get it out of the way.
Comment 32 David Strupl 2011-12-03 09:27:01 UTC
Both of the reporters that are able to reproduce this: can you give me step by step instructions how to reproduce in your setup?

I have just tried:

1. Created empty project and put the attached file into org.jruby package
2. opened the file
3. nothing bad happened

Tried both 7.0.1 and 7.1 RC1 on OSX 10.7.2 with following setup:

Product Version         = NetBeans IDE 7.1 RC1 (Build 20111125-3197a272e915) (#3197a272e915)
Operating System        = Mac OS X version 10.7.2 running on x86_64
Java; VM; Vendor        = 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402; Apple Inc.
Runtime                 = Java(TM) SE Runtime Environment 1.6.0_29-b11-402-11M3527

I am not sure we "bear the brunt of investigating it". If your Ford car uses Michelin tires and one breaks you are going to blame Ford or Michelin? Philosophy aside we are trying to investigate all problems where it is in our power to do something about it. With VM crashes our powers are rather limited (ours == NetBeans project).
Comment 33 Miloslav Metelka 2011-12-05 10:05:47 UTC
We have revisited provided https://gist.github.com/1370627 and agreed that the we can't get any useful info for us from it.

Could you please run the IDE in interpreted mode by adding "-J-Xint" into netbeans.conf whether that makes any difference? Thanks.

I'm also wondering if there would be any difference between David's 1.6.0_29 and headius2's 1.6.0_26 regarding the problem? But AFAIK downgrading of JDK on Mac is not easy (or maybe even not possible) but IIRC it should be possible to download and unpack the JDK into another dir (let's say $jdk) and basically do (in console)

        export JAVA_HOME="$jdk"
        export JDK_HOME="$jdk"
        export PATH="$jdk/bin:$PATH"

You may then check java -version to ensure the current version and then run NB IDE from that console. Thanks.
Comment 34 smith277 2011-12-05 14:59:47 UTC
I see the crash in all versions including 7.1 RC1.   Here is the version of Java I am running:


Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

Alex
Comment 35 headius2 2011-12-05 15:37:53 UTC
Unfortunately, I will have to stop using NetBeans. It crashed for me repeatedly today trying to edit a large file with many errors, losing work each time. It is very unfortunate that I have to make this move...NetBeans had gotten really nice, and I have tried to support it for years...even defending it to others. I'm sorry you are not interested in working with me to investigate this problem, but it's impossible to continue using NetBeans when it hangs multiple times per day.

Feel free to contact me directly if you want to work on solving this problem. I will keep NetBeans installed so I can reproduce the issue at will.
Comment 36 Miloslav Metelka 2011-12-06 11:05:24 UTC
headius2: This is not a common issue of all NB installations on Mac, there must be something HW or SW specific on your machine that causes this problem to appear. This is probably not a HW error since it happens to several other users too.

1) Since jstack fails we should attempt to eliminate all native processing first. Please goto NB installation and rename netbeans/platform/modules/ext/jna-3.2.7.jar to e.g. "jna-3.2.7.jar.orig" to disable its loading. Then run the IDE with a fresh userdir (this is important in order to get rid of jar files caching; you could possibly also just remove $userdir/var/cache/all-* but if you can please start with fresh userdir). Native filesystem listening will not start and AFAIK there's some native drag&drop extension in window system too but the IDE should start fine. You should see in the messages.log that native listening fails (or attach messages.log to this issue for us to check that). Run the IDE to see if the problem occurs or not.

2) Since 7.0.1 was the first version with new editor view hierarchy, could you test whether the problem occurs on NB 6.9.1 as well?
Comment 37 enebo 2011-12-06 17:20:06 UTC
I am trying what you last asked for with 7.0.1 without jna started up.  I can verify in messages.log it is not loading.  I will let you know if I can get this issue to happen or not.
Comment 38 John Jullion-ceccarelli 2011-12-09 16:42:52 UTC
please work with enebo and others to reproduce on their systems if we cannot reproduce on ours. enough anecdotal evidence shows this is indeed happening.
Comment 39 MTT727 2011-12-09 16:59:40 UTC
I retract my comment about 7.1RC1 being better with respect to this behavior.  It is freezing frequently now.

My work around has been to run the Windows version of 7.0.1 on the same machine, using the same source files and 3rd party libs.  I notice that this exhibits the same slight pause that is a hallmark of an imminent freeze on the OS X version; however, the program recovers under WinXP.

To make sure I understand the instructions in comment 36, specifically "Then run the IDE with a fresh userdir," does this mean to run it while logged in as a different user?  If so, this will also entail moving or copying all of my project's source files and external libraries to a place where they're accessible to this different user account.  Not a big deal - I just want to make sure I understand what you're asking for before I do it.

Thanks.
Comment 40 hansolo_ 2011-12-09 17:10:15 UTC
I had this problem for a while now and i have the feeling that it is somehow related to the code analysis NetBeans is doing when typing something. It most of the times happens when i edit some code and press a "." or edit braces etc.
Also interesting is that it runs for a longer period stable until it crashes for the first time, after that it crashes mostly every 10-20 minutes on my mac.
It seems to help to save the file manualy every few minutes but it will crash at some point anyway.
Comment 41 Jesse Glick 2011-12-09 18:02:53 UTC
(In reply to comment #39)
> To make sure I understand the instructions in comment 36, specifically "Then
> run the IDE with a fresh userdir," does this mean to run it while logged in as
> a different user?

No. The user directory can be specified as --userdir <path> when running .../bin/netbeans from the command line, and can also be set in .../etc/netbeans.conf. But for forcing the IDE to acknowledge the change in JARs, it suffices to touch .../platform/.lastModified (the timestamp just needs to change for the IDE to recheck what JARs are there).

By the way, for those graciously helping to reproduce this issue, you may want to use the Auto Save plugin [1] to minimize loss of work.

[1] http://plugins.netbeans.org/plugin/37077/autosave-module-for-6-9-and-later
Comment 42 Jesse Glick 2011-12-09 18:25:37 UTC
The hypothesis that JNA calls are related is supported by the presence of a FSEvents-related callback in the gist, possibly interfering with JVM_GetClassInterfaces.

Adding -J-Dorg.netbeans.modules.masterfs.watcher.disable=true to the list of options in netbeans.conf will disable native file listening, which is one of the major uses of JNA in the IDE (though I have no idea how this would be related to the Java editor).

-J-Dnetbeans.keyring.no.native=true will similarly
disable the JNA-based Keychain integration - another major usage, though again unlikely to be in use suddenly while editing a file.
Comment 43 Jesse Glick 2011-12-09 18:35:36 UTC
Other things to try, still working on the JNA hypothesis:

1. Configure -J-Djna.protected=true for memory safety (at the expense of speed); set LD_PRELOAD to libjsig.so or something like this if available in the JRE.

2. Try upgrading to a newer JNA release in case there was a known bug (e.g. for 3.3.0 -> 3.4.0 "Avoid crash with very long Strings (> 150k in length)"). Possible by replacing platform/modules/ext/jna-3.2.7.jar with a new JAR _with the same name_ (and touching platform/.lastModified), or adding e.g. platform/modules/ext/jna-3.4.0.jar but editing platform/modules/org-netbeans-libs-jna.jar!/META-INF/MANIFEST.MF#Class-Path to refer to it (again also touching platform/.lastModified).

3. Try to log all JNA calls to an external file (with flush after each call) to see if these immediately precede a crash. Not sure where this hook would be in 3.2.7.
Comment 44 David Strupl 2011-12-09 18:59:00 UTC
I have changed the category to "JDK Problems" which is closest category to native crash. This got the bug assigned to Tonda, if I would have put filesystems it would probably go to Jarda. As I said in one of the mail conversations there is no reason to believe Mila is equipped to solve this problem. Tondo, please re-assign (while leaving the product/component) to a suitable person.
Comment 45 MTT727 2011-12-09 19:15:48 UTC
Created attachment 114011 [details]
NB 7.1RC1 startup log
Comment 46 MTT727 2011-12-09 19:16:29 UTC
On the chance it may provide a clue, I've uploaded the log file generated when I start 7.1RC1.  It includes a bunch of warning messages, but they're beyond my ken.  If they suggest actions I should take, please let me know.
Comment 47 Jesse Glick 2011-12-10 12:52:07 UTC
(In reply to comment #46)
> It includes a bunch of warning messages

Harmless.
Comment 48 Tomas Danek 2011-12-12 10:11:19 UTC
I am not able to reproduce this problem on my Lion with latest 7.1 build; here's what I did:
- started ide with fresh userdir
- created empty java project (j2se)
- created java file into org.jruby using new file wizard
- replaced default content of java file with attached RubyIO.java (copy pasted from textedit)
- got a lot of red underlines, but still was able to edit, i.e. adding System.out's, invoking code completion, reformatting code. No freeze at all.

Am I doing anything different that you? Can you give me exact steps to reproduce to try again?


Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402
System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb)
User directory: /Users/tomas/.netbeans/7.1
Cache directory: /Users/tomas/.netbeans/7.1/var/cache

HW: MB Pro (Mid 2010), OS X 10.7.2
Comment 49 Petr Jiricka 2011-12-12 15:15:13 UTC
I can not reproduce either. What I did:
1. Checked out JRuby sources from git
2. Opened RubyIO.java
3. Did lots of editing, both at the beginning and end of the file, in both parseable and nonparseable file, focused on curly braces, ...

Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402
System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb)
Comment 50 Geertjan Wielenga 2011-12-12 15:36:23 UTC
Tom, Charles, et al, I think we're going to have to come to a point -- especially since we're now getting very little response from you -- where we'll be downgrading this issue again, especially with a new release coming out very soon. Many people have tried to reproduce the problems you've had and so far you haven't given feedback on the JNA settings you were advised above to change so that we can figure out where this problem is coming from. Can you respond very soon with the current status of that?
Comment 51 han.solo 2011-12-12 17:10:26 UTC
I followed the instructions on the comments in this task and disabled JNA. This seems to help at least in my case when i work with JavaFX 2.1.0 beta where i encountered most of the crashes before. Now after more than 2 hours of work i still have no crash which is a big improvement.
I remember that i had the problems also working on "standard" java code but i did not find the time to test it now...will keep you updated.
After i have disabled JNA now i get an error message every time i start NetBeans with the following message:

***************************************************************************************************

java.lang.ClassNotFoundException: com.sun.jna.Pointer
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:262)
Caused: java.lang.ClassNotFoundException: com.sun.jna.Pointer starting from ModuleCL@5230b601[org.netbeans.modules.keyring.impl] with possible defining loaders null and declared parents [ModuleCL@1be2f6b0[org.netbeans.modules.keyring], ModuleCL@5694fe42[org.openide.dialogs], org.netbeans.MainImpl$BootClassLoader@693a317a, ModuleCL@5c6c2308[org.openide.awt], ModuleCL@2872d398[org.netbeans.libs.jna]]
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:264)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused: java.lang.NoClassDefFoundError: com/sun/jna/Pointer
	at org.netbeans.modules.keyring.mac.MacProvider.read(MacProvider.java:71)
	at org.netbeans.api.keyring.Keyring.read(Keyring.java:93)
	at org.netbeans.modules.kenai.ui.spi.UIUtils.loadPassword(UIUtils.java:181)
	at org.netbeans.modules.kenai.ui.spi.UIUtils.tryLogin(UIUtils.java:142)
	at org.netbeans.modules.kenai.ui.KenaiLoginTask.run(KenaiLoginTask.java:69)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:428)
	at org.netbeans.modules.kenai.ui.ModuleLifecycleManager.restored(ModuleLifecycleManager.java:62)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:426)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:366)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:1080)
	at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:340)
	at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:276)
	at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:294)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:172)
	at org.netbeans.core.startup.Main.start(Main.java:308)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
[catch] at java.lang.Thread.run(Thread.java:680)


***************************************************************************************************
Comment 52 enebo 2011-12-12 17:18:09 UTC
I pointed out (I think email) I had tried removing jna and ran over three days without a hang.  Then in another email thread you were part of I re-enabled (which was Friday) but I have not seen the hang yet.  Another thing worth pointing out is that I have not been programming this weekend so the spate of emails was not us being unresponsive because I didn't want to be.

Your theory about environment is interesting....Both Charlie and I have community-ruby installed (he can confirm that on his end).  It is more grist for the mill.  Although I was using Java editing in every single hang and have never had it hang editing Ruby code.

My current activity is to follow Jesse suggestion of disabling one thing at a time once I can get this thing to hang once again.  This might be slow progress since at times I get this 20x a day and other times it takes a few days to hang.  Is this ok?  Even if you guys close this I will try and help narrow it down. 

I notice that six people seem to have found this issue and have contributed to this ticket.  Perhaps we all have something in common in our env?  Is there perhaps some nice way for us to compare notes?
Comment 53 Geertjan Wielenga 2011-12-12 17:27:17 UTC
OK, thanks a lot Tom (and apologies for pushing) and Gerrit. We will certainly not close this until we can narrow down and fix it -- though whether it should be a blocker for the 7.1 release seems questionable now that very many Lion users have not seen any of these problems when using NetBeans 7.1. 

Abd the causes seem to be diverse, i.e., e.g., you and Charles Nutter have Ruby-related plugins installed while Gerrit is working mainly in the JavaFX area. 

So:

1. Please keep this issue updated on any problems occurring after the JNA change that you've implemented so far, Gerrit and Tom.

2. And, all 6 people (and anyone else) leaving comments here, please be very specific about your environment -- i.e., state which version of the IDE you're using, your version of Java, your OS (and which version, i.e., since it's this issue, also which specific version of Mac, i.e., let's make sure this is only Lion and not something before that), as well as any plugins you might have installed. (Ideally, you'd uninstall all plugins, but that would be suboptimal since you need the plugins, e.g., Ruby-related and JavaFX-related, to be able to do the work you're interested in).
Comment 54 MTT727 2011-12-12 18:35:04 UTC
It seems to be resolved for me.  I have been working with 7.1RC1 for about 3 hours today with no issues.  I am working on a straight-ahead Java SE application that uses JFreeChart external libs.  My issue arose, in 7.0.1, when I upgraded from Snow Leopard to Lion.  I later moved, using Migration Assistant, all my apps and data, including Netbeans, to a new Macbook Pro with a native Lion installation, where the problem persisted, including after a re-install of 7.0.1 and fresh install 7.1RC1.

I did the following, which seems to have resolved the problem:

1. renamed netbeans/platform/modules/ext/jna-3.2.7.jar to jna-3.2.7.jar.orig
2. modified the timestamps on netbeans//platform/.lastModified

I did not change the userdir.

For those like me who access Netbeans through the GUI, and don't know how to accomplish these steps:

A.  If you don't have Finder set to show hidden files, follow the steps on this page: http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/
B.  Using Finder, navigate to and right click on Applications-Netbeans-Netbeans7[etc].app
C. Select "Show Package Contents" from the popup menu
D. Navigate to Contents-Resources-Netbeans-platform-modules-ext and rename the file as described in #1 above.
E.  Navigate back to platform and right click on .lastModified.  Select Open With-Other-TextEdit.app
This is an empty file and you want to leave it that way, but you need to modify it to get the timestamp to change, so type any letter into TextEdit.  It will tell you the file is locked - select the option to unlock it.  Delete the letter you just typed, then select File-Save a Version from the menu bar.  Close TextEdit.
F. [this is probably optional] In Finder, right click on .lastModified, select Get Info.  In the popup window, change the permissions to "read only".
G. Optionally, follow the steps from the link given in A above to re-hide hidden files.
Comment 55 Jesse Glick 2011-12-12 19:15:19 UTC
Charles says he can reproduce in 7.0.1 with or without JNA and the Ruby plugins, but cannot reproduce in 7.1. This either means that JNA is not involved and it is coincidental that MTT727 and han.solo failed to reproduce after disabling it; or that they are seeing some unrelated problem involving JNA, which would have to be diagnosed using the suggestions in comment #42 and comment #43.
Comment 56 han.solo 2011-12-12 20:47:28 UTC
The problem is still there...

I'm running 
- OS X Lion (10.7.2) 
- Java 1.6.0_29-b11-402-11M3527
- NetBeans 7.1 RC2
- JavaFX 2.1.0 beta

After i had disabled JNA like described in the comments i was able to work for around 2 hours without any problem. Then i stopped working, moved to the hotel and started the computer again and another 2 hours i was able to work before it happens again. After the problem occured once, it happens more often (feels like every 20 minutes) and it happens on clean/rebuild and during typing something.
Comment 57 MTT727 2011-12-12 23:30:49 UTC
>>The problem is still there...<< Same here, I'm afraid.  It ran for about 5 hours without a problem.  Then started crashing frequently, the first time when I had grabbed the edge of a component in form designer.  Rebooting helped, but I only got about 45 minutes out of it before it started crashing again.
Comment 58 Geertjan Wielenga 2011-12-12 23:32:04 UTC
When it happens, please attach log files to the issue, right now, nothing can be done with info provided -- we're not able to reproduce this ourselves.
Comment 59 Geertjan Wielenga 2011-12-12 23:41:27 UTC
If it crashes, something should be visible in the log file, please attach messages.log files from your .netbeans/var/log folder.
Comment 60 MTT727 2011-12-12 23:51:10 UTC
Created attachment 114072 [details]
messages log

I believe this log file was from the first crash after renaming the jar file and touching .lastmodified.
Comment 61 MTT727 2011-12-12 23:52:43 UTC
Created attachment 114073 [details]
messages log from the second crash
Comment 62 MTT727 2011-12-12 23:53:40 UTC
Created attachment 114074 [details]
last messages log - no crash
Comment 63 Geertjan Wielenga 2011-12-12 23:55:48 UTC
The crash files have JNA related info maybe someone can advise on that and look at those two files more closely:

Caused: java.lang.ClassNotFoundException: com.sun.jna.Pointer starting from ModuleCL@dc737be[org.netbeans.modules.keyring.impl] with possible defining loaders null and declared parents [org.netbeans.MainImpl$BootClassLoader@6b86768e, ModuleCL@1f52f43b[org.openide.awt], ModuleCL@681497b1[org.netbeans.libs.jna], ModuleCL@6534ae32[org.netbeans.modules.keyring], ModuleCL@25de152f[org.openide.dialogs]]
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:264)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused: java.lang.NoClassDefFoundError: com/sun/jna/Pointer
	at org.netbeans.modules.keyring.mac.MacProvider.read(MacProvider.java:71)
	at org.netbeans.api.keyring.Keyring.read(Keyring.java:93)
	at org.netbeans.modules.bugzilla.api.NBBugzillaUtils.getNBPassword(NBBugzillaUtils.java:103)
	at org.netbeans.modules.bugzilla.exceptionreporter.NBBugzillaAccessorImpl.getNBPassword(NBBugzillaAccessorImpl.java:75)
	at org.netbeans.modules.exceptions.ExceptionsSettings.<init>(ExceptionsSettings.java:76)
	at org.netbeans.modules.uihandler.Installer$SubmitInteractive.createDialog(Installer.java:1961)
	at org.netbeans.modules.uihandler.Installer$Submit.run(Installer.java:1626)
Comment 64 Jesse Glick 2011-12-13 00:04:44 UTC
The log files do not provide any indication of what caused the crash. Nor would we really expect them to - the log file is written by Java code which is no longer running when the VM goes down. Only some Mac-specific analysis tool can provide useful information about what the VM is doing.

The JNA-related exceptions merely indicate that the user successfully disabled JNA in the application. Their presence in the log files ending in a VM crash indicate that JNA was not responsible for that crash.

This presumably implies a bug in the Apple JDK. Have any of the reporters tried to use the JDK 7 Preview to see if it also suffers from the same problem?
Comment 65 Tomas Hurka 2011-12-13 13:03:55 UTC
(In reply to comment #59)
> If it crashes, something should be visible in the log file, please attach
> messages.log files from your .netbeans/var/log folder.
messages.log will not provide any info about the problem. It is native problem not related to the java.
Comment 66 Tomas Hurka 2011-12-13 13:06:36 UTC
(In reply to comment #64)
> This presumably implies a bug in the Apple JDK. Have any of the reporters tried
> to use the JDK 7 Preview to see if it also suffers from the same problem?
JDK 7 preview is in alpha(?) state. There is a still a lot of things, which does not work correctly, so it does not help much to run netbeans on JDK 7 preview.
Comment 67 Geertjan Wielenga 2011-12-13 13:09:10 UTC
>> If it crashes, something should be visible in the log file, please attach
>> messages.log files from your .netbeans/var/log folder.

>messages.log will not provide any info about the problem. It is native problem
>not related to the java.

So, what tools or whatever can be used to identify the problem here?
Comment 68 Tomas Hurka 2011-12-13 13:24:20 UTC
To anyone, who is able to reproduce the problem:

To diagnose it, we need native stack traces. The Activity Monitor sample does not provide information about native frame locations. It just lists nearest public symbol, which does not help much. Native stack traces can be obtained with /usr/libexec/stackshot (see man page for more details) and it should be invoked as follow:

sudo /usr/libexec/stackshot -i -p <PID of hung netbeans process> -t

the output from stackshot is in /Library/Logs/stackshot.log and /Library/Logs/stackshot-syms.log. Please attach both files. Thanks.
Comment 69 Tomas Hurka 2011-12-13 13:29:08 UTC
(In reply to comment #42)
> The hypothesis that JNA calls are related is supported by the presence of a
> FSEvents-related callback in the gist, possibly interfering with
> JVM_GetClassInterfaces.
I don't think so. JVM_GetClassInterfaces is just the nearest public symbol in executable. It does not mean that the code is actually in JVM_GetClassInterfaces function.
Comment 70 hadrabap 2011-12-13 13:48:39 UTC
(In reply to comment #68)

Here it is. I'm able to reproduce it only with NetBeans 7.0.1 official stable release. I've tried to open the RubyIO.java file in NetBeans Dev version (Build 20111130-5f2b1b034911) (#5f2b1b034911) and works fine—I can edit, save, undo changes…
Comment 71 hadrabap 2011-12-13 13:50:14 UTC
Created attachment 114096 [details]
stackshot.log
Comment 72 hadrabap 2011-12-13 13:50:45 UTC
Created attachment 114097 [details]
stackshot-syms.log
Comment 73 hadrabap 2011-12-13 14:10:10 UTC
Created attachment 114099 [details]
IDE Profiler Results

Well, running NetBeans using Server Hotspot (by adding -server option into netbeans.conf) makes IDE slow and eating memory, but enough fast to take a self profile LOL. Hope it helps.

My options are

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Xmx2048m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled -server"
Comment 74 Tomas Hurka 2011-12-13 14:22:49 UTC
(In reply to comment #70)
> (In reply to comment #68)
> 
> Here it is. I'm able to reproduce it only with NetBeans 7.0.1 official stable
> release. I've tried to open the RubyIO.java file in NetBeans Dev version (Build
> 20111130-5f2b1b034911) (#5f2b1b034911) and works fine—I can edit, save, undo
> changes…
Ok  thanks. Are you sure that this is the same issue others are having problem with? Did you try to obtain thread dump with jstack? Did it fail?
Comment 75 Tomas Hurka 2011-12-13 14:27:18 UTC
(In reply to comment #73)
> Created attachment 114099 [details]
> IDE Profiler Results
> 
> Well, running NetBeans using Server Hotspot (by adding -server option into
> netbeans.conf) makes IDE slow and eating memory, but enough fast to take a self
> profile LOL. Hope it helps.
> 
> My options are
> 
> netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m
> -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true
> -J-Dsun.java2d.noddraw=true -J-Xmx2048m -J-XX:+UseConcMarkSweepGC
> -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled -server"
Wait - what this has to do with this issue? This issue is about native hang on Mac OS X. 

On unrelated note, -server does not change anything, unless you run 32bit version of JVM. 64bit version has only server hotspot.

thurka$ java -client -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
thurka$
Comment 76 MTT727 2011-12-13 22:06:22 UTC
I'm way over my head here, but I started stackshot, started editing my project in Netbeans and got a crash while stackshot was still "gathering non time sensitive information."  When the crash happened, I hit the "key chord" that the manual page says triggers a snapshot.  I will upload the log files asked for.  In addition, I got two sysdiagnose files that I will also upload.
Comment 77 MTT727 2011-12-13 22:10:32 UTC
Created attachment 114113 [details]
see comment 76 2011-12-13 22:06:22 UTC
Comment 78 MTT727 2011-12-13 22:11:05 UTC
Created attachment 114114 [details]
See comment 76 2011-12-13 22:06:22 UTC
Comment 79 MTT727 2011-12-13 22:11:45 UTC
Created attachment 114115 [details]
See comment 76 2011-12-13 22:06:22 UTC
Comment 80 MTT727 2011-12-13 22:12:14 UTC
Created attachment 114116 [details]
See comment 76 2011-12-13 22:06:22 UTC
Comment 81 MTT727 2011-12-13 22:17:24 UTC
I neglected to mention, my Activity Monitor shows two PIDs for Netbeans.  One, named "Netbeans" with 45 threads (now not responding) is 2318, and that's the PID I used in the stackshot command line.  The other, 2102, is named "Netbeans 7.1 RC1" and has one thread (not flagged as not responding).
Comment 82 Tomas Hurka 2011-12-14 15:37:32 UTC
(In reply to comment #76)
> I'm way over my head here, but I started stackshot, started editing my project
> in Netbeans and got a crash while stackshot was still "gathering non time
> sensitive information."  When the crash happened, I hit the "key chord" that
> the manual page says triggers a snapshot.  I will upload the log files asked
> for.  In addition, I got two sysdiagnose files that I will also upload.
I am sorry, but you did not follow the steps I posted in comment #68. You ran the stackshot on whole system and for a long time, while we need just one stack trace from the NetBeans java process when it hangs. Therefor I posted that you should run stackshot with '-i' option, which does an immediate snapshot, and exit. This together with '-p' option gives us stack traces from java process at the time it is hung. See 
stackshot.log and stackshot-syms.log attachements from 'hadrabap' for example how the files should look like. BTW: If you need to find out process id of netbeans java process, use
jps -l
from commandline.

Please, try it once more with correct arguments. Thanks!
Comment 83 MTT727 2011-12-14 18:07:44 UTC
It appears the logs are cumulative, that's why it looks like it ran a long time.   As I said, Netbeans crashed very shortly after I started stackshot (the final time I started it - I had run it a few times earlier in the day). 

I simply copied and pasted the command from your comment, substituting the PID I got from Activity Monitor.  Here is the record of it from secure.log - I believe it is exactly as you specified:

Dec 13 15:54:04 Macs-MBP11 sudo[3231]:      Mac : TTY=ttys001 ; PWD=/Users/Mac ; USER=root ; COMMAND=/usr/libexec/stackshot -i -p 2318 -t

After Netbeans crashed, I tried to run it again:
12/13/11 3:57:19.257 PM sudo:      Mac : TTY=ttys001 ; PWD=/Users/Mac ; USER=root ; COMMAND=/usr/libexec/stackshot -i -p 2318 -t
and got an error that "a previously spawned sysdiagnose is still running", but I pressed cntrl-option-cmd-shift-period and got the second snapshot.

So, if you search my stackshot-syms log for "System stack snapshot (1 iteration(s)) initiated on GMT Tue Dec 13 21:54:04 2011" you will see the snapshot that was taken right about the time Netbeans crashed, maybe just before.  Then search "System stack snapshot (1 iteration(s)) initiated on GMT Tue Dec 13 21:57:19 2011" and you'll see the one that was for sure after the crash with only the relevant trace below it (PID: 2318).
Comment 84 Tomas Hurka 2011-12-14 20:02:29 UTC
(In reply to comment #83)
> It appears the logs are cumulative, that's why it looks like it ran a long
> time.   As I said, Netbeans crashed very shortly after I started stackshot (the
> final time I started it - I had run it a few times earlier in the day). 
> 
> I simply copied and pasted the command from your comment, substituting the PID
> I got from Activity Monitor.  Here is the record of it from secure.log - I
> believe it is exactly as you specified:
> 
> Dec 13 15:54:04 Macs-MBP11 sudo[3231]:      Mac : TTY=ttys001 ; PWD=/Users/Mac
> ; USER=root ; COMMAND=/usr/libexec/stackshot -i -p 2318 -t
> 
> After Netbeans crashed, I tried to run it again:
> 12/13/11 3:57:19.257 PM sudo:      Mac : TTY=ttys001 ; PWD=/Users/Mac ;
> USER=root ; COMMAND=/usr/libexec/stackshot -i -p 2318 -t
> and got an error that "a previously spawned sysdiagnose is still running", but
> I pressed cntrl-option-cmd-shift-period and got the second snapshot.
You are right, you used correct command. The problem was that you did not clear the stackshot-syms.log and stackshot.log before invoking stackshot. 

> So, if you search my stackshot-syms log for "System stack snapshot (1
> iteration(s)) initiated on GMT Tue Dec 13 21:54:04 2011" you will see the
> snapshot that was taken right about the time Netbeans crashed, maybe just
> before.  Then search "System stack snapshot (1 iteration(s)) initiated on GMT
> Tue Dec 13 21:57:19 2011" and you'll see the one that was for sure after the
> crash with only the relevant trace below it (PID: 2318).
Yes, I have it. I will attach it.
Comment 85 Tomas Hurka 2011-12-14 20:04:50 UTC
Created attachment 114199 [details]
Correct stackshot-syms.log extracted from MTT727's attachement
Comment 86 MTT727 2011-12-14 22:15:44 UTC
Created attachment 114200 [details]
stackshot-syms from freeze today (12/14 @ 14:58)

Top.txt shows the process to be "Running" after the crash, although it shows as "Not Responding" in Activity Monitor. The only processes listed as "stuck" are  mdworker and special_file_handler.

In addition, these two parsemanager warning messages were in the system.log:

Dec 14 14:58:18 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: WARNING [org.netbeans.modules.java.source.parsing.JavacParser]: Javac returned startpos: 165,739 > endpos: -1

Dec 14 14:58:18 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for 54 ms.

Dec 14 14:58:20 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for 238 ms.

Dec 14 14:58:20 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.editor.java.JavaCodeTemplateFilter.<init>(JavaCodeTemplateFilter.java:84)

Dec 14 14:58:20 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for 193 ms.

Dec 14 14:58:22 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for 160 ms.

Dec 14 14:59:35 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for 165 ms.

Dec 14 15:00:03 Macs-MBP11 [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for 133 ms.
Comment 87 Tomas Hurka 2011-12-15 17:37:21 UTC
(In reply to comment #86)
> Created attachment 114200 [details]
> stackshot-syms from freeze today (12/14 @ 14:58)
Thanks.
 
> Top.txt shows the process to be "Running" after the crash, although it shows as
> "Not Responding" in Activity Monitor. 
Just to be clear that we are talking about the same thing. This is not a crash - process, which crashed, is no longer running after the crash, am I right? If it crashed, you cannot see it as "Running" in top. So it is a deadlock or a hang, but not a crash.

> In addition, these two parsemanager warning messages were in the system.log:
> 
> Dec 14 14:58:18 Macs-MBP11
> [0x0-0x3ef3ef].org.netbeans.ide.baseide.201111242103[12585]: WARNING
> [org.netbeans.modules.java.source.parsing.JavacParser]: Javac returned
> startpos: 165,739 > endpos: -1
This seems to be unrelated. What could be interesting, is the output from system logs. Run /Applications/Utilities/Console.app. Select 'All Messages' in the left and see if there is anything in the system log files around the time of the NetBeans' hang.
Comment 88 Tomas Hurka 2011-12-15 19:25:49 UTC
It looks like both MTT727 and hadrabap has Parallels Desktop installed. Is there anybody, who can reproduce it and does not have Parallels Desktop installed?
Comment 89 Tomas Hurka 2011-12-15 19:42:26 UTC
I am sorry to say so, but It looks like stackshot still does not provide enough information to diagnose the problem.
On Mac OS X 10.6, stack-traces from the "sample" command line tool, or from the "Sample" function in Activity Monitor does not have frame addresses. This problem is fixed on Mac OS X 10.7, so anybody experiencing the issue on Mac OS X 10.7, please attach output from the "sample" command line tool, or from the "Sample" function in Activity Monitor. On Mac OS X 10.6, stackshot and and output from vmmap <http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/vmmap.1.html> should be enough. Make sure that you are not able to get ordinary java thread dump with jstack <pid>. I would also like to know if there is anything interesting in system logs. Run /Applications/Utilities/Console.app. Select 'All Messages' in the left and see if there is anything in the system log files around the time of the NetBeans' hang. 

Thanks.
Comment 90 kingc 2011-12-19 16:06:18 UTC
I have been experiencing the hang for about a month.  I finally gave up and started using eclipse - yuck.

I am not using parallels,  the hang occurred when I entered a "{" just below the class definition.  jstack does not produce anything.

Product Version: NetBeans IDE 7.1 RC1 (Build 201111242103)
Java: 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402
System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb)
User directory: /Users/kingc1/.netbeans/7.1rc1
Cache directory: /Users/kingc1/.netbeans/7.1rc1/var/cache

Sample is attached.

From console output:
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate top level class: <error>
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.saic.opssync.model.bridge.<error> ]
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.saic.opssync.model.bridge.<error>$<error> ]
12/19/11 7:56:02.491 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.saic.opssync.model.bridge.<error>$<error>$<error> ]
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate top level class: <error>
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.modules.java.navigation.ElementScanningTask]: Duplicate enclosed element: <error>
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.saic.opssync.model.bridge.<error> ]
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.saic.opssync.model.bridge.<error>$<error> ]
12/19/11 7:56:03.689 AM [0x0-0x8ea8ea].org.netbeans.ide.baseide.201111242103: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.saic.opssync.model.bridge.<error>$<error>$<error> ]
Comment 91 kingc 2011-12-19 16:08:51 UTC
Created attachment 114307 [details]
Mac OS "Sample" of Hung Netbeans process
Comment 92 Tomas Hurka 2011-12-19 16:17:04 UTC
(In reply to comment #90)
> I have been experiencing the hang for about a month.  I finally gave up and
> started using eclipse - yuck.
> 
> I am not using parallels,  the hang occurred when I entered a "{" just below
> the class definition.  jstack does not produce anything.
What do you mean by 'anything'? Can you post the output from jstack?
Comment 93 kingc 2011-12-19 16:27:10 UTC
Sorry... "anything" was a bad word.  It did produce "something". :-p  41889 was the Netbeans process.  Showed up as "Not Responding" in Activity Monitor.

jstack -F 41889
Attaching to process ID 41889, please wait...
attach: task_for_pid(41889) failed (5)
Error attaching to process: Error attaching to process, or no such process
Comment 94 kingc 2011-12-19 16:29:41 UTC
BTW.  I was able to produce a hang by simply moving the scroll bar up.  I was going to try to repeat the hang by inserting a "{", so I brought up Netbeans, clicked on the tab to get to my file, and then started scrolling up, and netbeans hung.
Comment 95 Tomas Hurka 2011-12-19 16:33:28 UTC
(In reply to comment #93)
> Sorry... "anything" was a bad word.  It did produce "something". :-p  41889 was
> the Netbeans process.  Showed up as "Not Responding" in Activity Monitor.
> 
> jstack -F 41889
> Attaching to process ID 41889, please wait...
> attach: task_for_pid(41889) failed (5)
> Error attaching to process: Error attaching to process, or no such process
OK, thanks.

What about ordinary usage (without -F):
jstack 41889
Does it fail too?
Comment 96 kingc 2011-12-19 16:35:02 UTC
jstack 41889
41889: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
Comment 97 Tomas Hurka 2011-12-19 16:42:49 UTC
(In reply to comment #96)
> jstack 41889
> 41889: Unable to open socket file: target process not responding or HotSpot VM
> not loaded
> The -F option can be used when the target process is not responding
OK. So it looks like native hang, we are investigating.
Comment 98 MTT727 2011-12-19 20:13:31 UTC
Created attachment 114321 [details]
Another Activity Monitor Sample of hung Netbeans

In case it's helpful.  I will also attach the sysDiagnose file, which contains a number of logs from the same time.
Comment 99 MTT727 2011-12-19 20:19:20 UTC
Created attachment 114322 [details]
sysdiagnose file associated with sample file above
Comment 100 Tomas Hurka 2011-12-20 14:01:56 UTC
(In reply to comment #98)
> Created attachment 114321 [details]
> Another Activity Monitor Sample of hung Netbeans
Thanks.
Comment 101 medeag 2011-12-26 19:17:13 UTC
Created attachment 114460 [details]
console log

Finally freeze happened to me also: testing with all bundle and i have not closed netbeans for several days and then simple operation triggered this, not sure if the root of the problem is the same as with other people, since i saw this for the first time...

Product Version: NetBeans IDE 7.1 RC2 (Build 201111302200)
Java: 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402
System: Mac OS X version 10.6.8 running on x86_64; MacRoman; ka_GE (nb)
Comment 102 medeag 2011-12-26 19:18:21 UTC
Created attachment 114461 [details]
vmmap
Comment 103 medeag 2011-12-26 19:28:36 UTC
I have not quitted netbeans and after a while netbeans recovered from freezed state
Comment 104 Tomas Hurka 2011-12-27 10:44:38 UTC
(In reply to comment #103)
> I have not quitted netbeans and after a while netbeans recovered from freezed
> state
So it means that this is a different issue.
Comment 105 medeag 2011-12-27 15:15:50 UTC
(In reply to comment #104)
> (In reply to comment #103)
> > I have not quitted netbeans and after a while netbeans recovered from freezed
> > state
> So it means that this is a different issue.

Yes, more likely you are right, since it is really the first time that i have seen it... but just for information, maybe it will help somehow:

I was waiting about 1 min or more and seeing in activity monitor that process is marked as not responsive.
Comment 106 vettori 2011-12-28 15:39:17 UTC
WORKAROUND :

I was having a hard time with freeze every few minutes in the last two days. It happened also many times before since version 6.8.

It seems that turning off "Code Folding" solves the problem. Now it's a couple hours that it's working well.
Hope this helps finding the cause of the issue.
Comment 107 MTT727 2011-12-29 05:21:49 UTC
I still get the freeze with code folding disabled.
Comment 108 vettori 2011-12-29 10:22:21 UTC
Sad to say that after a day without freezing, it happened a couple times again, even with the Code Folding disabled.
What I can say is that having Code Folding disabled extremely reduced the freezes for me. With CF ON I couldn't work, it was freezing every few minutes.
Comment 109 vettori 2012-01-04 14:59:29 UTC
In the hope it will help to solve the issue: it's two full days that it doesn't freeze.
I'm using the -Xint option as suggested in one of the early comments.
It's very slow but at least it doesn't freeze.
Comment 110 otan 2012-01-08 12:00:25 UTC
I type fast. I notice that when I'm typing so fast (ie, writing javadoc), Netbeans 7.1 hangs. It happens to one of a class that I'm editing; it happens not once, not twice but consecutively four times. What I did to skip that horror is to open the file in Xcode and type the javadoc there. Maybe this comment can bring about a clue to this mystery bug.

It does not happen when I use Netbeans 7.0.1.
Comment 111 page80 2012-01-08 19:51:40 UTC
Just found this bug posting. I have also been having this issue for about 4 months now. I was running Snow Leopard and am now running Lion. The crash occurred on both. Otan is correct that it seems to happen more often when typing fast. I have two developers running Lion with Netbeans 7.0.1 and do not have any issues at all with crashing; therefore, although the issue may not be that prevalent, it is still an issue and a sever and serious one at that. I have tried both 7.0.1, 7.1 RC1 and 7.1 and the crash happens on all releases. The issue is not consistent, nor is it predictable. I hadn't had the crash for 2-3 weeks and then all of a sudden today it is back again. Netbeans is virtually unusable. I say virtually since as long as I'm willing to restart Netbeans every 5 minutes and am willing to lose code then there isn't a problem; however, this isn't the case and has made me consider switching to Eclipse. I'm hoping this gets resolved very soon.
Comment 112 page80 2012-01-08 21:39:22 UTC
Netbeans was crashing on my Mac today every 5 minutes. I disabled the Spellchecker and Spellchecker English Dictionary plugins and it hasn't crashed since. May be that the issue has just gone dormant again. Could someone else experiencing the problem try this and see if it solves the issue for them?
Comment 113 MTT727 2012-01-09 05:22:45 UTC
Mine still hangs with the spellchecking plugins disabled.  I went on to disable every plugin that I wasn't using in my SE project, and still get the hang.  

As with some other things I've tried, it did seem more stable for a while after I disabled the spellcheckers but, once it froze the first time, it it would freeze quickly after being restarted.
Comment 114 robshelby 2012-01-10 00:42:38 UTC
I downgraded to 7.0.1 and the constant freezing stopped during project scan..
Comment 115 David Strupl 2012-01-10 13:02:38 UTC
I am aware that JDK7 on Mac is still in preview phase but if someone is able to reproduce on JDK downloaded from here

http://jdk7.java.net/macportpreview/

it might help us to fix it also for the future JDK7 users on Mac. But first please make sure that it is indeed the type of freeze that this bug is about: the freeze where there is no way to invoke thread dump (if java thread dump is possible it is *not* this bug). This bug is only about the situation where the only dump possible is the native dump.
Comment 116 robshelby 2012-01-10 18:26:34 UTC
Yeah, that is the bug I'm experiencing.

I'm in the latest Snow Leopard. With the newest netbeans 7.1 and Dev version.

The processor is almost pegged while scanning a large project. Then NB becomes unresponsive and needs to be quit from Activity Monitor.

downgrading to NB 7.0.1 resolved the issue.
Comment 117 MTT727 2012-01-11 19:33:04 UTC
Created attachment 114810 [details]
jdk7 hang - Activity Monitor sample

I had no hangs using jdk7 for many hours, but it just froze.
Comment 118 MTT727 2012-01-11 19:42:39 UTC
Comment on attachment 114810 [details]
jdk7 hang - Activity Monitor sample

...and now it freezes every 10 seconds.  This common pattern of being stable for hours after changing configuration but hanging frequently after the first time seems to offer a clue - memory leak, cache filling up, etc?
Comment 119 MTT727 2012-01-12 17:38:06 UTC
Another possible hint -  after well over 100 hangs, I don't believe I've ever had it freeze while using GUI Builder,  only when editing source code directly.  This in spite of the fact that I'm in GUI Builder about half the time.
Comment 120 Tomas Hurka 2012-01-12 17:59:54 UTC
After stacktrace analysis it looks like there is some deadlock in safepoint synchronization. We need more information to be able to confirm safepoint synchronization problem. 

MTT727@netbeans.org please do the following:
1) add the following argument to JVM options:
-XX:+SafepointTimeout
the best way to do it is to modify etc/netbeans.conf file or run NetBeans via
bin/netbeans -J-XX:+SafepointTimeout

2) run NetBeans from terminal
3) when you get the hang, 
4) sample NetBeans using Activity Monitor and attach the sample (this is same as before)
5) attach the output from the terminal window 
6) attach the messages.log file from NetBeans userdir

Thanks.
Comment 121 MTT727 2012-01-13 18:03:33 UTC
Created attachment 114887 [details]
hang with safepoint logging - Activity Monitor Sample
Comment 122 MTT727 2012-01-13 18:04:18 UTC
Created attachment 114888 [details]
hang with safepoint logging - Terminal output
Comment 123 MTT727 2012-01-13 18:06:00 UTC
Created attachment 114889 [details]
hang with safepoint logging - messages.log
Comment 124 MTT727 2012-01-14 00:44:31 UTC
Created attachment 114902 [details]
hang with safepoint logging, no spellcheck - terminal output

After disabling the spellchecker plugins(2), it ran for many hours but gave an increasing number of error messages as the session went on.  It finally hung.  Disabling both spell checking and code folding might let it limp along for a long time.
Comment 125 MTT727 2012-01-14 00:45:37 UTC
Created attachment 114903 [details]
hang with safepoint logging, no spellcheck - Activity Monitor sample
Comment 126 MTT727 2012-01-14 00:46:20 UTC
Created attachment 114904 [details]
hang with safepoint logging, no spellcheck - messages.log
Comment 127 Masaki Katakai 2012-01-16 12:58:37 UTC
I'm not sure if it's related with this issue or not, but
I had small conversation with a Japanese user via twitter.

He is saying NetBeans 7.1 on Mac with community ruby-rails plugin
often hangs at opening a project.  However,
once he installed ScanOnDemand plugin, it solved!
Comment 128 Tomas Hurka 2012-01-16 13:05:45 UTC
(In reply to comment #127)
> I'm not sure if it's related with this issue or not, but
> I had small conversation with a Japanese user via twitter.
> 
> He is saying NetBeans 7.1 on Mac with community ruby-rails plugin
> often hangs at opening a project.  However,
> once he installed ScanOnDemand plugin, it solved!
This is different issue. Anyway it is always better to file a new issue, which can be closed as duplicate, than adding possibly unrelated problems to already filed issue.
Comment 129 vettori 2012-01-16 15:01:09 UTC
This comment to inform that after setting -Xint on January 4th, it has never freezed and I'm using Netbeans monday-friday for several hours a day.
Comment 130 robshelby 2012-01-18 15:39:46 UTC
What does -Xint do?

Do you guys have any ideas what the root cause it yet? I'd love to be able to use 7.1 again.

Thanks!
Comment 131 Inprimus 2012-01-19 17:09:55 UTC
Ok most definately hangs a lot for me when editing a large XML document, but I will say this. hen first switching on my computer, it doesn't hang for a few hours (about4) after which it starts to hang. I will say though it seems to hand when I am hitting brackets (especially when I try to close a code clock semantically} I will now try with the -Xint switch and see what happens.
Comment 132 vettori 2012-01-20 11:39:50 UTC
-Xint switches the VM to interpreted mode. It makes netbeans run very slow.

Not sure if it doesn't freeze anymore because being slow some race condition or thread locking doesn't happen anymore or if the problem lies in the compliation of the java code into native code.

Anyway I can confirm again that it never freezed since I'm using that option.
Comment 133 robshelby 2012-01-20 18:16:35 UTC
I'll give Xint a try.

I'm not sure if this helps, but it takes a few seconds longer to freeze when I only have one project opened.
Comment 134 hcunningham 2012-01-20 18:27:15 UTC
Just want to add 2 datapoints (no logs): 

1.  This bug just left me dead-in-the-water on my new MacBook Pro: 
OS X 10.6.7, 2.2 Ghz Intel Core i7, Memory 8 GB 1333 MHz DDR3 

2.  The bug does not happen on my 4-year-old MBPro running 10.5.x

3.  Happened about 20 minutes into an editing session ... I was changing literal strings in  a .java file.
Comment 135 robshelby 2012-01-20 18:30:09 UTC
If you downgrade back to 7.0.1, you can work on your Macbook Pro...

I have both installed on mine now...
Comment 136 robshelby 2012-01-23 15:48:24 UTC
How do i run Netbeans with -Xint?

When I run the bin with it, it just closes with "unknown option".
When i put that in the config, it instantly closes as well.

I tried:
--Xint, -Xint, -xint, --xint, -Xlint, --Xlint ... heh.
Comment 137 Jesse Glick 2012-01-23 22:48:31 UTC
(In reply to comment #136)
> How do i run Netbeans with -Xint?

Use -J-Xint to indicate to the NB launcher that this is a JVM option.

Sounding like a HotSpot compiler bug; try passing -XX:-PrintCompilation to see if some particular method is being compiled when the crash occurs.
Comment 138 Jesse Glick 2012-01-23 22:54:57 UTC
Sorry, -XX:+PrintCompilation that is.
           ^
Comment 139 bakarirum 2012-01-26 17:41:05 UTC
I am experiencing the same behavior on Windows.  I have a thread dump of the JSP file in which is occurs.  I will attach it.  I think this is what you guys are asking for.


Windows 7 Enterprise - Service Pack 1
Processor: core2 Dup E8500
Ram : 4 GIG
32-bit OS


Product Version: NetBeans IDE 7.0 (Build 201104080000)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows Vista version 6.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\NetbeansUserBase
Comment 140 bakarirum 2012-01-26 17:41:59 UTC
Created attachment 115281 [details]
Thread Dump of JSP processing that hangs IDE
Comment 141 bakarirum 2012-01-26 17:57:05 UTC
More specific information on reproducible results.

I am editing JSP file with around 900 lines.

I am adding a scriplet tag (<%=%>) and while adding this tag, the IDE represents a ton of lines below my edit line that says there are syntax errors.  If I "reformat" the code, the IDE will hang with reformatting.  I can kill the process in the IDE, but it still causes the IDE to hang while it is dumping all that atuff to the DUMP file I attached.  After several minutes (10 - 20), the IDE is still not responsive enough to work.  I can click "save" to save the file and eventually it will save, but I have to restart the IDE to "use" it again.
Comment 142 Tomas Hurka 2012-01-27 05:56:50 UTC
(In reply to comment #139)
> I am experiencing the same behavior on Windows.  I have a thread dump of the
> JSP file in which is occurs.  I will attach it.  I think this is what you guys
> are asking for.
> 
> 
> Windows 7 Enterprise - Service Pack 1
> Processor: core2 Dup E8500
> Ram : 4 GIG
> 32-bit OS
> 
> 
> Product Version: NetBeans IDE 7.0 (Build 201104080000)
> Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
> System: Windows Vista version 6.1 running on x86; Cp1252; en_US (nb)
> Userdir: C:\NetbeansUserBase

This is definitely different issue. This issue is Mac OS X only and one of the important symptoms is that you _cannot_ get a thread dump. Please fie a separate issue.
Comment 143 Tomas Hurka 2012-02-01 13:37:54 UTC
There is a new  Java for Mac OS X Developer Preview 11M3614+10M3614, which contain a possible fix for this issue. I would like to ask MTT727@netbeans.org to download preview from <https://developer.apple.com/downloads/index.action?name=Java%20for%20Mac%20OS%20X%20Developer%20Preview> and try to run NetBeans with this preview.   To do so, run netbeans from Terminal.app:
bin/netbeans -J-XX:+SafepointTimeout --jdkhome /Library/Java/JavaVirtualMachines/1.6.0_30-b12-409.jdk/Contents/Home

If you are to reproduce the problem please attach the information as last time
1) the output from the terminal window
2) the messages.log file from NetBeans userdir
3) sampling output from Activity Monitor

Thanks.
Comment 144 robshelby 2012-02-01 14:51:37 UTC
I installed the dev preview of Java. I'm still experiencing the same problem..

How do I attach files to this? I have a message log, heapdump and process sample for you.

Thanks,
-Rob
Comment 145 Tomas Hurka 2012-02-01 14:55:36 UTC
(In reply to comment #144)
> I installed the dev preview of Java. I'm still experiencing the same problem..
> 
> How do I attach files to this? I have a message log, heapdump and process
> sample for you.
Do I read it correctly that you have a heap dump? Do you have log from console?
Comment 146 jag 2012-02-07 19:55:17 UTC
I also installed the dev preview of Java (1.6.0_30-b12-409) and got the same problem.  CPU at 100%, nothing in messages.log that looked relevant.


# SafepointSynchronize::begin: Timeout detected:
# SafepointSynchronize::begin: Timed out while waiting for threads to stop.
# SafepointSynchronize::begin: Threads which did not reach the safepoint:
# "Thread-3" daemon prio=5 tid=7fb9b7198800 nid=0x1228af000 runnable [1228ae000]
   java.lang.Thread.State: RUNNABLE

# "AWT-AppKit" daemon prio=5 tid=7fb9b49cf000 nid=0x7fff7e426960 runnable [00000000]
   java.lang.Thread.State: RUNNABLE

# "Poller SunPKCS11-Darwin" daemon prio=1 tid=7fb9b3846000 nid=0x11d078000 runnable [11d077000]
   java.lang.Thread.State: RUNNABLE

# "CLI Requests Server" daemon prio=5 tid=7fb9b70b0800 nid=0x11cc1b000 runnable [11cc1a000]
   java.lang.Thread.State: RUNNABLE

# SafepointSynchronize::begin: (End of list)
Comment 147 headius2 2012-02-09 21:39:20 UTC
FWIW, I had a different hang that does appear to have been fixed by the 409 build. I have not retested NB, but it sounds like there may still be issues.
Comment 148 jag 2012-02-10 14:41:06 UTC
Happened again.  Incident information attached.
Comment 149 jag 2012-02-10 14:42:42 UTC
Created attachment 115586 [details]
Happened again - activity monitor output
Comment 150 jag 2012-02-10 14:44:07 UTC
Created attachment 115587 [details]
Happened again - safepoint output
Comment 151 jag 2012-02-10 14:46:32 UTC
Comment on attachment 115587 [details]
Happened again - safepoint output

I forgot to mention that the above incident happened in the middle of the night, when NetBeans was totally quiet - not being used, I was sleeping.  The CPU was pegged.
Comment 152 MTT727 2012-02-10 17:33:53 UTC
Interesting... I have not been able to work on this for the last couple of weeks but have left NB running with my project open all that time and it has not frozen (yet).  I'm hoping to do some work on it this weekend.
Comment 153 MTT727 2012-02-11 19:17:33 UTC
I got a freeze using the developer preview.  It was different, though, in that it locked up my ability to pull up programs from the dock (such as my open terminal and activity monitor windows).  I was able to get to them using the Finder from the top menu bar.  The terminal had no output after:

Macs-MBP11:bin Mac$ ./netbeans -J-XX:+SafepointTimeout --jdkhome /Library/Java/JavaVirtualMachines/JDK\ 1.7.0\ Developer\ Preview.jdk/Contents/Home

Activity monitor showed NB as not responding.  I will upload the sample and messages.log files.

I got this freeze while trying to rearrange tabs on the source editor.  I'm not sure it's the same issue as the original problem.

The developers preview edition is not feasible for me to use further because breakpoints in debugging don't work correctly.
Comment 154 MTT727 2012-02-11 19:19:43 UTC
Created attachment 115619 [details]
Activity Monitor sample
Comment 155 MTT727 2012-02-11 19:27:12 UTC
Created attachment 115620 [details]
messages.log
Comment 156 Tomas Hurka 2012-02-11 20:04:00 UTC
(In reply to comment #151)
> Comment on attachment 115587 [details]
> Happened again - safepoint output
> 
> I forgot to mention that the above incident happened in the middle of the
> night, when NetBeans was totally quiet - not being used, I was sleeping.  The
> CPU was pegged.
Thanks a lot for report. Based in the information you provided, I think that this is different issue. Especially the fact that it is sucking huge amounts of CPU. Also I guess that you will be able to take a thread using jstack or VisualVM from the NetBeans - which also means that this is different. The log from Terminal.app also shows that you have got OOME:

java.lang.OutOfMemoryError: Java heap space
Dumping heap to /Users/jag/.netbeans/7.1/var/log/heapdump.hprof ...
Heap dump file created [1116550274 bytes in 17.127 secs]

... which can explain why it is taking so much CPU.
Comment 157 Tomas Hurka 2012-02-11 20:09:47 UTC
(In reply to comment #153)
> I got a freeze using the developer preview.  It was different, though, in that
> it locked up my ability to pull up programs from the dock (such as my open
> terminal and activity monitor windows).  I was able to get to them using the
> Finder from the top menu bar.  The terminal had no output after:
> 
> Macs-MBP11:bin Mac$ ./netbeans -J-XX:+SafepointTimeout --jdkhome
> /Library/Java/JavaVirtualMachines/JDK\ 1.7.0\ Developer\
> Preview.jdk/Contents/Home
:-( :-( You are running OpenJDK preview instead of the one I want you to try [See my comment #143]. You have to use Developer preview from Apple, which is available here:
<https://developer.apple.com/downloads/index.action?name=Java%20for%20Mac%20OS%20X%20Developer%20Preview>
and try to run NetBeans with this preview.   
To do so, run netbeans from Terminal.app:
bin/netbeans -J-XX:+SafepointTimeout --jdkhome
/Library/Java/JavaVirtualMachines/1.6.0_30-b12-409.jdk/Contents/Home
Comment 158 MTT727 2012-02-13 05:14:52 UTC
After installing 1.6.0_30-b12-409.jdk I have been working in Netbeans 7.1 for about 7 hours with no freezes.  Perhaps this is a fix?

Terminal does show about 30 of these messages:
Feb 12 22:32:08 Macs-MBP11.local java[52781] <Error>: kCGErrorIllegalArgument: CGSRegisterCursorWithImages: Invalid hot spot (outside of size)
Comment 159 MTT727 2012-02-17 02:51:58 UTC
I've now had NB 7.1 using 1.6.0_30-b12-409.jdk open for over 48 hours and worked in it for over 10 hours without a freeze.  I am also no longer getting the "invalid hot spot" message. 

I am satisfied that specifying the new jdk has solved the issue for me.
Comment 160 Geertjan Wielenga 2012-02-17 10:24:51 UTC
Would be great if others following this issue who encountered Mac/NetBeans problems would also try this combination: NB 7.1 using 1.6.0_30-b12-409.jdk
Comment 161 vettori 2012-02-20 21:12:29 UTC
Works for me too with the pre-release jdk from Apple.
Comment 162 Tomas Hurka 2012-02-21 11:42:06 UTC
It looks like that bug is fixed in Java for Mac OS X Developer Preview 11M3614+10M3614. The Apple's bugid is: 
( 10652920 ) REGR: hard hang under heavy concurrent load

I am closing this bug as WONTFIX, since there nothing to fix in NetBeans. Mac OS X users are advised to use Java for Mac OS X Developer Preview 11M3614+10M3614 or newer or wait for official release of Java 6 update, which will be available via Apple's software update.
Comment 163 Jackie_Rosen 2014-02-16 11:23:31 UTC
SPAM - Removed by Administrator


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo